Tiemme 4Heat Stove WiFi Controller

I don’t understand clearly your problem, I don’t know the model of your board, but if what you want is to setup the speed of the auger in each of the stages, in other words the speed of the pellets switch on the controller I think you should enter tpar, password, and auger menu and set on it

this is the technical manual for the NG01 hydro board

But if what you want is to see the speed of the pellets , I would try this command I50010000000000000

Hi all… Summer time is almost ended and maybe this winter would be possible to ellaborate some kind of solution to integrate our stoves with Home assitant without the 4Heat module that works really bad… Thank you all for your effort!

:shushing_face: I’m cooking something.

Seems like the main stove controller itself is… also bad.

When I’m just sending queries to it in a loop every x seconds, it sometimes completely stops responding until I turn it off and on again. One time it works for 30 minutes, another time it stops after one query.

When I just send all queries in one message, it responds to every other one.

Looks like they have everything implemented poorly. I think they are discarding RX data while transmitting and who knows what happens in it when I send my query at a wrong time. I’m currently playing with timing.

EDIT: For now it looks like waiting for each response + few ms delay is enough to not break it. So much about full-duplex communication!

EDIT2: I’m getting somewhere. I’ll release it hopefully in next few days.

2 Likes

@leoshusar
I think that the Tiemme board’s rs232 communication is half duplex communication, not full duplex.
When I send several queries in the same message to the board with a usb-rs232 converter I only get responses to the queries that reach the board when it is not transmitting,
For instance, if I send I30006000000000000I30005000000000000I30008000000000000I30009000000000000A20364000000000000A20493000000000000
I only get a response to 3 of the six
When the 4heat module sends several queries, it does so sequentially, it sends one wait for a response, then sends the next one,… and there is no delay
So I think it expects to receive the 0x0d and then sends the next query
There are no delays in queries A and short delays in queries B (state change) and very long if you have to use AT commands to on,0FF unlock for having an old board.
Result in the logic analyzer.

EDIT

Time
Time to send a query/response including 08 0D about 20 ms.
Delay between sending query B and response about 20ms.
If it is an old board and you have to use AT commands to turn off, turn on or unlock.
Delay between query 0x0d0x0a0x2b0x430x4d0x540x490x3a0x200x220x530x4d0x220x2c0x310x0d0x0a
and response
41 54 2b 43 4d 47 52 3d 31 0d
about 450 ms

Edit 2

As I said in my long post above, I think you have an old board model, in the 4heat setup to connect to internet, setup also configure 4heat for that specific board, so if you change the board model after setup it doesn’t work.

I don’t think the J commands work to turn on, turn off and unlock so I think you will have to use AT commands.

Are you interested in knowing the complete communication over rs232 to turn on/off/unblock?

I don’t know anything about Python programming, but since all commands have the same fixed data size, for instance 0x08I300060000000000000x0D 20 bytes/characters including 08 0D

Is it not possible that it waits for receiving that size before it begins to transmit?

2 Likes

@maxgu thanks! I wanted to get my own logic analyzer or oscilloscope for a long time now, but I was always delaying it and right now it would be really useful :smiley:

I mean I would at least expect it to not break completely when I’m sending data when it doesn’t expect to, but I guess that would be too much to ask.

I have implemented waiting for a response + 5 ms tx throttle and now it seems stable, it survived whole night.

Too bad ESPHome currently doesn’t support setting entities as unavailable, so when the controller stops responding (either it breaks or you turn it off), it will still report values to HA. And because HA stopped supporting NaN for sensors last month, setting NaN is not an option either.
But the controller, when it works, it works, so I guess it’s not a big issue now.

2 Likes

You all are working hard with it!! Thank you so much!!! We look forward to it!!

I have great news! We were finally heating yesterday so I was able to fully test my ESPHome integration. Everything works - and much better than the official 4Heat toy :smiley: I can finally query the state every 5 seconds and without getting timeouts lol.

I spent last few hours writing documentation. I used similar style to the official ESPHome one, so you should find it familiar.

you can find everything here: leoshusar/4heat-esphome (github.com)

Let me know if you find any issues.

Thanks to you all here who did the comms analysis!

4 Likes

