pvvx / THB2

Custom firmware for Tuya devices on the PHY622x2 chipset
Other
130 stars 14 forks source link

Offset correction #22

Open jurgen2005 opened 7 months ago

jurgen2005 commented 7 months ago

How can I change the Offset correction? There is a 0.4 difference between two TH05's Whatever I fill in, it still writes the same value's 23:16:22: setSensCfg... 23:16:22: Device Sensor # Kt: 16500, Kh: 10000, Zt: -4000, Zh: 0 23:16:22: Dev sensor # id: 5959-8305, i2c_addr: 0x40

pvvx commented 7 months ago

Fixed PHY62x2BTHome.html

jurgen2005 commented 7 months ago

thx! it works, just don't know how the parameters function? Could you shed any light on that?

pvvx commented 7 months ago

For each sensor type there are different coefficient values. See sensor datasheet...

Sensor: CHT8305

Temperature and humidity are calculated using the formula:

value (0.01) = sensor.regiser * coef.k / 65536 + coef.z

https://en.wikipedia.org/wiki/Linear_equation