Tiemme 4Heat Stove WiFi Controller

I don’t understand either… The wiring is right. Data arrives if I disconnect gnd from RS232 and reconnect it again. No data updates after that except if I disconnect - reconnect the gnd again. Mini MAX232 board changed. Wemos changed and still the same behavior… I’m on a dead end

Hi, was busy with other projects and didn’t have notifications. I’ll try to address few historical things here.

Firstly, if you are using my ESPHome integration, you can set ESPHome debug level to verbose like:

logger:
  level: DEBUG

and it will print all sent and received data as HEX strings. This will surely help with some debugging.

@maxgu

I know about these commands, they were always sent by the original WiFi module after powering it up:

C10000000000000000
-> D10000SYEVO0000562

E10001000000000000
-> F10001000000000001

G10000000000000000
-> H10204030921000069

Here is a longer graph of combustion fan [V] and air flow:

those values really match what I see on display.


Sorry, when I said J30004, I actually mean I send I30004 etc. :slight_smile: And the J50001 I found here. If I remember correctly, I was receiving values like:

J50001000000000300
J50001000000000500
J50001000000000600

but I’m not sure now. Maybe it was this?


But I haven’t dug into that deeper.


About alarm messages - I used all of them from the original HA integration, because I thought maybe my manual is missing some of them, but later updated it and used only those from my manual.


@ilgio Sorry, I don’t know if BM250 will work. You can try to build the RS232 sniffer I posted few posts above, or directly send some commands to it and see if it responds. You can use @jorgezazo wiring below your post.

help. It seems to me that no one has managed to integrate Tiemme stoves without 4heat. Does the integration work with the 4heat module instead?

There’s an integration to manage 4heat module… Is near the beginning of this thread.

Ok. Let’s summarize my current situation.

The ESPHome integration created by @leoshusar works fine with my stove, BUT the commands are not what my stove understands. Curiously, the ones that don’t work are the ones that change things in the stove settings (energy management, off, on and everything useful to manage the climate in my house). So, I’m getting a 4HEAT module to monitor those useful commands and use them in the ESPHome module… and share them with everyone here hoping they’ll be useful…

jorgezazo

I’m glad that it works.

Looks as you have an old board, in my Spanish manual I say that in the old boards the turn ON/OFF and unlock commands are AT Hayes commands, and also say how they work

The only one thing that I don’t know is set power , and set room works with another command( not AT Hayes).
So if you can send the AT Hayes commands, I think the only thing you couldn’t do is change the power.

In other words I think you have troubles with legacy commands

Tray to send the 2 commands AT with a delay 1000ms y see what happens

EDIT

With the 4heat module and the SY100 board I can only turn on, turn off and change the room set temperature

But with the usb rs232 converter, I can send other commands as you see in the picture sent.

EDIT 2
I don’t clearly understand what is the problem .

Can you manually set Room temperature point or not?

In my test manual I say that on old boards Room temperature set point is not A20493000000000000 but A21700000000000000.

If you can manually see the temperature of the room, but it can not work as a thermostat, then I think you have to enter tpar, by the way, password to enter tpar can be 1357.

In other words I think that if sombody changes leoshusar’s excellent program, and turn ON/OFF and unlock is done by sending the first AT command with a delay of 1000ms and then the second AT command (ON,OFF or unlock) this program would work with old and new boards except setting room temperature that command (Not AT) should also be changed

EDIT3
What can you do with the official 4heat app?
Turn on/off etc

leoshusar

About I50…

I think respond values are of your picture C03… and they should match Auger on the display

Hi Maxgu.

I installed the 4HEAT module and… is terribly bad done… and the application has a lack of User Experience and User Interface “lo más grande” but well, it is what it is. I can manage the power stove with it, so I will build the @leoshusar logger to watch the RS232 traffic and get what exactly is going on with those commands.

