Modbus, multiple connections

Hello,

I want to make 2 modbus connections with my Solax en Nibe Heatpump. With the next config it wont work, can anyone help me?

modbus:

  • name: hub1 # NIBES2125
    type: tcp
    host: x.x.x.x
    port: 502
    delay: 1
    timeout: 3
    retries: 3
    retry_on_empty: true
    message_wait_milliseconds: 250

  • name: hub2 # SolaxX3
    type: tcp
    host: x.x.x.x
    port: 502
    delay: 1
    timeout: 3
    retries: 3
    retry_on_empty: true
    message_wait_milliseconds: 250

    sensor:

    • platform: modbus
      scan_interval: 10
      registers:

      • name: Nibe1028
        hub: hub1
        slave: 1
        register: 1028
        register_type: input #input #holding (default)
        unit_of_measurement: V
        count: 1
        #reverse_order: false #false
        scale: 1
        precision: 1
        data_type: int #float #int (default), uint, float, custom, uint

      • name: Solax1059
        hub: hub2
        slave: 1
        register: 1061
        register_type: input #input #holding (default)
        unit_of_measurement: W
        count: 1
        scale: 1
        precision: 1
        data_type: int #float #int (default), uint, float, custom, uint

modbus:

  - name: hub1
    #...
    sensors:
      - name: "register"
        #...
      - name: "register"
        #...

  - name: hub2
    #...
    sensors:
      - name: "register"
        #...
      - name: "register"
        #...

Thanks Nikito,

Now I can go futher with part two, get the right values from de SolaxX3

1 Like
# modbus communication
modbus:
  - name: hub1
    close_comm_on_error: false
    retry_on_empty: true
    retries: 10
    delay: 10
    message_wait_milliseconds: 1000
    timeout: 10
    type: tcp
    host: 192.168.178.56
    port: 5000

        
  - name: hub2
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    port: /dev/ttyACM0
    stopbits: 1
    
    sensors:
      - name: SPH.V_pv1
        unique_id: Growatt.3:3
        data_type: int16
        input_type: input
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        scale: 0.1
        slave: 1
        address: 3
        scan_interval: 5

      - name: MIC.V_pv1
        unique_id: Growatt.3:3
        data_type: int16
        input_type: input
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        scale: 0.1
        slave: 1
        address: 3
        scan_interval: 5

Hello, I have the following problem. I would like to read out 2 inverters via RS485. If I have the query individually, it still works, how can I query both?

modbus:

  - name: hub1
    close_comm_on_error: false
    retry_on_empty: true
    retries: 10
    delay: 10
    message_wait_milliseconds: 1000
    timeout: 10
    type: tcp
    host: 192.168.178.56
    port: 5000

    sensors:

      - name: SPH.V_pv1
        unique_id: Growatt_3_sph
        data_type: int16
        input_type: input
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        scale: 0.1
        slave: 1
        address: 3
        scan_interval: 5
        
  - name: hub2
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    port: /dev/ttyACM0
    stopbits: 1
    
    sensors:

      - name: MIC.V_pv1
        unique_id: Growatt_3_mic
        data_type: int16
        input_type: input
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        scale: 0.1
        slave: 1
        address: 3
        scan_interval: 5

I have already tried that. Then only the hub2 is displayed