Telsa T-Smart Immersion Heater

Hi John,
To get this running manually all you should need to do is make sure that the TSmart docker instance is pointing to the same MQTT broker as your HA instance runs. Provided they are both using the same broker, then it should all just work!
Do you have the MQTT broker integration linked to your eclipse MQTT docker container?

Hi Mark

That’s great, thanks so much.

I have MQTT integrated in to HA and use it to control smart plugs and get data from a Hildebrand smart meter IHD. I’m assuming that HA will just see this data coming in from TSmart and show it as a new device?

Many thanks once again

John

Hi Mark

Could you let me know what Debug_log_location should be set to please?

It doesn’t appear to have a default setting and won’t let me save if this is blank.

Many thanks

John

Hi Mark

Just a quick update. It’s all working perfectly now! If you use Docker on a Synology, then you cannot have an empty value for any variables.

I mapped a local folder to /log and set Debug_File_Location to be /log/debug.log then it was happy.

One thing I noticed is that the iOS App seems to show High Temperature.

It seems that there is 5C difference at the moment between High Temperature and Low Temperature, when I am heating up my tank. Do you happen to know any more about this and what the two different values mean please?

Many thanks for creating an awesome add-on!

John

Thanks a mil for your great job. I’ve copied 3 json lines and imported them into my node-red. For a 1st 10 mins everything was cool. But then node-red died with 502 bad gateway. I didn’t touch any settings in it’s addon. What could be wrong with it? Or how I could revert it back to working condition?

Here’s what comes in last few lines in node-red addon before it crashes:

26 Nov 00:01:13 - [info] Starting flows
26 Nov 00:01:16 - [info] [udp in:listener] udp: port 1337 already in use
26 Nov 00:01:16 - [info] Started flows
26 Nov 00:01:16 - [error] [udp in:Listen for UDP messages] error: EADDRINUSE
26 Nov 00:01:16 - [error] [udp in:listener] error: EADDRINUSE
26 Nov 00:01:16 - [red] Uncaught Exception:
26 Nov 00:01:16 - [error] Error: Not running
    at new NodeError (node:internal/errors:387:5)
    at healthCheck (node:dgram:900:11)
    at Socket.close (node:dgram:732:3)
    at Socket.<anonymous> (/opt/node_modules/@node-red/nodes/core/network/32-udp.js:97:20)
    at Socket.emit (node:events:525:35)
    at node:dgram:353:14
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
[00:01:16] WARNING: Node-RED crashed, halting add-on
[00:01:16] INFO: Node-RED stopped, restarting...
s6-rc: info: service legacy-services: stopping
[00:01:16] INFO: Node-RED stopped, restarting...
s6-svwait: fatal: supervisor died

@britkat Thanks for putting this together! Just got this up and running and all working smoothly!

I’m planning to get 2 immersion heaters for my cylinder - will the integration support 2 immersions?

Jonathan

Just come across this thread. Thanks to everyone for all the helpful posts!
I am just thinking about getting one of these smart thermostats (I was originally thinking of using a shelly to turn the tank on and off but then there is no way of measuring the water temp).
Stupid question… Does this still allow me to use my boiler to heat the water in the tank?
Currently it’s jsut my boiler that heats the water but I want to do some tests to confirm my suspicion that it’s cheaper to use 7p/kwh electricitiy than 10p/kwh gas to heat the water.
Thanks

Yes, it just replaces the thermostat on the tank, the immersion heater stays as it was and so does the ch heating loop

And where do you get 7p/kWh electric ?

I get 7p electricity at night with Octopus Energy on the Intelligent Octopus plan

2 Likes

Hi David - have just got myself a T-Smart and am keen to get it integrated into my HomeKit environment via Homebridge - how easy was it to get it integrated?

Found this thread as have exactly the same pricing and thought!

T-Smart looks to be around 90 GBP… Anyone found it cheaper?

1 Like

Hey this is great! Thanks so much. All seems to be working as expected EXCEPT if I try and change the mode from Home Assistant, for example changing from Auto to Off, this is not reflected on the immersion heater, and the next time the MQTT is updated, the HA climate mode is forced back to whatever is set on the T-smart.

