Telsa T-Smart Immersion Heater

No probs, do you want to share your python addon ? I only have NR installed for this device

Absolutely, just publishing it and making sure it works then I’ll put links/instructions here

So the first stab at a T-Smart addon is available. Here’s how to Install:
Navigate to Settings->Addons->Addon Store

  • Click the triple dots top right and “Repositories”
  • Add: “https://github.com/britkat1980/tsmart
  • It will then add TSmart as an addon for you to install
  • Install it then open the config tab and add the following info:
  • IP address of your TSmart
  • IP Address of the HA MQTT broker
  • add MQTT username and password if you use them
  • save config and then start the addon

The Addon will create a Climate device which will allow you to set the mode (using “presets”) and the temp using the usual cliamte controls.

Have a look and then let me know how you get on!

2 Likes

That’s brilliant thankyou.

Working great, only thing I suggest is you create one device with all the entities in it, rather than separate devices for all the sensors/controls etc

Good shout, That’s usually how I do it, but its not grouped them. I’ll update that now (also adding in a power sensor based off the heating state)

Great.

Just seen the climate device, brilliant !

version 0.8.8 is up and groups the entities into a single device and adds power entity

Great thanks, I’ll wait for the update to pop up in HA

Just installed, all seems to be working. Love the power sensor, I had a template sensor doing the same thing. Maybe need to add a power device_class so it has a unit of measurement ?

Thanks again

if you go into addon store and click check for updates it’ll show up quicker (I think it checks for updates once a day)

I never knew that thanks

It should have al that, I checked and an errant capital letter in the code meant it didn’t add it, 0.8.9 up now, which should have the device_class, and state_class

Yup, works perfectly

I’ve updated to version 0.9 which now has an entities for Error State, with attributes for each error as per the API docs. I assume it works, but don’t have any errors so can’t prove it out yet!

Great, many thanks. We’ll have to hope we never see any ! But its nice to have just in case

Very many thanks for this Mark.
Amanda’s node red flows were great but this is next level- makes the T-Smart super functional and it is very easy to set up.

I’ve just installed the Add on and configured it… but the logs are showing:

Traceback (most recent call last):
File “/app/TSmart/server.py”, line 173, in
return self.reconnect()
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 1044, in reconnect
publishOutput(output)
File “/app/TSmart/server.py”, line 45, in publishOutput
HAMQTT.publish_discovery(tempoutput)
File “/app/TSmart/HA_Discovery.py”, line 83, in publish_discovery
sock = self._create_socket_connection()
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 3685, in _create_socket_connection
client.connect(HAMQTT.MQTT_Address,port=HAMQTT.MQTT_Port)
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 914, in connect
return self.reconnect()
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 1044, in reconnect
sock = self._create_socket_connection()
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File “/usr/local/lib/python3.10/socket.py”, line 824, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/usr/local/lib/python3.10/socket.py”, line 955, in getaddrinfo
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File “/usr/local/lib/python3.10/socket.py”, line 824, in create_connection
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/usr/local/lib/python3.10/socket.py”, line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
2022-10-07 10:12:21,609 TSmart_STARTUP - Starting UDP Server
2022-10-07 10:12:21,610 root - Starting the MQTT Client…
2022-10-07 10:12:21,750 - root [CRITICAL] Inside server.py
2022-10-07 10:12:21,750 - root [CRITICAL] UDP server up and listening
Traceback (most recent call last):
File “/app/TSmart/mqtt_client.py”, line 82, in
Traceback (most recent call last):
File “/app/TSmart/server.py”, line 173, in
client.connect(MQTT_Address,port=MQTT_Port)
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 914, in connect
publishOutput(output)
File “/app/TSmart/server.py”, line 45, in publishOutput
HAMQTT.publish_discovery(tempoutput)
File “/app/TSmart/HA_Discovery.py”, line 83, in publish_discovery
client.connect(HAMQTT.MQTT_Address,port=HAMQTT.MQTT_Port)
File “/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py”, line 914, in connect
return self.reconnect()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client

Any thoughts? I thought that I had everything correct (double checked too - IP address, mqtt user and p/w) but clearly something is wrong…

Did you do anything extra between the three elements in the instructions? * IP address of your TSmart

  • IP Address of the HA MQTT broker
  • add MQTT username and password if you use them

No that was it I think.

have you tried MQTT explorer and make sure the messages are appearing there ?

1 Like

Result! my MQTT was in the wrong case!!! perfect… up and running…

Amazing work Mark, thank you for spending the time on this and publishing for the community to benefit!