Help with config - multiple modbus hubs

I cant get HA to read my two modbus gateways at the same time. Every time I try HA wont boot correctly and even gets stuck.

my config looks like this, and works until I uncomment the modbus_epever…

I dont understand how to address the different gateways for each sensor, I tried using “hub: modbus_epever” in a sensor but it gives me compilation errors. I also tried setting up two separate modbus integrations with its own set of sensors, I tried using it as a sensor platform but as I understand it cant be configured that way anymore.

can anyone help? The documentation doesnt show any examples for this scenario


modbus:
  - type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    name: "modbus_tcp"
    
#  - type: rtuovertcp
#    host: 192.168.1.31
#    port: 8888
#    name: "modbus_epever"
    
    sensors:
      - name: "Main Battery"
        address: 256
        slave: 1
        count: 3
        scan_interval: 10
        data_type: custom
        structure: ">3H"
      - name: "Main Panel"
        address: 263
        slave: 1
        count: 3
        scan_interval: 11
        data_type: custom
        structure: ">3H"

I would assume you need:

modbus tcp:
  - type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    name: "modbus_tcp"
    sensors:
...

modbus epe:
  - type: rtuovertcp
    host: 192.168.1.31
    port: 8888
    name: "modbus_epever"
    sensors:
...

Not every integration supports multiple instances, so this may not work.

no it doesnt seem to work, I tried this and it does not give any errors but no epever-sensors showing up…

modbus:
  - type: rtuovertcp
    host: 192.168.1.31
    port: 8888
    name: "modbus_epever"
    
    sensors:
      - name: Epever_battery_voltage
        hub: modbus_epever
        unit_of_measurement: V
        slave: 1
        register: 12292
        register_type: input
        scale: 0.01
        precision: 1 
      - name: Epever Charging Equipment Rated Input Voltage #0x003000
        hub: modbus_epever
        unit_of_measurement: V
        slave: 1
        register: 12288
        register_type: input
        scale: 0.01
        precision: 1 

modbus:
  - type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    name: "modbus_tcp"
    
    
    sensors:
      - name: "Main Battery"
        address: 256
        slave: 1
        count: 3
        scan_interval: 10
        data_type: custom
        structure: ">3H"

is the “hub” in sensor variable deprecated? also I understand that the register has been replaced by “address”, but the compiler does not give any errors?

Think I fixed it now, this is working:

modbus:
  - type: rtuovertcp
    host: 192.168.1.31
    port: 8888
    name: "modbus_epever"
    
    sensors:
      - name: Epever_battery_voltage
        unit_of_measurement: V
        slave: 1
        address: 12292
        input_type: input
        scale: 0.01
        precision: 1 

  - type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    name: modbus_tcp
    
    sensors:
      - name: "Main Battery"
        address: 256
        slave: 1
        count: 3
        scan_interval: 10
        data_type: custom
        structure: ">3H"
2 Likes