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

Add support for Thermoco #68

Open
vkolotov opened this issue Nov 11, 2018 · 14 comments
Open

Add support for Thermoco #68

vkolotov opened this issue Nov 11, 2018 · 14 comments

Comments

@vkolotov
Copy link
Contributor

Coin size smart thermometer and recorder (http://outdoor-apps.com/store.html).

@vkolotov
Copy link
Contributor Author

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:

image

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.

@vkolotov
Copy link
Contributor Author

vkolotov commented Nov 11, 2018

Please note that you need to enable "simple" linking mode:
image

@gwhitford
Copy link

I have made the changes to the binding configratiom and have added sensor and attached the image of the seetings
thermoco

Let me know if you need any further info.

@vkolotov
Copy link
Contributor Author

Great thanks, what was the temperature around that time when you took screenshot? 28 C or 80 F?

@vkolotov
Copy link
Contributor Author

Also, what app can show you (what metrics/readings)? Can you set any settings?

@vkolotov
Copy link
Contributor Author

Please also click on this button and take a screenshot:
image

@vkolotov
Copy link
Contributor Author

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?

@vkolotov
Copy link
Contributor Author

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: 0000FFD0-0000-1000-8000-00805F9B34FB. That one is used to read temperature as per this:

2.2.1 UUID FFD0
2.2.2 Advertise data
Broadcasting temperature data. Data will beWKddwhereddis 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.

@vkolotov
Copy link
Contributor Author

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.

@gwhitford
Copy link

Yep, it was around 18 degrees. How should I add the new channel? or should it be auto created?

@vkolotov
Copy link
Contributor Author

vkolotov commented Nov 27, 2018

Hey @gwhitford , have you done what I mentioned earlier?

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: 0000FFD0-0000-1000-8000-00805F9B34FB.

Do you see that channel?

@gwhitford
Copy link

Nope that channel hasn't appeared. I removed readded it still no joy

@gwhitford
Copy link

After a day, it still hasn't added the new channel. Can the channel be add manually?

@vkolotov
Copy link
Contributor Author

Nope, it is not possible to add channel manually.

Is your "thing" online?

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