Hello ReX, I just read your post. I would be interested too !!! Is there now a possibility of integration? For the official components âTermaâ is not listed, but maybe there is a âcustom_componentâ or a way about âNodeREDâ or another possibility?
Apparently there is no way to integrate as they donât want to expose the API (Iâve asked). Eventually I decided to manage the heating element with an external wifi switch (Shelly 1).
Apologies for reviving this very old topic. We are considering buying multiple heaters with Therma Moa blue heating elements, and I am very much interested in this solution of using a Shelley 1 to manage the heater. My question is how the power setting of the heater works. I can imagine that it always starts in the lowest setting whenever it is turned on, or does it remember the setting from when it turned off? Thanks!
6: Manual operation, based on heating element temperature
7: Schedule, based on room temperature
8: Schedule, based on heating element temperature
Schedule
No idea, use the app or set your schedule in HA.
Timer
No idea, use the app or manually set a timer on HA.
Temperature encoding
Thatâs where it gets interesting. Temperatures are encoded on 4 bytes.
First and second byte are the current temp.
Third and forth byte are the target temp.
To calculate the current temp in ÂșC = ((firstByteToInt * 255) + secondByeToInt) / 10
To calculate the target temp in ÂșC = ((thirdByteToInt * 255) + fourthByteToInt) / 10
Examples (Iâm representing the value in Hex, so it is readable):
30Âș 012d
35Âș 015F
40Âș 0191
45Âș 01c2
50Âș 01f5
55Âș 0232
60Âș 0264
Setting target temperature
You have to write the appropriate characteristic.
If youâre running in mode 5 (room temp) use âD97352B1-D19E-11E2-9E96-0800200C9A66â (temp range: 15-30 ÂșC).
If youâre running in mode 6 (heating element temp) use âD97352B2-D19E-11E2-9E96-0800200C9A66â (temp range: 30-60 ÂșC).
Youâll first have to convert your target temp to hex. I have no time right now to write the exact formula but you have to reverse the other formulas Iâve posted.
Letâs say you want to set the unit to 30ÂșC, thatâs 012d
You have to send to set the characteristics to [current temp][target temp]; current temp can be 0000 because you donât care about that.
Example: 0000012d will set the heating element to heat to 30Âș (either room temp or heating element temp, depending on the characteristic you write).
Thank you for your contribution. I am trying to reverse engineer a generic unbranded radiator that has Bluetooth control but the app was discontinued a long time ago and so am struggling to reverse engineer this.
I am currently using gatttools on linux but am not sure how to decode the values. I tried to work out what you did by using one of your values for example â012dâ. Iâve tried different online tools for example:
Hi Toby.
As ptuk says, you have to convert from hex to decimal as you are doing, but them you need to divide the result by 10:
To calculate the current temp in ÂșC = ((firstByteToInt * 255) + secondByeToInt) / 10
To calculate the target temp in ÂșC = ((thirdByteToInt * 255) + fourthByteToInt) / 10
Thatâs why the second link gives you 012d â 301. Divide that by 10 and you get the value 30.
@ptuk Iâd also love to know how you run this code. Iâve been trying to figure if it should be put into node.js or node red, but not had any success with either
Iâve managed to run the code from command line by adding an init(); line to the end and running it from node.js, however, it fails to read the services/capabilities from the device.
Not sure if mine is just a slightly different model, or if something has changed on them, but using one of the ânobleâ examples to do a barebones connection, also seems to return empty arrays for them
"cc:22:xx:xx:xx:xx":{"address":"cc:xx:xx:xx:xx:xx","addressType":"public","connectable":true,"advertisement":{"localName":"MOA Blue TERMA","txPowerLevel":8,"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]},"rssi":-85,"count":2,"hasScanResponse":false},
Hi there. thereâs no easy way to run it. Noble has proven very unreliable on this device.
What I do is having a node server that runs gatttool in interactive mode, reading the Bluetooth characteristics and publishing updates via websocket. It also accepts post requests to set the state of the unit.
I could open source it if you think that would help.
Thanks for the offer @ptuk , Iâm not sure it would though.
I canât see that I can get anything working while the device isnât sending services or capabilities.
Itâs not just this way with the noble / javascript code, Iâm also not getting them when using gatttools or bluetoothctl
Did you have to pair the device to the connecting computer or did it work for you without?