Modbus RS485 SHT 20 Temperature and Humidity sensor

Hi, I try to integrate in HA Modbus RS485 SHT 20 Temperature and Humidity sensor via Configuration YAML file. At HA my script create 2 object for Modbus SHT20 Humidity and SHT20 Temperature, but unfortunately the numbers are strange:

SHT20 Humidity 11 899 %
SHT20 Temperature 12 886 С

The sensor placed at home (T 22-24C, H 50%)

Do you have any idea how to fix it?

modbus:
  - type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    bytesize: 8
    parity: N
    stopbits: 1
    timeout: 2
    sensors:
      - name: SHT20 Temperature
        scan_interval: 5
        slave: 1
        scale: 0.01
        address: 1
        data_type: uint16
        input_type: input
        unit_of_measurement: °C
        device_class: temperature
        state_class: measurement
        unique_id: 'SHT20 Temperature'

      - name: SHT20 Humidity
        scan_interval: 5
        slave: 1
        address: 2
        data_type: uint16
        input_type: input
        unit_of_measurement: '%'
        device_class: humidity
        state_class: measurement
        unique_id: 'SHT20 Humidity'

Hi!
did you solve the problem? I have the same one! I posted my question in the next thread.

Hi!
I was able to solve this problem - it required shifting the polling time of the sensors, I used 5 for temperature and 19 for humidity
modbus:

  • name: modbus
    type: serial
    port: /dev/ttyUSB0
    baudrate: 19200
    bytesize: 8
    method: rtu
    stopbits: 1
    parity: N
    timeout: 2
    sensors:
    • name: ‘SHT20 температура’
      scan_interval: 5
      slave: 1
      address: 1
      scale: 0.01
      data_type: int16
      input_type: input
      unit_of_measurement: °C
      device_class: temperature
      state_class: measurement
      unique_id: ‘SHT20 Temperature’

    • name: ‘SHT20 влажность’
      scan_interval: 19
      slave: 1
      address: 2
      scale: 0.01
      data_type: int16
      input_type: input
      unit_of_measurement: ‘%’
      device_class: humidity
      state_class: measurement
      unique_id: ‘SHT20 Humidity’

1 Like

Hi,
Is there a specific reason for the 5 and 19 seconds, seems to work.
But when I try 60s and 90s its not working.

The only weird thing are those spikes in het humidity sensor.

This sensor has a problem in the way the core modbus integration is handeling update’s
There for I created a custom integration for these sensor.
You can eigther connect via serial or TCP/IP gateway.
and change the options (baudrate, id, offsets)