I was able to instantiate one “complex” component and manage the target boiler temperature from the ESPHome succesfully, so I hope to be able to manage the heating power of the stove too.

The main goal is to manage the climate of the average temperature of the whole house by the heating power managing and reduce the pellet consumption drastically. The auto mode based on water temperature is horrible and uses 15 kg of pellets daily. If I set the power to “3” then it uses about 10 kilos but is too hot in the house abouve 22 degrees centigrades and I want to set a value of 21 but it isent able with the default temperature control. That’s something I can do by programing some Home Assistant’s scripts.

Thank you so much for your effort!!!

Hi maxgu.

At last have got the ESPHome module connected and working. I’ve been talking with @leoshusar through the issue github system of his project and after some clues from him, I got the right commands to fill my yaml configuration file and make all work. Next step is to create a protoboard with all components soldered into it and an appropiate cage to fit all in. I’m planning too adding a relay to use the thermostatic port to stop the stove and connect all to alexa to control climate with the voice… Home assistant is fantastic and all its ecosystem is incredible powerfull to connect all.

I attach an image of actual web server showing the state of stove and the yaml file where all commands are set into components.

esphome:
  name: hidroestufa
  friendly_name: Hidroestufa

esp8266:
  board: esp01_1m

# Enable logging
logger:
  level: DEBUG
  hardware_uart: UART1

# Enable Home Assistant API
api:
  encryption:
    key: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ""
    password: ""

#captive_portal:

web_server:
  port: 8008
  local: true
    
external_components:
  source: github://leoshusar/4heat-esphome

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

fourheat:

switch:
  - id: state_switch
    name: State
    platform: fourheat
    restore_mode: DISABLED
    datapoint: J30001
    on_datapoint: J30253
    off_datapoint: J30254
    on_data: '1'
    off_data: '1'
    parser: |-
      if (id(state) != 0) {
        return true;
      } else {
        return false;
      }

binary_sensor:
  - id: water_pump_state
    name: Water pump state
    platform: fourheat
    datapoint: J30084

  - id: stove_offline
    name: Stove offline
    platform: fourheat
    type: module_offline
  
sensor:

  - id: exhaust_temperature
    name: Exhaust temperature
    platform: fourheat
    datapoint: J30005
    device_class: temperature
    unit_of_measurement: °C

  - id: boiler_temperature
    name: Boiler temperature
    platform: fourheat
    datapoint: J30017
    device_class: temperature
    unit_of_measurement: °C

  - id: water_pressure
    name: Water pressure
    platform: fourheat
    datapoint: J30020
    device_class: pressure
    unit_of_measurement: mbar

  - id: puffer_temperature
    name: Puffer temperature
    platform: fourheat
    datapoint: J30026
    device_class: temperature
    unit_of_measurement: °C

  - id: combustion_fan
    name: Combustion Fan Speed
    platform: fourheat
    datapoint: J30008
    device_class: speed
    unit_of_measurement: rpm

  - id: combustion_power
    name: Combustion Power
    platform: fourheat
    datapoint: J30011
    device_class: power_factor
    unit_of_measurement: ""

text_sensor:
  - id: state
    name: State
    platform: fourheat
    datapoint: J30001
    options:
      0: "OFF"
      1: "Check Up"
      2: "Ignition"
      3: "Stabilization"
      4: "Ignition"
      5: "Run"
      6: "Modulation"
      7: "Extinguishing"
      8: "Safety"
      9: "Block"
      10: "Recover Ignition"
      11: "Standby"
      30: "Ignition"
      31: "Ignition"
      32: "Ignition"
      33: "Ignition"
      34: "Ignition"

  - id: error
    name: Error
    platform: fourheat
    datapoint: J30002
    options:
      0: "No"
      1: "Safety Thermostat HV1: signalled also in case of Stove OFF"
      2: "Safety PressureSwitch HV2: signalled with Combustion Fan ON"
      3: "Extinguishing for Exhausting Temperature lowering"
      4: "Extinguishing for water over Temperature"
      5: "Extinguishing for Exhausting over Temperature"
      6: "unknown"
      7: "Encoder Error: No Encoder Signal (in case of P25=1 or 2)"
      8: "Encoder Error: Combustion Fan regulation failed (in case of P25=1 or 2)"
      9: "Low pressure in to the Boiler"
      10: "High pressure in to the Boiler Error"
      11: "DAY and TIME not correct due to prolonged absence of Power Supply"
      12: "Failed Ignition"
      13: "Ignition"
      14: "Ignition"
      15: "Lack of Voltage Supply"
      16: "Ignition"
      17: "Ignition"
      18: "Lack of Voltage Supply"

