Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read external temperature on Temper2 #4

Open
MeMattStone opened this issue Aug 24, 2018 · 2 comments
Open

Can't read external temperature on Temper2 #4

MeMattStone opened this issue Aug 24, 2018 · 2 comments

Comments

@MeMattStone
Copy link

I purchased a batch of Temper2 devices from modmypi.com having bought 30-40 Temper devices over the past 5 years for various projects from the Temper1, Temper2 (Metal Body), and Temper2 (White Plastic Body) and recently it seems the internals have changed and now report as 413d:2107 with no vendor description.

After successfully installing Go on Raspbian Jessie Lite I can read the temperature on the device (the humidity is stuck on 200 as this isn't a feature of the Temper2) but the temperature appears to be the internal temperature and not the external probe.

Has anyone successfully been able to modify the Go script to output the other temperature? I'm new to Go and more versed in Python and C when dealing with these devices.

@mreymann
Copy link
Owner

Not me since my device doesn't have an external probe.

@MeMattStone
Copy link
Author

So after some more digging online I found this post: edorfaus/TEMPered#51 which indicates the device I have actually returns two lines of data, so I changed line 93 in temperx.go from:

if buf, err := device.Read(-1, 1*time.Second); err == nil {

to:

if buf, err := device.Read(-2, 1*time.Second); err == nil {

and this appears to return the temperature from the second set of data, I'm still testing this to make sure that's actually what is being returned but as my understanding of interacting with USB devices is lacking I might be barking up the wrong tree with this. Hopefully this might help someone with a bit more knowledge than me figure it out as a quick google search shows this lack of continuity from PCSensor even within the same models to cause a lot of problems for people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants