De Dietrich Boiler integration - MODBUS

Hi, I wonder if it is possible to integrate a De Dietrich fuel boiler?
The boiler is driven by A diematic 3 regulator, modbus capable.

Here is my configuration part :

sensor:
 - platform: modbus
   scan_interval: 10
   registers:
     - name: Sensor1
       hub: GTU120
       slave: 1
       register: 18
       register_type: holding
       unit_of_measurement: °C
     - name: Sensor2
       hub: GTU120
       unit_of_measurement: °C
       slave: 10
       register: 18

And

modbus:
  name: GTU120
  type: tcp 
  host: 192.168.1.230
  port: 20108

I do not know what slave number to choose, that’s why I tried different ones.

The boiler is connected to my network via a USR-TCP232-304 module, which seems to “see” my HA :

I tried “rtuovertcp” instead of “tcp”, but no luck, the sensors display “unavailable”.

Slave, if not configurable, is 1 as default (It has to be specified in the UG od Dietrich Boiler)

Try to define data_type by default it is int

With :

sensor:
 - platform: modbus
   scan_interval: 10
   registers:
     - name: Sensor2
       hub: GTU120
       slave: 1
       register: 59
       register_type: holding
       data_type: integer
     - name: Sensor1
       hub: GTU120
       unit_of_measurement: °C
       slave: 1
       register: 18
       register_type: holding
       data_type: integer

I got the following error :

   Invalid config for [sensor.modbus]: value is not allowed for dictionary value @ data['registers'][0]['data_type']. Got 'integer'. (See ?, line ?). 

Not integer but int

Response representation (int, uint, float, string, custom). If float selected, value will be converted to IEEE 754 floating point format.

My modbus thermometer does not work with int but uint and my config:

    - name: MBF_MEASURE_TEMPERATURE
      hub: bazen
      slave: 1
      register: 262
      register_type: holding
      data_type: uint
      unit_of_measurement: °C
      scale: 0.1
      precision: 1

Ok Thanks for your interest.

I tried int, uint and float, and nothing worked :

sensor:
 - platform: modbus
   scan_interval: 10
   registers:
     - name: Sensor3
       hub: GTU120
       unit_of_measurement: °C
       slave: 1
       register: 18
       register_type: holding
       data_type: float   
     - name: Sensor2
       hub: GTU120
       slave: 1
       register: 59
       register_type: holding
       data_type: int
     - name: Sensor1
       hub: GTU120
       unit_of_measurement: °C
       slave: 1
       register: 18
       register_type: holding
       data_type: uint

Do you have MODBUS properly connected? i.e. A - A and B - B
Do you use the right register address?
Do you have a registers description available?

Yes because I got the communication working through a website on an apache server.
Besides, I have a table for the values :


and modbus doctor (I dont know how to use it) seems to read data :

Do not see register addresses, it is usually in HEX format, it might be even in DEC.
You should see register value either in INT (no decimal point) if reading the whole register value or in BIN ( i.e. 1/0) if you need to read particular bit(s) of the register.

I use AVReporterModbus Communication Tester to verify if the given registry addresses are correct and as well as their format.

I see following in ModbusDoctor while reading one of “my” values, it is for temperature 10.62 C from register 258

I just tried with your soft, but nothing changed.
Thanks anyway.

Thanks to your soft, I got informations !!!
For example, register 4 and 5 display the time : 12:54

Putting slave to “10” helped !
And Device type to “Modbus RTU Device”

Glad to help.
All is about proper settings :wink:

Last thing to do is to get those values in HA. For the moment, the sensors are still “unavailable”.

You have to set up Hassio modbus i.a.w. Connection Parameters (as displayed in AVReporter…)
See here how to set up serial connection.
After that config sensors for required registers.
Something like this:

sensor:
  - platform: modbus
    scan_interval: 120 # in seconds
    registers:
    - name: hours 
      hub: dietrich_boiler
      slave: 10
      register: 4
      register_type: holding
      data_type: uint  # or  int
    - name: minutes 
      hub: dietrich_boiler
      slave: 10
      register: 5
      register_type: holding
      data_type: uint  # or  int

It’s not a serial connection : I have a USR-TCP232-304.
I tried with “rtuovertcp” but it did not the trick.

On your printscreens AVReporter reads in “Modbus RTU Device” mode
Could you provide your modbus config file?

Here it is :

modbus:
  name: GTU120
  type: tcp
  host: 192.168.1.230
  port: 20108

I tried this version too :

modbus:
  name: GTU120
  type: rtuovertcp
  host: 192.168.1.230
  port: 20108

But the sensors still remain unavailable :

sensor:
 - platform: modbus
   scan_interval: 10
   registers:
     - name: Sensor3
       hub: GTU120
       unit_of_measurement: °C
       slave: 10
       register: 4
       register_type: holding
       data_type: int   
     - name: Sensor2
       hub: GTU120
       slave: 10
       register: 5
       register_type: holding
       data_type: int
     - name: Sensor1
       hub: GTU120
       unit_of_measurement: °C
       slave: 10
       register: 4
       register_type: holding
       data_type: float 

modbus:
  name: GTU120
  type: rtuovertcp*
  host: 192.168.1.230
  port: 20108

*type can be, based on the documentation, tcp or serial, serial method can be ascii or rtu
You have to try various settings combinations or change converter’s setting or converter itself.

Nice Quick tutorial on RS485 and MODBUS

Furthermore, based on USR-TCP232-304 user guide there should be used port 1 (?) while connected via ethernet. Some settings might be adjusted via USR-TCP323-304 webUI

Try to use any port scanner to find the active port on your USR-TCP323-304.

Hi,
I think you are not using the correct setup. Your USR-TCP232-304 should give you the capability to create a serial port on your server so that the modbus traffic will be forwarded threw your network to you remote serial connexion (USR-VCOM).

Your setup would be correct with this kind of equipments: [Moxa Mgate] which I use in my professional environment. I don’t know if RTU protocol will work with your setup.

So your conf file should be:

modbus:
  name: hub1
  type: serial
  method: rtu
  port: <your remote serial port defined on the server>
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N

I am currently migrating my modbus de dietrich connexion from Domoticz to Home assistant from a direct serial connection. Reading is working fine. Now i am about to test the writing.

I don’t know what is a USR-VCOM, but I tried your configuration, with port: 20108, but no communication established.
Here are my settings of the USR :

I think the method “rtu” is not the adapted one for my USR…

Thanks for your interest.