number:
  - id: boiler_target_temperature
    name: Boiler target temperature
    platform: fourheat
    datapoint: B20180
    device_class: temperature
    unit_of_measurement: °C
    min_value: 50
    max_value: 90
  
  - id: set_boiler_minimum_temperature
    name: Boiler minimum temperature
    platform: fourheat
    datapoint: B20005
    device_class: temperature
    unit_of_measurement: °C
    min_value: 55
    max_value: 65

  - id: set_boiler_maximum_temperature
    name: Boiler maximum temperature
    platform: fourheat
    datapoint: B20006
    device_class: temperature
    unit_of_measurement: °C
    min_value: 75
    max_value: 80

button:
  - id: clear_error
    name: Clear error
    platform: fourheat
    datapoint: J30255

select:
  - id: power
    name: Power
    platform: fourheat
    datapoint: B20816
    options:
      1: "P1"
      2: "P2"
      3: "P3"
      4: "P4"
      5: "P5"
      6: "Auto"

After soldering all components into breadboard, I will upload a photo to show you how it looks.

Thank you very much for all your help

jorgezazo

From the conversation on github, I don’t know if you have a problem with the temperature of the water pump, if you want to change the temperature that water pump starts I think you should have to enter tpar and enter the password, that may be 1357

To see how to enter the tpar

https://www.solarweb.net/forosolar/usuarios-biomasa/55522-reseteo-clr-st2-estufas-ferlux-eider-4-botones-etc-electronica-tiemme.html

MB100 board page and I think the parameter to change is th19

Regarding the turn on and turn off commands, Does J commands work?
.

Edit

if you have puffer there is another water pumb Th59, and as you can see this manual is similar to NG01 manual, that you can find.

EDIT2

As I said before, my official Tiemme 4heat app on my old Tiemme board does not allow me to change the power, so the new command does not work

Edit3

I don’t have a hydro, but I think that by programming if the stove has a room temperature probe, the switch to modulation , you can choose that if it reaches the room temperature it goes to modulation and if the water temperature reaches the temperature as well. , and if the stove does not have a probe you can put a 10K NTC probe.

From your photo it seems that you have free pin 17 pin 18, if you put a probe and configure P74=4 you already have a room temperature probe, and if A01=1 when it reaches the room temperature it goes to modulation.

Since I don’t know anything about hydro, maybe another A1 should be selected.
From Mb100 board manual

I have chosen pins 17 16 IN2 because it says that a probe goes to those pins and they are free, if it does not work we would have to use the IN5 input Pin 24 Pin 25 and P70=15, and even I should try if it posible put P74=15

EDIT4

See if the black cable Pin 24 Pin 25 goes to the external socket to connect the thermostat, see if P70=4, if that happens I think that if you change P70=15, you have converted that thermostat input to a probe input, and it should appear on the menu TA

So if you want to have also a thermostat you can use pin 17 and 16

New Menus

EDIT 5

Briefly forget everything I said about pin 17 and 18 because I think the official wiring diagram of the MB100 board is wrong. if the black cable Pin 24 Pin 25 goes to the external socket to connect the thermostat, see if P70=4, if that happens I think that if you change P70=15, you have converted that thermostat input to a probe input, and it should appear on the menu TA, I would put a temperature probe and I would not change anything and maybe you can set that temperature through home assistant, commands A20493000000000000 or for old boards A21700000000000000 and see it matches to tA display

