zigbeefordomoticz / Domoticz-Zigbee

Zigbee plugin for Domoticz. Allow to connect various zigbee controllers like Zigate but also Texas Instrument CC2531, CC13x2, CC26x2 ; Silicon-Labs; deConz based chipset to be connected to Domoticz
GNU General Public License v3.0
100 stars 43 forks source link

[Integration] - Unrecognised TS0601 Temperature/Humidity sensor #1515

Closed stevedh42 closed 1 year ago

stevedh42 commented 1 year ago

*Other info : This is a cheap Chinese zigbee temperature sensor with a display bought from aliexpress. Before I updated to 6.3.010 it was detected but didn't work.. old log also included just in case it is of any use.

stevedh42 commented 1 year ago

I did try just adding "_TZE200_whkgqxse" to TUYA_TEMP_HUMI = ( in tuyaConst.py

it was detected, but readings were zero, and got this in the log.

2023-02-01 21:07:17.107 Error: Sonoff Zigbee: Aberrant Temp: 1.8180266169757779e+78 (below -50 or above 100) for device: 8a34 2023-02-01 21:07:18.089 Error: Sonoff Zigbee: Aberrant Temp: 1.8180266169757779e+78 (below -50 or above 100) for device: 8a34

pipiche38 commented 1 year ago

could you please go to the hotfix-6.3.011 branch

git pull
git checkout hotfix-6.3.011

remove the device from domoticz et the plugin restart the plugin

enable debug via the 'WebUI' > Debug

Input Tuya

Screenshot 2023-02-02 at 08 40 41

Then do the pairing, leave it like that during 5 or 10 minutes

finaly drop me the log file

stevedh42 commented 1 year ago

thanks Please find attached log and raw plugin list. Hope these help. From googling looks like this device is usually described as Temperature/Humidity sensor with clock... although I think the clock is unreadable.

PluginZigbee_04.log export2.json.txt

pipiche38 commented 1 year ago

The data transmitted looks totally un-expected.

Is this values correct ?

Temp: 0xc2 -> 19.4 Humi: 0x37 -> 55 Battery: 0x64 -> 100 0a: 0x68 -> 104 ??? 0b: 0xc8 -> 200 ???

stevedh42 commented 1 year ago

Yes those values look correct, I'm pretty sure it was around 19 degrees at that time.. Be interesting to know what those other values are, pity I didn't set the clock correctly as maybe they might have had something to do with the time..

pipiche38 commented 1 year ago

I beleive you can set some Alarm, so it might be related to a Temp Min / Max for example

Can you switch to a new branch (untested)

git pull
git checkout tuya-cluster/recursive-scan
git pull

simply restart the plugin

and let see . Please cross check if any errors can occures in the Domoticz Logs and the plugin logs leave the debug flag as they are

stevedh42 commented 1 year ago

On the plus side... it set the date and time automatically, which surprised me.

On the minus side It is still reading the data incorrectly, I checked and as far as I can tell I updated correctly.

2023-02-02 18:10:38.540 Error: Sonoff Zigbee: Aberrant Temp: 2.0496107954504102e+78 (below -50 or above 100) for device: db4f 2023-02-02 18:10:42.503 Error: Sonoff Zigbee: Aberrant Temp: 2.0496107954504102e+78 (below -50 or above 100) for device: db4f

BTW current temperature is 17.4, although it could have been 17.6 and Humidity is 51

stevedh42 commented 1 year ago

Log just in case it is helpful PluginZigbee_04.log

stevedh42 commented 1 year ago

If you want me to check a file or something I can.

pipiche38 commented 1 year ago

Please provides the output of command

git status

stevedh42 commented 1 year ago

steve@ubuntu1:~/domoticz/plugins/Domoticz-Zigbee$ sudo git status On branch tuya-cluster/recursive-scan Your branch is up to date with 'origin/tuya-cluster/recursive-scan'.

nothing to commit, working tree clean

pipiche38 commented 1 year ago

kindly retrieve the latest update on the same branch and restart the plugin

stevedh42 commented 1 year ago

Done.. still has same error but thanks for looking at this.

2023-02-03 09:49:35.108 Error: Sonoff Zigbee: Aberrant Temp: 2.2464573471538477e+78 (below -50 or above 100) for device: db4f

I've attached log. PluginZigbee_04.log

BTW the screen of db4f is showing (sorry to complicate things there are 2 of these connected to zigbee, but only 1 I can look at at the moment) temp 19.4 humidity 57%

And Git status

On branch tuya-cluster/recursive-scan Your branch is up to date with 'origin/tuya-cluster/recursive-scan'.

nothing to commit, working tree clean

pipiche38 commented 1 year ago

not sure I understand, is the temp/humi correctly reported ?

stevedh42 commented 1 year ago

No sorry, still getting 0 for temp and 50 for humid which never change. still getting this error in the log. 2023-02-03 09:49:35.108 Error: Sonoff Zigbee: Aberrant Temp: 2.2464573471538477e+78 (below -50 or above 100) for device: db4f

I just included the temperature read directly from the display of the device incase that helped.

pipiche38 commented 1 year ago

Ok, try again

git pull (on the same branch)

stevedh42 commented 1 year ago

no :(

2023-02-03 11:31:34.981 Error: Sonoff Zigbee: Aberrant Temp: 2.3043533917725058e+78 (below -50 or above 100) for device: db4f 2

Log attached

PluginZigbee_04.log

pipiche38 commented 1 year ago

No clue what is happening, just added some debug , can you update and restart

stevedh42 commented 1 year ago

Done.. log attached PluginZigbee_04.log

pipiche38 commented 1 year ago

once more ;-)

stevedh42 commented 1 year ago

ALMOST :) I was watching domoticz log waiting for the error to pop up and it didn't

Temperature is correct but humidity is wrong

Temp + Humidity THGN122/123/132, THGR122/228/238/268 20.8 C, 5 %

Humidity should be 56%

log attached.

PluginZigbee_04.log

pipiche38 commented 1 year ago

please switch back to hotfix-6.3.011

git pull
git checkout hotfix-6.3.011

and then restart the plugin

stevedh42 commented 1 year ago

Done thanks, Humidity still show 5% instead of now 55%

Log attached

PluginZigbee_04.log PluginZigbee_log_error_history.json.txt

pipiche38 commented 1 year ago

indeed they were an error, try again

stevedh42 commented 1 year ago

YAY!! all appears to be working, thanks, I'm guessing this patch was a bit more complicated then normal.

pipiche38 commented 1 year ago

Good, so it will merged on stable6 at a point of time.

pipiche38 commented 1 year ago

Can you kindly switch to the branch config-release-6.3.011

git pull
git checkout config-release-6.3.011

and redo the all test from pairing

stevedh42 commented 1 year ago

everything looks good.

Did the pull and checkout. removed it from Domoticz and the plugin rebooted plugin. repaired it. everything working well. (also confirmed battery level by using uncharged battery)

pipiche38 commented 1 year ago

Ok, thanks for the cross-check. You can remain on that branch until we published release 6.3.011

thanks for your support