Waveshare Modbus-gateway - help needed

Hi community

I recently got a new heating-system where the values can be read via Modbus. I installed the corresponding module from Siemens WZU-485E-MOD, please find here the manual including register-types: https://emoteek.net/wp-content/uploads/2022/03/TM_Siemens_Cpts_Acc_WZU-485E-MOD_MAR_2022_DE.pdf

I also installed the Waveshare 4-CH RS485 to ETH (B) 4-CH RS485 TO POE ETH (B) - Waveshare Wiki gateway. I created a basic yaml, however the values don’t update and after several hours of research, Chat GPT etc. I cannot find the reason why the values don’t update.

Please find below the configurations and my findings:

Modbus-module:

Waveshare Modbus-gateway:



What I have tried so far

  • ping 192.168.1.120 which worked fine

The Vircom-App shows TXD and RXD-activity

test connection via port 502 through powershell


Modbus Poll cannot connect, timeout

  • Red LED on modbus-card blinks indicating data is flowing

config.yaml

modbus:
  - name: waveshare_gateway
    type: tcp
    host: 192.168.1.120
    port: 502
    delay: 1
    message_wait_milliseconds: 30
    timeout: 5

    sensors:
      - name: "Fernwärme Energieverbrauch"
        slave: 2
        address: 13          # 0x4000F
        input_type: holding
        data_type: uint32
        unit_of_measurement: "MWh"
        scale: 0.000001      # Wh → MWh
        precision: 2

      - name: "Fernwärme Monatsverbrauch"
        slave: 2
        address: 19          # 0x40015
        input_type: holding
        data_type: uint32
        unit_of_measurement: "MWh"
        scale: 0.000001      # Wh → MWh
        precision: 2
        
      - name: "Fernwärme Seriennummer"
        slave: 2
        address: 31       
        input_type: holding
        data_type: uint32
        unit_of_measurement: ""
        scale: 1
        precision: 0

values for energy-consumption just stay the same without change:

would appreciate any help to pinpoint it down.

Best,
Andrew

Did wzu-485 tool give you Status: ok?

yes Status is OK, please see the screenshots. The module is v9 and connected through Micro-USB (24V disconnected while connected to the PC)


I dont have a lot of experience with Modbus. Shouldn’t I be able to connect to the gateway through Modpoll/Modbus-client even without a slave connected to it?

The weird thing is that I cannot reach the gateway through Modpoll/Modbus-Client.

well, after hours and hours of trying I finally could get it to work and wanted to share my config in case anyone is using the same components, at least the modbus-card.


modbus:
  - name: waveshare_gateway
    type: tcp
    host: 192.168.1.120
    port: 502
    delay: 1
    message_wait_milliseconds: 200
    timeout: 5

    sensors:
      - name: "Zählerstand Energie"
        slave: 2
        address: 14         
        input_type: holding
        data_type: uint32
        unit_of_measurement: "MWh"
        scale: 0.001      # Wh → MWh
        precision: 3
        
      - name: "Fernwärme Aktuelle Leistung"
        slave: 2         
        address: 6        
        input_type: holding
        data_type: int32
        unit_of_measurement: "kW"
        scale: 0.01       # 0,01 kW → kW
        precision: 2    

      - name: "Fernwärme Durchfluss"
        slave: 2               
        address: 4              
        input_type: holding
        data_type: int32      
        unit_of_measurement: "m³/h"
        scale: 0.001           
        precision: 3