EDIT6
About probe if you search for example on Aliexpress temperature probe ntc 10k, you will find many with different look

https://www.aliexpress.com/item/32800546643.html

Edit 7

From this link you can download the technical manual for the Tiemme MB100 hydro board

1 Like

Hi all,

First of all Thank you guys all the effort and the amazing work, what you did. I appreciate it.

As I mentioned before I have a Clima600 board to manage the heating and the domestic water circle. With the above mentioned solution I finally managed to communicate with the board and get some data and functionality but as because it is a different board it has relative different sensor options. My question is that, how can I scan all of the sensors to get all of the possible ones? I have a wemos d1 mini board with a limited capacity and only can handle maximum 30 sensor in one time but I’d like to write something which can scan all of the datapoints. Maybe could you guys help me in it? Maybe can somehow create a loop in esphome which can scan the possible sensors?

Thanks in advance.

Hi, I use your fork of 4Heat, but I saw that with ESPHome you managed to do better =) could you provide a diagram to create the hardware part? Thank you.

p.s. my board is a tiemme SY400

carloda
The hardware is:
ESP module, it can be an ESP 8266 or ESP32
RS232 UART converter module,
Four-wire RJ11 6P4C cable.

The esp module pinout Rx,Tx Gnd and Vcc according to the esp module model, the converter Rs232 Uart pinout according to the converter rs232 Uart module model.

The diagram was already told to jorgezazo before but here you have a picture,Rj11 cable the red wire is Tx and the green wire is Rx, the plug/socket pinout is the the Tiemme controller board plug

Edit:
Hardware
You also need a power supply for supply esp module, as you use with 4Heat module

1 Like

Hi, I apologize if the question is stupid but I can’t find a solution. How can I view more sensors from the 4heat integration in addition to the ones that it loads automatically?

@maxgu Hi, I redid the diagram to see if I understood, is this correct? Thank you

@carloda

You have understood it perfectly.

It is an excellent diagram for those who choose as hardware a wemos D1 mini module, that rs232-uart converter and a Rj11 socket.

As the cable between the Rj11 socket on the Tiemme board and the Rj11 socket on the new device has only four wires, so only pins 2,3,4,5 are connected between them, you don’t need connect pin 1 to ground, but of course you can do it.

Also as the ttl-rs232 converter can be powered at 3V-5V, you can choose the 3.3V pin instead of the 5v.

.From this link you can see the specifications of the module, see the differences between the two rs232 TTL converter modules and even buy them

https://es.aliexpress.com/item/32583463529.html