@leoshusar Wonderful and great job, as I told you before, I don’t know anything about Python programming, I don’t have homeassistant nor esphome, I’ve only read the readme.md
I’m glad that the J commands to turn on, turn off and unlock work The unlocking works on my new board with the 4heat app.
I think it could be interesting to add the speed of the smoke/combustion fan I30008000000000000 , if it has flow control, air flow (Nr) must always be the same for each power, (P1=a,P2=b etc) and it is setup on the board through tpar. This air flow controls the speed of the combustion fan, and if that speed is not more or less constant it can say problems of the smoke duct.
About app 4heat “It also doesn’t report too often, only like once or twice per minute”
I think it does not polling, if you change a parameter through the display, for instance the power, its status is not updated in more than 20 minutes, it is only updated if you change a parameter through the app.
In other words, the data is fixed data from the last time you changed something. If you want to read the data updated, you have to go to the main page and enter again.
With the 4heat module connected, stove turned on by itself twice, to avoid this I put a cheap wifi socket

@maxgu Thank you for your kind words!

I haven’t tried the unlocking yet, because I haven’t got any alarm yet. But I assume it should just work, I’ll see. I have only verified the command is sent and the stove responds to it.

I can try the I30008 later, though the official module had neved asked for this one. Also I still don’t know what the Nr means, do you have any idea? I asked my engineer friend and ChatGPT and they both think this unit doesn’t mean anything :smiley: I think it’s from a MAF sensor, that would be g/s or kg/h. But I really have no idea.

If I remember correctly, the Android app polls the module every like 5 seconds or something like that, but the module asks the stove 1-2x per minute. I checked this with wireshark + RS232 sniffer.
I guess the 5 seconds polling is because when the module isn’t polled for some time, it tends to timeout more often (that was my observation). I ran a Python script which was sending the ["SEL","0"] command every minute and it was timeouting quite often. This wasn’t happening in the app which was spamming it very often. I then also tried every 5 seconds and it seemed more stable. But it still timeouted sometimes.

They just messed up the software part of it. And I’m quite sure about this, by looking at their Android app. It is using Ionic framework. You can pull the whole non-minified (readable) javascript from it and read the mess yourself. There are even commented out things like their local testing IP addresses and passwords, development test commands etc. Even part-time students in our company would write better code.
I get it, for their use case it might work fine, but IMO it doesn’t look good.

Finally if anyone is bored, here is a firmware dump from their module (they conveniently left a JTAG port on it): firmware.bin
I only zero-byted my WiFi credentials (address 3F806).
Playing with this is far beyond my skills, but maybe someone will know what to do with it :slight_smile:

I only found some OTA links in the strings section of the binary:

  • http://wifi4heat.blob.core.windows.net/wifi4heatblobs/radio_v1973/m2m_ota_3a0.bin
  • http://%s/api/firmwares/micro/lastVersion?deviceKey=
  • http://%s%s%s/api/firmwares/wifi/lastVersion?deviceKey=

EDIT: I tried I30008 and I’m getting some values, they indeed are changing with the fan speed. It’s currently sitting at 190 RPM(?) in ignition state.

@leoshusar Briefly, before answering you I have done some tests and I have seen that I have made a mistake, the command to see the instantaneous speed of the combustion fan is I30025.
For instance, if you send I30025I000000000000 and receive J30025000000001800
You can see on the display Fan 1800, meaning 1,800 r.p.m.
Regarding Nr, about manual picture, I think that it must be that it is not a standard unit of measurement, like Tiemme does not use m/s or another standard measurement unit but has made its own, unit that is is why Tiemme says Nr., Its value is between 0-2,000.

For instance, if you send I30026000000000000 and receive J30026000000000400, you should see 400 on the AirFlow/Fl display in Tiemme units. Since I do not have Air flow control, I can not test it.

About unlock command J30255000000000001,It only works on J30001000000000009 block does not work if J30001000000000007 extinguishing.

Regarding updating data in the 4heat app, I have done a very simple test, I open the app, 4heat I manually change several parameters: power, temperatures (heating sensors) and nothing changes in 20 minutes, it seems as if the 4heat module do not send any status changes to azzure

EDIT
On post 186 you can download the NG01 Hydro manual, there you can see more examples of what NR means for Tiemme that is without unit of measeurement
I have done all update tests connected the 4heat and the Android smartphone to the same Wi-Fi , the first tests updating data, stove were OFF. Now another test, I turn on the stove using 4heat, Check appears, I change by display parameters, nothing happens, after 5 minutes I returns to the main page, and I enter the stove again, all the parameters are updated and it shows ignition.,same happens is I change any parameter with app
I think normal values would be 1190,2190,1900. not 190. Does the application allow more than 3 digits to be displayed? Another value that may need four digits is the airflow.
In each of the stages the combustion fan has different values that are defined on page 38, TP02, V01-V24, but which are adjusted by the values on page. 43/44 TP16 FL22-FL30.
The speed of the combustion fan is adjusted to reach the value belonging to the FL of each stage, so main parameter is FL.
I think the command I30008 is not useful but its meaning could be the values V01/V24.
Through rs232 you can get more data than with the official application, but I think it could be interesting some data that you can see on the display

