Modbus_controller : How to force to get one command per register

Hello,
My ventilation system works with modbus.
It works fine if I write :


  - platform: modbus_controller
    modbus_controller_id: lu
    id: temp_amb
    name: "Température ambiante"
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    address: 200
    register_type: read
    register_count: 2
    value_type: S_DWORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.001

But if I want to read the register 202, then one command is send for both request and my system doesn’t allow that :

  - platform: modbus_controller
    modbus_controller_id: lu
    id: temp_amb
    name: "Température ambiante"
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    address: 200
    register_type: read
    register_count: 2
    value_type: S_DWORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    modbus_controller_id: lu
    id: temperature_ext
    name: "Température de l'air extérieur"
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    address: 202
    register_type: read
    register_count: 2
    value_type: S_DWORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.001

I would need to get 2 commands, it works if I do :

  - platform: modbus_controller
    modbus_controller_id: lu
    id: temp_amb
    name: "Température ambiante"
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    #address: 200
    #register_type: read
    #register_count: 2
    custom_command: [0x01,0x04,0x00,0xC8,0x00,0x02]
    value_type: S_DWORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    modbus_controller_id: lu
    id: temperature_ext
    name: "Température de l'air extérieur"
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    #address: 202
    #register_type: read
    #register_count: 2
    custom_command: [0x01,0x04,0x00,0xCA,0x00,0x02] #01.04.00.CA.00.02.51.F5 / \x01\x04\x00\xCA\x00\x02Q\xF5
    value_type: S_DWORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.001

How could I force that ? Do I need to stay with custom commands ?

Thanks in advance for your help.

try with:
force_new_range: true
on every sensor

Thanks, I’ll try as soon as I can :slight_smile: .

@Karosm , thanks, it’s working !

You are welcome.
Weird behavior from your device though…

1 Like