I do seem to be able to change the ‘preset’ from Home Assistant, but not to the ‘None’ state.

Basically just wondering if there’s a way of toggling the immersion without just setting the setpoint really low.

Hey all - Thanks @britkat (and earlier contributors) for all your hard work!!!
I have two of these (well one is still in the post)… and so I need to be able to connect to both of these. I would call myself a novice with python (and a total newb to docker), but thought how hard can it be to parameterise the device. Well, suffice to say, harder than I expected. I forked your repo and made some tweaks across the files to achieve the option of two devices (didn’t think there will ever be a use case for more than two so happy with some repetition in favour of super efficient code). It runs and connects to the mqtt server but can’t seem to get it to publish to a topic derived based on the IP.

Does anyone have any pointers on reworking the code so it can handle two devices - I thought I could just parameterise the device topic and be done with it but I’m not sure what I missed…! Any help massively appreciated - otherwise I’ll guess it’ll be node red (or sheepishly using the app, which is dire).

anyway - my fork is here: GitHub - benholl/tsmart at multiple_devices :slight_smile:

So after this I’ve actually ended up going down the Node-Red route as I couldn’t fathom coding the add-on properly. I tried forking and running a second add-on in parallel as a janky fix but it didn’t work.

What I have done with the NodeRed config is figure out how to adjust the setpoint freely (as in the addon) - this took me a while as I am totally new to data structures, working with bits and bytes haha. It took me ages to work out that the checksum needs to be written in Big Endian order. Thanks so much to all other contributors, I’ve had to use it all to get to where I am!

Now I have two Node Red flows which handle control read and control write messages for two TSmart Heaters, publishing the outputs to Sensors under devices (rather than entities alone). You can adjust the setpoint to within a 10th of a degree, and you can also monitor the smart status.

It’s a bit clunky because in some cases parts of flows were duplicated (mainly on the control read side) as it publishes to the right device based on filtering on IP right at the start. In the end I couldn’t be bothered to optimise this!

Control WriteFlow