Edit

The air flow sensor is in the fresh air intake tube,

I recently bought a Godin Artemis pellet stove and it uses this stuff. Unfortunately the provided code from the integration do not work so I did a fork with the specific codes that match the Artemis.


MODE_TYPE = "30001"
ERROR_TYPE = "30002"
POWER_TYPE = "20575"
ROOM_TYPE ="50006"
CONSERVATION_TYPE="50138"

STOVE_TYPE = {
    "GODIIN PELLET STOVE": [564, "GODIN", "ARTEMIS"],
}

 SENSOR_TYPES = {
    "20801": ["Heating power", None, ""],
    "20118": ["Service Time", TIME_HOURS, ""],
    "20119": ["UN 20119", None, ""],
    "20364": ["Combustion", None, ""],
    "20369": ["UN 20369", None, ""],
    "20493": ["Room temperature set point", TEMP_CELSIUS, ""],
    "20570": ["UN 20570", None, ""],
    "20575": ["Heat Power", None, ""],
    "20614": ["UN 20614", None, ""],
    "20638": ["UN 20638", None, ""],
    "30001": ["State", None, ""],
    "30002": ["Error", None, ""],
    "30003": ["Timer", None, ""],
    "30004": ["Ignition", None, ""],
    "30005": ["Exhaust temperature", TEMP_CELSIUS, ""],
    "30007": ["Inputs", None, ""],
    "30011": ["Pellet dropping", None, ""],
    "30012": ["Puffer temperature", TEMP_CELSIUS, ""],
    "30017": ["UN 30017", TEMP_CELSIUS, ""],
    "30020": ["UN 30020", PRESSURE_MBAR, ""],
    "30025": ["Fan speed rpm", None, ""],
    "30026": ["Fireplace", TEMP_CELSIUS, ""],
    "30033": ["Exhaust depression", PRESSURE_PA, ""],
    "30142": ["Contrast", None, ""],
    "30143": ["UN 30143", None, ""],
    "30144": ["UN 30144", None, ""],
    "50006": ["Room temperature", TEMP_CELSIUS, ""],
    "50046": ["UN 50046", None, ""],
    "50053": ["UN 50053", None, ""],
    "50138": ["Room termostat", TEMP_CELSIUS, ""],
    "50139": ["UN 50139", None, ""],
    "50140": ["UN 50140", None, ""],
}

there are values which I did not understand what theyy were, so I assume this is parameters as this is not moving at all when I switch it on / off.

here is a snapsot:

I gave up adding the cloud connection as there are no interesting information and 4Heat has already Alexa and Google Home native integration that works fine to switch on/off

What RS232 module do you reccomend for esp32, can you show me example?
cause I found only usb to rs232

@bbday Look for TTL <-> RS232 modules. I used this one based on MAX3232.

You will definitely find it somewhere from your local reseller too, in my country they are for like $0.5.

@maxgu interesting findings!

It seems like my stove maybe has the combustion fan tachometer on a different ID. 30025 was returning zero for me. Or it might not be exposed at all.

We aren’t heating today, but I managed to try it yesterday for a few minutes. The 30008 value definitely matches the airflow amount:

But the value is interesting. I think either it’s divided by 10 or a PWM? The highest I’ve seen was 240, PWM max is usually 255…
image

Look at this video - they’ve got some software called SYSTEM PRO and in the bottom graph there is a combustion fan with values matching mine.
I wish we could find this software… I don’t see any download link, so it might not be for consumers.

I have a noob question not sure if someone can help with. I use the 4hest controller on a climat600 controller that takes care of my Flor heating system.
How do i get the id to control the variables as outdoor temp/ mixing temp for flor heating/ temp cold water/temp warm water?

I tried to get the system working with the 4 heat module but as you all can imagine with the same success as you on a stove.

Regards

Dom

@leoshusar Tiemme tachometer works as a hall effect sensor, according to the number of magnets that has the combustion fan disk, you can setup parameter Tp02 P29. (usually 1)
Password Burnit may be 1914
In my first tests SY100 VS NG01 I saw that they work very different.
I also think that it is very difficult to make an application compatible with all motherboards. In your excellent work, you have planned to setup the program very easy for each motherboard.
To avoid problems, the steps I would make before loading the program to esp would be:
Step 1 parameters that I want the application has
Step 2. Commands A,B,I,J that control those parameters
Step 3 Send those commands with a cheap RS232 USB module and see if they work and match the values on the display.
Step 4 Setup your program with those commands
Step 4 load program to esp.
What do you think?
About the SYSTEM PRO program
Manual

