[Modbus] Write Value on Holding register

Guys! I read out values from my Solarfocus central heating with the modbus protocol. In the docs of the heating is said that the holding registers can be read with the functioncode 0x03 and can be written with the functioncode 16 (0x10).

I have also the following data:

  • Address: 32603
  • Type: int
  • Value: 0-3 for the different operation modes

Working example of how i read values:

  - name: "Heizung"
    close_comm_on_error: true
    delay: 5
    timeout: 5
    type: tcp
    host: 192.168.0.50
    port: 502
    sensors:
      - name: heizung_status_kessel
        address: 2401
        slave: 1
        input_type: input
        data_type: uint16

My Idea was to make buttons for the operation mode, and link service calls to them. Can you help me with the syntax? Tried with the developer tools but had no luck (what would my hub be…?)

Thank you

Just a little help maybe?

Here is the Link to the Modbus Description: Modbus - Home Assistant

I hope it will help you

Thank you :rofl:. If I could have made it with the docs, I wouldn’t have bothered anyone here from the community!

1 Like

Hi, have you been able to solve the issue?