[{"id":"b71a44ceba3ffd03","type":"tab","label":"Temp and Mode Control","disabled":false,"info":""},{"id":"9cb5333dec234544","type":"server-state-changed","z":"b71a44ceba3ffd03","name":"On Peak Mode","server":"99f9b252.db738","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.hot_water_on_peak_actual","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Unknown","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"ip","propertyType":"msg","value":"192.168.8.112","valueType":"str"}],"x":220,"y":640,"wires":[["d7af9c82e3e9621c"],[]]},{"id":"d7af9c82e3e9621c","type":"switch","z":"b71a44ceba3ffd03","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Manual","vt":"str"},{"t":"eq","v":"Eco","vt":"str"},{"t":"eq","v":"Smart","vt":"str"},{"t":"eq","v":"Timer","vt":"str"},{"t":"eq","v":"Travel","vt":"str"},{"t":"eq","v":"Boost","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":790,"y":560,"wires":[["be5e249b2c902efb"],["2922f7982e0cbb2f"],["521e7d06cc8361c3"],["c6b37cbd7be0c22b"],["d7bb1c1a621851af"],["dce7771264f4654c"]]},{"id":"04476f015d24a303","type":"debug","z":"b71a44ceba3ffd03","name":"Manual","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1360,"y":800,"wires":[]},{"id":"bf4daa8238bb7c3d","type":"debug","z":"b71a44ceba3ffd03","name":"Eco","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":852,"wires":[]},{"id":"f78405b6ee4af33d","type":"debug","z":"b71a44ceba3ffd03","name":"Smart","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":904,"wires":[]},{"id":"0eb495607782c939","type":"debug","z":"b71a44ceba3ffd03","name":"Timer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":956,"wires":[]},{"id":"d4730152357b618c","type":"debug","z":"b71a44ceba3ffd03","name":"Travel","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":1008,"wires":[]},{"id":"cb22f9ebda9da02f","type":"debug","z":"b71a44ceba3ffd03","name":"Boost","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":1060,"wires":[]},{"id":"521e7d06cc8361c3","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Smart","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x02\",\"0xA4\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1030.4651162790701,"y":560,"wires":[["f78405b6ee4af33d","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"2922f7982e0cbb2f","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Eco","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x01\",\"0xA7\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1030.4651162790701,"y":520,"wires":[["bf4daa8238bb7c3d","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"be5e249b2c902efb","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Manual","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x00\",\"0xA6\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1040.4651162790701,"y":480,"wires":[["04476f015d24a303","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"d7bb1c1a621851af","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Travel","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x04\",\"0xA2\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1030.4651162790701,"y":640,"wires":[["d4730152357b618c","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"dce7771264f4654c","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Boost","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x05\",\"0xA3\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1030.4651162790701,"y":680,"wires":[["cb22f9ebda9da02f","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"c6b37cbd7be0c22b","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"Buffer Maker Timer","specification":"spec","specificationType":"ui","items":[{"name":"item2","type":"buffer","length":8,"dataType":"bin","data":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x03\",\"0xA5\"]"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1030,"y":600,"wires":[["0eb495607782c939","44594dedab724b5b","198b263155498a94","a93f4bbaa6769e4c"]]},{"id":"44594dedab724b5b","type":"udp out","z":"b71a44ceba3ffd03","name":"Send To Device","addr":"","iface":"","port":"1337","ipv":"udp4","outport":"","base64":true,"multicast":"false","x":2220,"y":500,"wires":[]},{"id":"198b263155498a94","type":"delay","z":"b71a44ceba3ffd03","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1760,"y":840,"wires":[["3a25ecaf84b56af1"]]},{"id":"3a25ecaf84b56af1","type":"link out","z":"b71a44ceba3ffd03","name":"Trigger Control Read","links":["28d7afb9ddb08b9d"],"x":1915,"y":860,"wires":[]},{"id":"40331ec125387708","type":"server-state-changed","z":"b71a44ceba3ffd03","name":"Off Peak Mode","server":"99f9b252.db738","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.hot_water_on_peak_actual","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Unknown","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"ip","propertyType":"msg","value":"192.168.8.112","valueType":"str"}],"x":180,"y":780,"wires":[["d7af9c82e3e9621c"],[]]},{"id":"978aa40b0a7dd03d","type":"server-state-changed","z":"b71a44ceba3ffd03","name":"","server":"e421a022.94f95","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":"Water Heater State"},{"property":"icon","value":""}],"entityidfilter":"input_number.hot_water_on_peak_setpoint_user","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Unknown","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"ip","propertyType":"msg","value":"192.168.8.112","valueType":"str"}],"x":590,"y":320,"wires":[["12a2a72ea871b4b4"],[]]},{"id":"85e06452ecd5bbd4","type":"debug","z":"b71a44ceba3ffd03","name":"concat","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1630,"y":260,"wires":[]},{"id":"12a2a72ea871b4b4","type":"function","z":"b71a44ceba3ffd03","name":"TempToBuffer","func":"var setpoint = msg.payload*10;\nvar buffer = Buffer.alloc(2);\nbuffer.writeInt16LE(setpoint, 0);\nmsg.payload = buffer;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":963.0232558139536,"y":300,"wires":[["b033f2fc40fb6e3f"]]},{"id":"b033f2fc40fb6e3f","type":"change","z":"b71a44ceba3ffd03","name":"HeaderBuffer","rules":[{"t":"set","p":"header","pt":"msg","to":"[\"0xF2\",\"0x00\",\"0x00\",\"0x01\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":320,"wires":[["486cb3caece1ed6f"]]},{"id":"486cb3caece1ed6f","type":"function","z":"b71a44ceba3ffd03","name":"ConCat","func":"var header = Buffer.from(msg.header)\nvar setpoint = Buffer.from(msg.payload)\nvar c = [header, setpoint]\nmsg.payload = Buffer.concat(c)\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1360,"y":340,"wires":[["85e06452ecd5bbd4","f9754320096cfb85"]]},{"id":"f9754320096cfb85","type":"function","z":"b71a44ceba3ffd03","name":"XOR","func":"const data = Buffer.from(msg.payload);\nlet checksum = 0x55;\nfor (let i = 0; i < data.length; i++) {\n    checksum ^= data[i];\n}\nconst checksumBuffer = Buffer.alloc(2);\nchecksumBuffer.writeInt16BE(checksum);\n\nconst buffer = Buffer.concat([data, checksumBuffer]);\nmsg.payload = buffer\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1530,"y":360,"wires":[["2701634121a0b350","198b263155498a94","f64876846833337f"]]},{"id":"2701634121a0b350","type":"debug","z":"b71a44ceba3ffd03","name":"XOR","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1850,"y":260,"wires":[]},{"id":"f64876846833337f","type":"buffer-maker","z":"b71a44ceba3ffd03","name":"","specification":"spec","specificationType":"ui","items":[{"name":"item1","type":"buffer","length":8,"dataType":"msg","data":"payload"}],"swap1":"","swap2":"","swap3":"swap16","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1910,"y":380,"wires":[["44594dedab724b5b","aa051af630b3bca6","a93f4bbaa6769e4c"]]},{"id":"aa051af630b3bca6","type":"debug","z":"b71a44ceba3ffd03","name":"byteorder","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2260,"y":240,"wires":[]},{"id":"cc709f9582f89876","type":"server-state-changed","z":"b71a44ceba3ffd03","name":"","server":"e421a022.94f95","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":"Water Heater State"},{"property":"icon","value":""}],"entityidfilter":"input_number.hot_water_off_peak_setpoint_user","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Unknown","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"ip","propertyType":"msg","value":"192.168.8.104","valueType":"str"}],"x":550,"y":260,"wires":[["12a2a72ea871b4b4"],[]]},{"id":"a93f4bbaa6769e4c","type":"debug","z":"b71a44ceba3ffd03","name":"ip","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"ip","targetType":"msg","statusVal":"","statusType":"auto","x":2190,"y":660,"wires":[]},{"id":"99f9b252.db738","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false},{"id":"e421a022.94f95","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

Control Read Flow

[{"id":"1fc40438f9fe75ed","type":"tab","label":"Control Read","disabled":false,"info":""},{"id":"2e1c0fa8d82569ba","type":"udp out","z":"1fc40438f9fe75ed","name":"Poll for data","addr":"192.168.8.112","iface":"","port":"1337","ipv":"udp4","outport":"","base64":true,"multicast":"false","x":590,"y":60,"wires":[]},{"id":"c9aca543179cf1bb","type":"debug","z":"1fc40438f9fe75ed","name":"Right IP","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":460,"y":340,"wires":[]},{"id":"feb781e2e3583eeb","type":"udp in","z":"1fc40438f9fe75ed","name":"Listen for UDP messages","iface":"","port":"1337","ipv":"udp4","multicast":"false","group":"","datatype":"buffer","x":130,"y":200,"wires":[["541dcaec636fc5c9"]]},{"id":"1c5b4eca3f950738","type":"buffer-parser","z":"1fc40438f9fe75ed","name":"Extract Data from Payload on Peak","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16le","name":"current_water_temperature","offset":7,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"int16le","name":"set_point","offset":4,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"bool","name":"currently_heating","offset":9,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"int8","name":"mode","offset":6,"length":1,"offsetbit":1,"scale":"1","mask":""},{"type":"bool","name":"power","offset":3,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int8","name":"smartstate","offset":10,"length":1,"offsetbit":1,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":1040,"y":240,"wires":[["a68717fdd9152e30","d31f61eb85838a80","978f602bbcc4f589","d002f9865e5afafb","af8681a1091b5561","8c7525bba56ce1b9"]]},{"id":"0c7414361f244a1c","type":"debug","z":"1fc40438f9fe75ed","name":"Wrong IP","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":400,"y":620,"wires":[]},{"id":"541dcaec636fc5c9","type":"switch","z":"1fc40438f9fe75ed","name":"Check Source IP On Peak","property":"ip","propertyType":"msg","rules":[{"t":"cont","v":"192.168.8.112","vt":"str"},{"t":"cont","v":"192.168.8.104","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":170,"y":400,"wires":[["c9aca543179cf1bb","be7391beaa4c5512","ad4e5d81e72ed905"],["5f44c272575bdbe2"],["0c7414361f244a1c"]]},{"id":"d89a28c6942353b1","type":"switch","z":"1fc40438f9fe75ed","name":"Sort messages","property":"message_type","propertyType":"msg","rules":[{"t":"eq","v":"242","vt":"str"},{"t":"eq","v":"241","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":780,"y":500,"wires":[["ebb18dab196e65a3"],["1a83749f573f2c55","1c5b4eca3f950738"],["b2d07716ece50533"],["78fce09ab96671a2","e81f80cdb8de371c"]]},{"id":"1a83749f573f2c55","type":"debug","z":"1fc40438f9fe75ed","name":"Control Read","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1390,"y":620,"wires":[]},{"id":"ebb18dab196e65a3","type":"debug","z":"1fc40438f9fe75ed","name":"Acknowledge Set","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1410,"y":560,"wires":[]},{"id":"78fce09ab96671a2","type":"debug","z":"1fc40438f9fe75ed","name":"Other Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1420,"y":760,"wires":[]},{"id":"b2d07716ece50533","type":"debug","z":"1fc40438f9fe75ed","name":"Discovery Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":700,"wires":[]},{"id":"be7391beaa4c5512","type":"change","z":"1fc40438f9fe75ed","name":"Add Message Type to payload","rules":[{"t":"set","p":"string","pt":"msg","to":"$string(payload)","tot":"jsonata"},{"t":"set","p":"message_type","pt":"msg","to":"$substringBefore(($substringAfter($string(payload), \"[\")), \",\")\t\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":420,"wires":[["d89a28c6942353b1"]]},{"id":"f34c37228774a5f5","type":"trigger","z":"1fc40438f9fe75ed","name":"Watchdog","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"4","extend":true,"overrideDelay":false,"units":"s","reset":"ok","bytopic":"all","topic":"topic","outputs":1,"x":590,"y":140,"wires":[["3b24d406dcb041ef","51b0d9629ab2efda"]]},{"id":"3b24d406dcb041ef","type":"debug","z":"1fc40438f9fe75ed","name":"Timeout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":80,"wires":[]},{"id":"ad4e5d81e72ed905","type":"change","z":"1fc40438f9fe75ed","name":"Reset Timeout","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":280,"wires":[["f34c37228774a5f5"]]},{"id":"2bcef42beed38c27","type":"change","z":"1fc40438f9fe75ed","name":"Get Control Data Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0xF1\",\"0x00\",\"0x00\",\"0xA4\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":80,"wires":[["f34c37228774a5f5","2e1c0fa8d82569ba","6ac530479313af11"]]},{"id":"a80f90c2f7c7de50","type":"inject","z":"1fc40438f9fe75ed","name":"Start","props":[],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":80,"wires":[["2bcef42beed38c27"]]},{"id":"28d7afb9ddb08b9d","type":"link in","z":"1fc40438f9fe75ed","name":"Trigger Control Read","links":["3a25ecaf84b56af1"],"x":155,"y":40,"wires":[["2bcef42beed38c27"]]},{"id":"610123ca9f119dc0","type":"ha-fire-event","z":"1fc40438f9fe75ed","name":"Fire event","server":"99f9b252.db738","version":0,"event":"water_heater","data":"{\"message\":\"Multiple timeouts waiting for response from water heater\",\"event\":\"water_heater_timeout\"}","dataType":"json","x":1280,"y":140,"wires":[[]]},{"id":"e81f80cdb8de371c","type":"ha-fire-event","z":"1fc40438f9fe75ed","name":"Fire event","server":"99f9b252.db738","version":0,"event":"water_heater","data":"{\"message\":\"Unexpected response from water heater\",\"event\":\"water_heater_unexpected_message\"}","dataType":"json","x":1420,"y":820,"wires":[[]]},{"id":"51b0d9629ab2efda","type":"timed-counter","z":"1fc40438f9fe75ed","name":"Count how many in hour","timelimit":"1","timeunit":"3600000","withhold":true,"fixedtimeout":true,"pertopic":false,"x":830,"y":140,"wires":[["d7977e1f8ecbe0c5","d132cbb19dca0d85"]]},{"id":"d7977e1f8ecbe0c5","type":"switch","z":"1fc40438f9fe75ed","name":"Ignore less than 5","property":"count","propertyType":"msg","rules":[{"t":"gte","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1090,"y":140,"wires":[["610123ca9f119dc0"]]},{"id":"d132cbb19dca0d85","type":"debug","z":"1fc40438f9fe75ed","name":"How many in hour","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":80,"wires":[]},{"id":"a68717fdd9152e30","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OnPeakCurrentTemp","entityConfig":"c19c3453242a2338","version":0,"state":"payload.current_water_temperature","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1680,"y":180,"wires":[[]]},{"id":"1ec3257d26e0a15f","type":"inject","z":"1fc40438f9fe75ed","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":140,"wires":[["2bcef42beed38c27"]]},{"id":"b049d2c7d7e2dbe5","type":"switch","z":"1fc40438f9fe75ed","name":"Sort messages","property":"message_type","propertyType":"msg","rules":[{"t":"eq","v":"242","vt":"str"},{"t":"eq","v":"241","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":780,"y":800,"wires":[["ebb18dab196e65a3"],["1a83749f573f2c55","58c622a9e2ad3650"],["b2d07716ece50533"],["78fce09ab96671a2","e81f80cdb8de371c"]]},{"id":"5f44c272575bdbe2","type":"change","z":"1fc40438f9fe75ed","name":"Add Message Type to payload","rules":[{"t":"set","p":"string","pt":"msg","to":"$string(payload)","tot":"jsonata"},{"t":"set","p":"message_type","pt":"msg","to":"$substringBefore(($substringAfter($string(payload), \"[\")), \",\")\t\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":540,"wires":[["b049d2c7d7e2dbe5"]]},{"id":"6ac530479313af11","type":"udp out","z":"1fc40438f9fe75ed","name":"Poll for data","addr":"192.168.8.104","iface":"","port":"1337","ipv":"udp4","outport":"","base64":true,"multicast":"false","x":590,"y":100,"wires":[]},{"id":"d31f61eb85838a80","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OnPeakSetPoint","entityConfig":"7a1823bbcb107efc","version":0,"state":"keyvalues.set_point","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1650,"y":240,"wires":[[]]},{"id":"e0b24d6af26b90a8","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OnPeakPower","entityConfig":"22b3889922994855","version":0,"state":"keyvalues.power","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":2120,"y":480,"wires":[[]]},{"id":"978f602bbcc4f589","type":"ha-binary-sensor","z":"1fc40438f9fe75ed","name":"OnPeakHeating","entityConfig":"89bacd334bc2de75","version":0,"state":"keyvalues.currently_heating","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1660,"y":300,"wires":[[]]},{"id":"ae32e57000b9389c","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OffPeakCurrentTemp","entityConfig":"5a6fa54890c73917","version":0,"state":"payload.current_water_temperature","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1440,"y":1100,"wires":[[]]},{"id":"1e3f946c819641a4","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OffPeakSetPoint","entityConfig":"beaca0b5b844574f","version":0,"state":"keyvalues.set_point","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1400,"y":1140,"wires":[[]]},{"id":"083a7bdd2d8706f4","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OffPeakPower","entityConfig":"3474cb6178289aa4","version":0,"state":"keyvalues.power","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":2120,"y":1020,"wires":[[]]},{"id":"a28da5840d5755b4","type":"ha-binary-sensor","z":"1fc40438f9fe75ed","name":"OffPeakHeating","entityConfig":"030956070f4966d6","version":0,"state":"keyvalues.currently_heating","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1440,"y":1240,"wires":[[]]},{"id":"d002f9865e5afafb","type":"switch","z":"1fc40438f9fe75ed","name":"Power","property":"keyvalues.power","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1610,"y":440,"wires":[["65308a773041f304"],["72ae32adfefb7b09"]]},{"id":"65308a773041f304","type":"change","z":"1fc40438f9fe75ed","name":"Power on","rules":[{"t":"set","p":"keyvalues.power","pt":"msg","to":"3000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1800,"y":460,"wires":[["e0b24d6af26b90a8"]]},{"id":"72ae32adfefb7b09","type":"change","z":"1fc40438f9fe75ed","name":"Power off","rules":[{"t":"set","p":"keyvalues.power","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1800,"y":520,"wires":[["e0b24d6af26b90a8"]]},{"id":"8c0c28c00f59d4cb","type":"function","z":"1fc40438f9fe75ed","name":"Mode","func":"var TSMode = [\"Manual\", \"Eco\", \"Smart\", \"Timer\", \"Travel\", \"Boost\"]\nmsg.keyvalues.mode = TSMode[msg.keyvalues.mode]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1450,"y":980,"wires":[["68131a93cc90815b"]]},{"id":"68131a93cc90815b","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OffPeakMode","entityConfig":"489a8ec20bd1bf45","version":0,"state":"keyvalues.mode","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1660,"y":920,"wires":[[]]},{"id":"af8681a1091b5561","type":"function","z":"1fc40438f9fe75ed","name":"Mode","func":"var TSMode = [\"Manual\", \"Eco\", \"Smart\", \"Timer\", \"Travel\", \"Boost\"]\nmsg.keyvalues.mode = TSMode[msg.keyvalues.mode]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1670,"y":120,"wires":[["047a69524094def2"]]},{"id":"047a69524094def2","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OnPeakMode","entityConfig":"8303d345ea622c06","version":0,"state":"keyvalues.mode","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1940,"y":80,"wires":[[]]},{"id":"8c7525bba56ce1b9","type":"function","z":"1fc40438f9fe75ed","name":"SmartState","func":"const TSSmartState = [\"Uninitialised\", \"Idle\", \"Recording\", \"Reproduction\"]\nmsg.keyvalues.smartstate = TSSmartState[msg.keyvalues.smartstate]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1630,"y":360,"wires":[["7649f983838fbd10"]]},{"id":"7649f983838fbd10","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OnPeakSmartState","entityConfig":"05bab561bf05a7ab","version":0,"state":"keyvalues.smartstate","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1910,"y":340,"wires":[[]]},{"id":"58c622a9e2ad3650","type":"buffer-parser","z":"1fc40438f9fe75ed","name":"Extract Data from Payload off Peak","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16le","name":"current_water_temperature","offset":7,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"int16le","name":"set_point","offset":4,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"bool","name":"currently_heating","offset":9,"length":1,"offsetbit":0,"scale":"0.1","mask":""},{"type":"int8","name":"mode","offset":6,"length":1,"offsetbit":1,"scale":"1","mask":""},{"type":"bool","name":"power","offset":3,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int8","name":"smartstate","offset":10,"length":1,"offsetbit":1,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":1020,"y":1020,"wires":[["8c0c28c00f59d4cb","ae32e57000b9389c","1e3f946c819641a4","a28da5840d5755b4","104414af5084a4e5","a23a73a4900bd3b4"]]},{"id":"fdda416bad240fb7","type":"ha-sensor","z":"1fc40438f9fe75ed","name":"OffPeakSmartState","entityConfig":"07c8533bfcd65963","version":0,"state":"keyvalues.smartstate","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1930,"y":1180,"wires":[[]]},{"id":"104414af5084a4e5","type":"function","z":"1fc40438f9fe75ed","name":"SmartState","func":"const TSSmartState = [\"Uninitialised\", \"Idle\", \"Recording\", \"Reproduction\"]\nmsg.keyvalues.smartstate = TSSmartState[msg.keyvalues.smartstate]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1650,"y":1200,"wires":[["fdda416bad240fb7"]]},{"id":"a23a73a4900bd3b4","type":"switch","z":"1fc40438f9fe75ed","name":"Power","property":"keyvalues.power","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1710,"y":1000,"wires":[["62bed9c221b5752a"],["d0493b6d1ee7decd"]]},{"id":"62bed9c221b5752a","type":"change","z":"1fc40438f9fe75ed","name":"Power on","rules":[{"t":"set","p":"keyvalues.power","pt":"msg","to":"3000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1900,"y":1020,"wires":[["083a7bdd2d8706f4"]]},{"id":"d0493b6d1ee7decd","type":"change","z":"1fc40438f9fe75ed","name":"Power off","rules":[{"t":"set","p":"keyvalues.power","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1900,"y":1080,"wires":[["083a7bdd2d8706f4"]]},{"id":"99f9b252.db738","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false},{"id":"c19c3453242a2338","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Temperature","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Temperature"},{"property":"icon","value":"mdi:water-boiler"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"temperature"},{"property":"unit_of_measurement","value":"°C"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"7a1823bbcb107efc","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Setpoint","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Setpoint"},{"property":"icon","value":"mdi:thermometer"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"temperature"},{"property":"unit_of_measurement","value":"°C"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"22b3889922994855","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Power","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"89bacd334bc2de75","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Heating","version":"6","entityType":"binary_sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Heating"},{"property":"icon","value":"mdi:check"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"5a6fa54890c73917","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Temperature","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Temperature"},{"property":"icon","value":"mdi:water-boiler"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"temperature"},{"property":"unit_of_measurement","value":"°C"},{"property":"state_class","value":""}],"resend":true,"debugEnabled":false},{"id":"beaca0b5b844574f","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Setpoint","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Setpoint"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"temperature"},{"property":"unit_of_measurement","value":"°C"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"3474cb6178289aa4","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Power","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"030956070f4966d6","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Heating","version":"6","entityType":"binary_sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Heating"},{"property":"icon","value":"mdi:check"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"489a8ec20bd1bf45","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Mode","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Mode"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"8303d345ea622c06","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Mode","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Mode"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"05bab561bf05a7ab","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"01f1daae83f1ac61","name":"Water Heater On Peak Smart State","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater On Peak Smart State"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"07c8533bfcd65963","type":"ha-entity-config","server":"99f9b252.db738","deviceConfig":"c4a6f8dbbb840162","name":"Water Heater Off Peak Smart State","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Water Heater Off Peak Smart State"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"01f1daae83f1ac61","type":"ha-device-config","name":"TSmart Heater On Peak","hwVersion":"NA","manufacturer":"TSmart","model":"TIHTS","swVersion":"NA"},{"id":"c4a6f8dbbb840162","type":"ha-device-config","name":"TSmart Heater Off Peak","hwVersion":"NA","manufacturer":"TSmart","model":"TIHTS","swVersion":"NA"}]

I’ve just created a custom component for HACS that talks directly to T-Smart thermostats:

It supports discovery, and should support multiple devices on the same network. Once discovered, each thermostat will show up as a climate entity, and will allow you to turn on/off, set preset mode and set temperature, as well as monitor the current temperature.

It can be installed either directly (copy files into your custom_components directory) or as a custom repository in HACS. Instructions for both on the link above.

Feedback welcome, particularly from @benholl if you can test the multi-device support.

1 Like

Just tried this and get Unknown Error Occurred when trying to add the integration.

Is there anything in the logs?

Do you see the “Do you want to start setup?” dialog when trying to add the integration?

No, nothing in logs, yes get the start setup prompt and get the error after clicking on submit

EDIT: Figured it out, I had the T-Smart Add-on running, once I stopped that, it works fine

EDIT 2: It would be helpful if you could add a binary_sensor when the immersion is heating (as in the add-on) shown in the app with a lightning bolt

Glad you got it working, although I’m not sure why the two would conflict. Out of interest, how have you got HA installed?

Yes, adding support for the relay output is on my to-do list.