let4ik
(let4ik)
September 4, 2024, 8:07pm
1
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.
I have the same problem! When the sensor is connected, the readings differ from the real ones.
The SHT20 sensor reads both temperature and humidity. If I read only one value (either temperature or humidity), then the readings are correct, but if I read both, then the temperature is too low and the humidity is too high!
I understand that you can write a correction, but 1) this is not correct - after entering the coefficient, I try to breathe into the sensor and it shows me a temperature of 70°C…
Saferot
(Saferot)
February 19, 2025, 4:46pm
3
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
remmob
February 19, 2025, 10:21pm
4
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.
remmob
February 20, 2025, 7:32pm
5
The only weird thing are those spikes in het humidity sensor.
remmob
February 20, 2025, 7:53pm
6
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)
Home Assistant SHT20 Modbus temperature & Humidity sensor integration.