Modbus Integration - Control Over Function Code

Hi All,

I am currently working on a community energy project and trying to integrate the Solis inverter via direct modbus connection RTU, not over TCP.

In discussions with the manufacture it would appear that I need to be sending modbus commands using different modbus function codes not just the standard ones specified in the doc below.

Modbus - Home Assistant (home-assistant.io)

Would some genus be able to update the modbus integration to allow for the specifying of the function code?

Thanks,
Richard.

Yes please, got the same issue with some Chinese modbus RTU’s

what code do you need to send to modbus rtu?

modbus address

example:

read code function 1 = coil,

    switches:
      - name: switch1
        slave: 1
        address: 128
      - name: switch2
        slave: 1
        address: 129

if you need custom preference, you can use cover and device_class

or maybe you need HMI ( Human Machine Interface ) or SCADA

Modbus TCP has Format
Slave ID; Function Code; Adress, num of coils

so function code is a must have

  • name: power
    slave: 1
    Function: 2
    address: 1002
    coils: 5

that is the goal

Data send to ip: 01 02 03 ea 00 05

see About Modbus TCP | Simply Modbus Software