I would not use the mini converter rs232 ttl (that it hasn`t holes and you can’t put pins in it) because Jorgezazo has had serious problems with it, see post 239

Edit

Edit

Italian technical manual Sy400 Tiemme board

https://stufapellet.forumcommunity.net/?act=Attach&type=post&id=436577573

My tests in spanish including the wiring diagram for the esp32 dev

https://www.solarweb.net/forosolar/attachments/usuarios-biomasa/32063d1731127183-comunicacion-rs232-modulo-wifi-4heat-tiemme-comunicacion-4heat-rs232.docx

EDIT

How I would make this device.

Picture 1 Hardware
1 case
2 wemos
3 rs232 uart converter
4 micro usb female cable or micro usb male female cable, if you power the wemos through pins or plug micro usb
5 rj11 female cable
6 PCB
7Pin male female for not soldering Wemos and rs232 uart converter to the board.

Picture 2
With micro usb female cable, it uses wemos pin power

Picture 3a,3b
Both sides with micro usb male female cable, wemos power through micro USB socket

Picture 4a-4b Final result both sides.
You can buy all the components, for instance in Aliexpress.

Finally one question, can I use your excellent diagram?

2 Likes

If you use esp32 you will get this issue:

error:

In file included from src/esphome/components/fourheat/helpers.h:3,
from src/esphome/components/fourheat/helpers.cpp:1:
src/esphome/components/fourheat/common.h:8:37: error: ‘optional’ is not a member of ‘std’
using parser_t = std::function<std::optional(const std::vector<uint8_t> &)>;
^~~~~~~~
src/esphome/components/fourheat/common.h:8:37: note: ‘std::optional’ is only available from C++17 onwards
src/esphome/components/fourheat/common.h:8:37: error: ‘optional’ is not a member of ‘std’
src/esphome/components/fourheat/common.h:8:37: note: ‘std::optional’ is only available from C++17 onwards
src/esphome/components/fourheat/common.h:8:47: error: template argument 1 is invalid
using parser_t = std::function<std::optional(const std::vector<uint8_t> &)>;

to fix this need edit config:

esphome:
platform: ESP32
board: nodemcu-32s
platformio_options:
build_flags:
- “-std=gnu++17”
build_unflags:
- “-std=gnu++11”

I have strange issue:i get data only on startup then i dont get any status update:

[17:01:46][C][uart.arduino_esp32:124]: UART Bus 1:
[17:01:46][C][uart.arduino_esp32:125]: TX Pin: GPIO17
[17:01:46][C][uart.arduino_esp32:126]: RX Pin: GPIO16
[17:01:46][C][uart.arduino_esp32:128]: RX Buffer Size: 256
[17:01:46][C][uart.arduino_esp32:130]: Baud Rate: 9600 baud
[17:01:46][C][uart.arduino_esp32:131]: Data Bits: 8
[17:01:46][C][uart.arduino_esp32:132]: Parity: NONE
[17:01:46][C][uart.arduino_esp32:133]: Stop bits: 1
[17:01:46][W][fourheat:186]: Response timeout, retrying (2/3)
[17:01:46][W][fourheat:189]: Response timeout, giving up
[17:01:46][W][fourheat:192]: Clearing command TX queue, because the module can reappear in an unknown state
[17:01:46][D][binary_sensor:036]: ‘Stove offline’: Sending state ON

Hi. That’s something that happens to me too. Some command from your yaml code is blocking stove’s communication. Clean all and start adding code command to command until you can localize the one that cause the problem. In my case the stove’s RS232 module got blocked until I use the original 4HEAT module to restart communications.

Hi all… After many, many days searching information about MAX2323 mdule overhating problem, I reach to the conclussion that some of these modules are unstable. Connecting them to a 5V power suply, they overheat A LOT and stop working. I thought it was due to a faulty Wemos device, but after tenths of tries, I reach the conclussion that the module is the faulty thing. Some says that connecting them to a 3.3V is the solution, but some times it works, some don’t… too low voltage and not very good components.

Any of you have the same problem?

Here some articles about the overheating problem:

In amazon, I found the exact components and many clients complains of the same behaviour. Look for the reviews here:

Here there’s a possible solution re-soldering some capacitors:


Hi Maxgu.

I’m looking for that MAX3232 modules that are shown in your pictures. All I bought are faulty if are connected to 5V suply. They suffer an extremely high overheat. If I connect to 3.3V they work sometimes only due to a low voltage I guess. Could you tell me where get them? All I can find is the same crap I bought.

One more thing. I wrote a new post before this one with some info about the MAX3232 overheatting problem. Please, take a look and tell me what do you think abou it.

Thank you in advance.

Edit:

After a long waiting time I could get a different model of a MAX3232 module. This was critical, the quality of cheaps modules are incredibly faulty. After that, the Wimos D1 worked like a charm and no more problems haver ocurred in the last week.

This is the link:

https://es.aliexpress.com/item/1005004999071671.html?spm=a2g0o.order_list.order_list_main.47.65f0194dRFT1bZ&gatewayAdapt=glo2esp