-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for Thermoco #68
Comments
Hi Garrett, I believe it would be fairy easy to add support for this device. There are some example on the internet: http://codegist.net/snippet/python/thermocopy_jlintott_python I will need some help from you. Could you please enable this property: Then add thermoco device from OH inbox. First, do not enable "connection control" for your "thing". Wait 5-10 mins, refresh your browser page and notice if you see any new channels for the thing. I suspect that there will be at least 1 channel for temperature, please take a screenshot. Then monitor the channels and write down their values (binary data) and temperature readings where the device is (just rough samples, e.g. 22 degrees etc). I will need some samples to match binary data with real temperature. If you can't see your device in OH inbox, then this probably means that your mobile phone (or whatever you use to get data from thermco device) is connected to the device. Remember that Bluetooth device can have only single connection at a time. Then, if you do not see any new channels, then enable "Connection control" and wait until it establishes connection, i.e. "Connection" channel gets enabled. Then refresh your browser and notice new channels, and then try to get some binary data and real temperature as I mentioned above. |
Great thanks, what was the temperature around that time when you took screenshot? 28 C or 80 F? |
Also, what app can show you (what metrics/readings)? Can you set any settings? |
Found a doc here: http://outdoor-apps.com/doc/ThermocoForDevelopper.pdf It seems to me the temperature at the time when you took that screenshot was about 18 C, is this right? |
According to the doc, the device advertises data without establishing connection to it. So please do not enable "Connection control", make sure it is online (put it closer to the adapter) and not connected to your phone. A new channel should appear in some time with this UUID: 2.2.1 UUID FFD0
2.2.2 Advertise data
Broadcasting temperature data. Data will be “WKdd” where “dd” is the temperature data.
Sample code snippets:
unsigned char *word16ptr = (unsigned char *)[usrData bytes];
if (word16ptr[0] == 'W' && word16ptr[1] == 'K') { isValidDevice = YES;
if(!(word16ptr[2] == 0x80 && word16ptr[3] == 00)) {
long word16int = word16ptr[2]; word16int <<= 8;
word16int += word16ptr[3]; long tempint;
float temperature; tempint = word16int >> 4; if (tempint < 0x800) {
temperature = 0.0625*tempint; }
else {
tempint = 0x800 - tempint&0x7ff; temperature = -0.0625*tempint;
} }
} It would be quite easy to add support for this, I just need to make sure you see that new channel. |
One thing that won't work is negative temperature. The calculation method is a bit dodgy. Positive temp should work fine, once actual temp goes below 0, it will show some junk. |
Yep, it was around 18 degrees. How should I add the new channel? or should it be auto created? |
Hey @gwhitford , have you done what I mentioned earlier?
Do you see that channel? |
Nope that channel hasn't appeared. I removed readded it still no joy |
After a day, it still hasn't added the new channel. Can the channel be add manually? |
Nope, it is not possible to add channel manually. Is your "thing" online? |
Coin size smart thermometer and recorder (http://outdoor-apps.com/store.html).
The text was updated successfully, but these errors were encountered: