Telsa T-Smart Immersion Heater

Firstly, I’m a complete Noob. So don’t shot me down :slight_smile: I’ve got the IP setup and have data coming through to the debugger. I’m not sure what I’ve done wrong but every time I try to deploy the ‘Control Read Flow’ I get an error from the ‘Extract Data from Payload’ stating the ‘offset’ must be between the range of 0 or 2. I see multiple offset numbers ranging all the way up to 9? The one I want is the temperature, which is 7. So, I set them all to zero, not knowing what they do, but all I get back for the ‘current_water_temperature’ is 24.1
Just a bit of background, I ain’t a HA person. So I removed all the events and associated actions related to HA from the Flow. I was hoping to use the temperature to kick start my Nest hotwater that’ll start my Daikin heatpump. My unvented hotwater tank doesn’t have a temperature gauge. Complete joke. They’re completely blind to each other. Hopefully if I can get this to work I’ll be able to reduce my eye-watering annual 9000Kwh usage.
I kind of understand the XOR usage but not. I know it compares two collections and if they don’t match then it switch a value on or off. What I don’t understand is how this is done in UDP and how to get to the value if it is 24.1 each and ever time.

Have you tried the add-on above ? works great and much easier to setup than using NodeRed

Thanks. I’m using Homebridge (heathenism) with my setup but I’ve just worked it out. I went back to basics and deconstructed the root UDP message. I suppose I was being a bit lazy, out of depth and recovering, in a good way, from a Morrissey gig.

I think this document help me the most (Control Read). Dropbox - United API examples.docx - Simplify your life (from above)

And finally @ Kitkat Amanda and everyone else, thank you so much for all your hard work. Sharing is caring.

Just wanted to say thanks, this is fantastic!

HI David

Have you managed to get working in Homebridge? Or are you linking back to Home Assistant?

Interested in steps if just in Homebridge as even bigger noob :slight_smile: and not managed to work it out from Tesla API

Hi, I am having problems setting this up. I installed the add-on, added the address and the MQTT details and the add on runs without showing errors. But I can’t see any devices or integrations added. I haven’t run the docker-compose command, not sure if this was required if running on HA. If do, where would I run this? through HA?

If using the HA addon docker compose not required. Once the Addon is up and running, restart and you should have a new climate device in your MQTT integration on HA

Hmm, something is not working then. This is my config file, the tsmart IP I have checked through the app and the MQTT details work with my tasmota devices so I know those are correct too.
I can’t see it in my integrations, this is the logs showing its connected, also in the MQTT broker I can see a new connection

Notice anything wrong?

Thanks

There doesn’t seem to be any devices in your MQTT integration

Untitled

Oh yes I thought it was working because my other devices popped up with the Tasmota integration, but maybe it isnt. Alright I’ll look into fixing MQTT thanks

You can use MQTT Explorer to see if the TSmart is sending out MQTT

Looks like it isn’t, strange because the node-red method worked and showed me the temperature

You have restarted HA ? Is there anything the the HA logs ?

Yes restarted, reinstalled mqtt and tsmart, nothing. The problem is somewhere in the repo not pushing messages because mqtt logs also says a connection established. Tried to debug but this came up:

2022-10-29 13:17:48,371 TSmart_STARTUP - Recreating settings.py
2022-10-29 13:17:48,372 root - Starting the Server...
2022-10-29 13:17:48,372 root - Starting the MQTT CLient...
2022-10-29 13:17:48,373 root - Starting Control Read loop every: 10s
Traceback (most recent call last):
  File "/app/TSmart/mqtt_client.py", line 8, in <module>
    import write as wr
  File "/app/TSmart/write.py", line 18, in <module>
    logging.basicConfig(level=logging.ERROR, format="%(asctime)s - %(name)s [%(levelname)s] %(message)s", handlers=[logging.StreamHandler(),TimedRotatingFileHandler(TSmartSettings.Debug_File_Location, when='D', interval=1, backupCount=7)])
NameError: name 'TimedRotatingFileHandler' is not defined
2022-10-29 13:17:48,499 - root [CRITICAL] Inside server.py
2022-10-29 13:17:48,499 - root [CRITICAL] UDP server up and listening

Strange, mine is working fine, maybe wait and see if the author can help.

That is odd, try uninstalling and reinstalling. It looks like a dependency is missing for log file handling…

So I replaced the thermostat as the last one suddenly stopped working, and I also created a container outside of HA for the MQTT broker. My tasmota devices are working with the new broker but the tsmart container is still not pushing any data to the broker. looks like it can’t seem to detect the thermostat. Is there a step I am missing on the tesla app?

BTW, Node-red approach did work for me so connection to the tsmart is possible

Finally managed to get it to work, a bit of a strange one. Seems like I need a physical device (maybe network port) to get udp communication going between the tsmart and device. it first worked on my desktop when I ran the python code myself removing the ENV variables and hardcoding them in settings.py. Then I tried in a container on the same machine and that didnt work (no errors just no messages received). Tried on my server VM and container, no luck then tried on a raspberry pi as that worked fine. Not sure if anyone else has theirs working through a container or VM, if so is there any advice? if not the pi will work for me

I am running HA in a Docker container on a Synology NAS, so I don’t have the Add-ons option. I have Eclipse-Mosquitto running in a separate Docker container and use it with Tasmota which works fine.

Do you have any instructions on how to install your amazing add-on manually please? My TSmart is up and running, but I can’t wait to get it integrated with HA.

Thanks so much!

John