I have made a fast reading, it looks that need to have Tiemme hardware and it works over the internet (EVO)
If you get the SYSTEM PRO program, do you think you can use it locally and with your own hardware?

EDIT
I think that the values of the combustion fan and the air flow in your stove match is a coincidence , check that the value of 30008 and the reading on the display match.

                                                          xxxxxxxxx

Snap1202
I think that the 4heat module only works with Tiemme controller boards, if the climat600 controller is not made by Tiemme I think it is impossible that it works.

EDIT
Sorry, you said climat600, and Tiemme makes clima600.
I think your 4heat app is the same as for the stoves, if so I would see the rs232 traffic between the board and the 4heat module, and from that traffic try to get id, or sniffer traffic 4heat azzure
From these German links I think you can have more information than from Tiemme
german manual and video clima600

german and english manual clima500

Edit
Here you can see a lot of ID, called sensor types

So you can check what ID’s work on your board and its meanings, with a usb rs232 module

Climat 600 is made by tiemme so it works but i dont get the system to stay online longer than a few hrs. So iam constantly resetting the wlan module but nothing helps. Would love to implement my floor heating mix temp into HA.

Attached a link to the controller (500 600 has apparently just a different housing)hope it’s allowed

@maxgu yes, that was exactly my plan, to not hardcode any value IDs to any names, because they might be different on different models. Also when you for example set up external room thermostat, you don’t need the internal thermostat settings etc.

I didn’t think of looking at the display, I did now. There are these values - I added (x) to those I’m missing in my app currently:

  • Combustion fan [V]: 190 (so the 30008 value would be Voltage… interesting)
  • Auger: ON / OFF (x)
  • Igniter: ON / OFF (x)
  • Water pump: ON / OFF
  • Airflow: 628
  • Exhaust temp [°C]: 61
  • Water temp [°C]: 23
  • Input IN2: 1 / 0 (x)
  • Input HV1: 1 / 0 (x)
  • Input HV2: 1 / 0 (x)

I will try those missing ones later, I don’t want to have missing values in my graphs due to OTA update :smiley:
I would also like to implement some kind of “send custom command”, for these debugging purposes, I’ll see when I have time for it.

And here is a new piece of graph of the fan and airflow (still wrong RPM unit):

@leoshusar I have made a fast reading, it looks that need to have Tiemme hardware and it works over the internet (EVO)
If you get the SYSTEM PRO program, do you think you can use it locally and with your own hardware?

You can setup the combustion fan by r.p.m if it has a tachometer or by Volt if it does not have. Parameter P25 Tp02. what does the display show 4digit or 3?
Auger setting: TP01 P05 Period total time, C01/C12 time each stage, for instance if P05 =10 (10 sec) C03 =3 3 (sec) Power 1, Auger is on 3sec OFF 7 sec, if C08 =5 power 6 Auger is On 5sec Off 5sec.
What do you want to see how it changes ON/OFF?
About igniter is a resistor that heat pellet to begin ignition so is on when exhaust temperature is below of a parameter and OFF the rest of time

About Input IN2: 1 / 0 (x) Input HV1: 1 / 0 (x) Input HV2: 1 / 0 (x), H1,H2 another problem Tiemme as Nr.
If you look at the electrical connections diagram, you don’t see HV1 nor HV2 , but if you go alarms you can see HV1 HV2, pins 11,12,13, they are normally closed (pressure switch, thermostat), if it opens HV1 error ER 01, HV2 error ER 02
see Manual 3.4 Alarm.
About IN2 is a configurable input setupTP08 P77, configuration values page 9.
I would see how P44…P82 is configured, and even in spring see what is connected to those inputs
l think can be usefull you see post 21 and download the last file, which is zip, open it and 4heat commands appears - cleaned.txt

EDIT
As it so strange for me that your combustion fan works by Volt, I have reviewed the P25 again.
If it is 0 it is clear that it is regulated by Volts, but the difference between 1 and 2 is that when it has an error in one case 1 you have to clear cause of bad reading and in 2 changes to 0 and it works as a voltage.
So please see which is the value of P25 on your stove.
Solved comands if combustion fan works by volts command I30025000000000000 is 0, and command 3008 is setuo value for this state
4heat app has a list of last errors… Is there any Er07 0 Er08?

EDIT
If a number does not appear in auger on the display even 0 if stove is stop , which are the seconds (C01…C12), it is because P81 is not 0, then auger control is by r.p.m not by time

So i cuttet the rs232 cable in half an added a pcb in between so i have some points to grab rx and tx.
Unfortunately i dont have a data logger at my current place.Someone a good idea to sniff the communication maybe with the help of an esp8266 and max323 board?