kkossev / Hubitat

Hubitat Elevation drivers and apps
26 stars 17 forks source link

Tuya Zigbee Temperature Humidity Soil Monitor #20

Closed strickdd closed 1 year ago

strickdd commented 1 year ago

I downloaded your script for Tuya devices since it listed "TS0601_Soil _TZE200_myd45weu" as being supported; however, after adding the device to Hubitat and configuring it to use your driver, I'm not getting any data. I'm happy to provide any additional information and test things for you, just let me know what I can do.

Reported Info

Current States

    _info : installed

State Variables

    lastTx : {"tempCfg":"-1,-1,-1","humiCfg":"-1,-1,-1","tempCfgOK":false,"humiCfgOK":false,"cfgTimer":0}
    modelGroup : TS0601_Soil
    lastRx : {"tempTime":1681247248614,"humiTime":1681247248614,"tempCfg":"-1,-1,-1","humiCfg":"-1,-1,-1"}
    stats : {"rxCtr":3,"txCtr":4,"rejoins":0}
    driverVersion : 1.3.2 2023/03/04 9:57 AM
    notPresentCounter : 0
    configState : 0

Screenshot of device in Hubitat

image

Recent Log Entries

I started testing things other than "Auto Detect" even though it looks like it detected it as "TS0601_Soil" properly.

dev:4992023-04-18 10:17:51.171 AMinfoSoil Sensor refresh() is not implemented for this sleepy Zigbee device
dev:4992023-04-18 10:17:50.182 AMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_kkossev_Tuya_Temperature_Humidity_Illuminance_LCD_Display_with_a_Clock_838.ping() is applicable for argument types: () values: []
Possible solutions: find(), print(java.lang.Object), print(java.lang.Object), find(groovy.lang.Closure), print(java.io.PrintWriter), run() (method ping)
dev:4992023-04-18 10:17:40.158 AMinfoSoil Sensor Debug logging is false; Description text logging is true
dev:4992023-04-18 10:17:40.155 AMinfoSoil Sensor Updating Soil Sensor (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = TS0601_Tuya (TS0601_Tuya)
dev:4992023-04-12 05:07:39.989 PMwarnSoil Sensor debug logging disabled...
dev:4992023-04-11 05:08:24.190 PMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_kkossev_Tuya_Temperature_Humidity_Illuminance_LCD_Display_with_a_Clock_838.ping() is applicable for argument types: () values: []
Possible solutions: find(), print(java.lang.Object), print(java.lang.Object), find(groovy.lang.Closure), print(java.io.PrintWriter), run() (method ping)
dev:4992023-04-11 05:08:16.203 PMinfoSoil Sensor refresh() is not implemented for this sleepy Zigbee device
dev:4992023-04-11 05:07:44.306 PMwarnTuya Temperature Humidity Illuminance LCD Display with a Clock NOT PARSED : [raw:DD200100001801002048E2FF2038E4FF2001, dni:DD20, endpoint:01, cluster:0000, size:18, attrId:0001, encoding:20, command:0A, value:48, clusterInt:0, attrInt:1, additionalAttrs:[[value:38, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506], [value:01, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]
dev:4992023-04-11 05:07:44.299 PMdebugTuya Temperature Humidity Illuminance LCD Display with a Clock parse() descMap = [raw:DD200100001801002048E2FF2038E4FF2001, dni:DD20, endpoint:01, cluster:0000, size:18, attrId:0001, encoding:20, command:0A, value:48, clusterInt:0, attrInt:1, additionalAttrs:[[value:38, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506], [value:01, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]
dev:4992023-04-11 05:07:39.971 PMtraceTuya Temperature Humidity Illuminance LCD Display with a Clock sendZigbeeCommands(cmd=[])
dev:4992023-04-11 05:07:39.965 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock Debug logging is will be turned off after 24 hours
dev:4992023-04-11 05:07:39.928 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock Debug logging is true; Description text logging is true
dev:4992023-04-11 05:07:39.924 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock Updating null (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = Auto detect (TS0601_Soil)
dev:4992023-04-11 05:07:39.381 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock Received Write Attribute Response for cluster:0000 , data=[00] (Status: Success)
dev:4992023-04-11 05:07:39.369 PMdebugTuya Temperature Humidity Illuminance LCD Display with a Clock parse() descMap = [raw:catchall: 0104 0000 01 01 0040 00 DD20 00 00 0000 04 01 00, profileId:0104, clusterId:0000, clusterInt:0, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:DD20, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:04, direction:01, data:[00]]
dev:4992023-04-11 05:07:39.344 PMwarnTuya Temperature Humidity Illuminance LCD Display with a Clock NOT PARSED : [raw:DD2001000068040042105F545A453230305F6D796434357765750000002003010000204805000042065453303630310700003003FEFF003000, dni:DD20, endpoint:01, cluster:0000, size:68, attrId:0004, encoding:42, command:01, value:_TZE200_myd45weu, clusterInt:0, attrInt:4, additionalAttrs:[[value:03, encoding:20, attrId:0000, consumedBytes:4, attrInt:0], [value:48, encoding:20, attrId:0001, consumedBytes:4, attrInt:1], [value:TS0601, encoding:42, attrId:0005, consumedBytes:9, attrInt:5]]]
dev:4992023-04-11 05:07:39.331 PMdebugTuya Temperature Humidity Illuminance LCD Display with a Clock parse() descMap = [raw:DD2001000068040042105F545A453230305F6D796434357765750000002003010000204805000042065453303630310700003003FEFF003000, dni:DD20, endpoint:01, cluster:0000, size:68, attrId:0004, encoding:42, command:01, value:_TZE200_myd45weu, clusterInt:0, attrInt:4, additionalAttrs:[[value:03, encoding:20, attrId:0000, consumedBytes:4, attrInt:0], [value:48, encoding:20, attrId:0001, consumedBytes:4, attrInt:1], [value:TS0601, encoding:42, attrId:0005, consumedBytes:9, attrInt:5]]]
dev:4992023-04-11 05:07:38.820 PMtraceTuya Temperature Humidity Illuminance LCD Display with a Clock sendZigbeeCommands(cmd=[he raw 0xDD20 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200, he wattr 0xDD20 0x01 0x0000 0xFFDE 0x20 {13} {}, delay 200])
dev:4992023-04-11 05:07:38.764 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock configure()..
dev:4992023-04-11 05:07:38.628 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-11 05:07:38.612 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock InitializeVars()... fullInit = true
dev:4992023-04-11 05:07:38.591 PMinfoTuya Temperature Humidity Illuminance LCD Display with a Clock installed()...
kkossev commented 1 year ago

Hi @strickdd ,

Thank you for the logs! It seems like your device is either losing the connection to HE or simply stops sending any updates.. Do you see anything in the live logs after some hours, when the Debugf option is turned on ?

The error in the logs was due to a ping() function not being implemented ( it was added automatically by HE after declaring the ''Health Check' capability in a previous version of the driver. I have added the code in the new dev, branch version 1.3.3 :

https://community.hubitat.com/t/release-tuya-temperature-humidity-illuminance-lcd-display-with-a-clock-w-healthstatus/88093/278?u=kkossev

Can you test it and let me know if clicking on the Ping button has any effect on your device?

If clicking on the Ping button doesn't show any RTT number, most probably the device is dropped off the HE Zigbee network. Pair it again to HE and let me know if there is any difference.

Is your hub C-8 or C-7 or older version?

strickdd commented 1 year ago

Hi @kkossev , thanks for getting back to me. I figured I'd try from scratch to make sure I get clean logs for more testing so I removed the device from my hub and attempted to reset the zigbee following Tuya's instructions. Now I'm unable to re-add to the hub. Any ideas? I'll continue to research, but was hoping you may have a full proof solution.

I have updated the driver and looked at the logs. Below is everything I received today before resetting the device. If I'm reading them correctly, the ping() command is now implemented, but the device is not responding (progress!). Part of the reason I figured I'd try resetting things.

I'm on platform version 2.3.5.121 with a hardware revision of Rev C-5, so "older" to answer your question.

Thanks in advance, strickdd

dev:4992023-04-24 09:09:02.540 AMwarnSoil Sensor no response received (sleepy device or offline?)
dev:4992023-04-24 09:08:52.528 AMtraceSoil Sensor sendZigbeeCommands(cmd=[he raw 0xDD20 1 0x01 0x0000 {10 00 00 01 00}])
dev:4992023-04-24 09:08:52.498 AMinfoSoil Sensor ping...
dev:4992023-04-24 09:08:45.598 AMinfoSoil Sensor Initialization finished
version=1.3.3 (Timestamp: 2023/04/23 9:06 AM)
dev:4992023-04-24 09:08:45.596 AMinfoSoil Sensor manufacturer = _TZE200_myd45weu ModelGroup = TS0601_Soil
dev:4992023-04-24 09:08:43.584 AMtraceSoil Sensor sendZigbeeCommands(cmd=[])
dev:4992023-04-24 09:08:43.580 AMinfoSoil Sensor Debug logging is will be turned off after 24 hours
dev:4992023-04-24 09:08:43.553 AMinfoSoil Sensor Debug logging is true; Description text logging is true
dev:4992023-04-24 09:08:43.551 AMinfoSoil Sensor Updating Soil Sensor (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = Auto detect (TS0601_Soil)
dev:4992023-04-24 09:08:42.513 AMtraceSoil Sensor sendZigbeeCommands(cmd=[he raw 0xDD20 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200, he wattr 0xDD20 0x01 0x0000 0xFFDE 0x20 {13} {}, delay 200])
dev:4992023-04-24 09:08:42.507 AMinfoSoil Sensor configure()..
dev:4992023-04-24 09:08:42.413 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:08:42.409 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:08:42.392 AMinfoSoil Sensor installed()...
dev:4992023-04-24 09:08:42.289 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:08:42.285 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:08:42.258 AMinfoSoil Sensor Initialize()...
dev:4992023-04-24 09:06:43.848 AMinfoSoil Sensor Initialization finished
version=1.3.3 (Timestamp: 2023/04/23 9:06 AM)
dev:4992023-04-24 09:06:43.847 AMinfoSoil Sensor manufacturer = _TZE200_myd45weu ModelGroup = TS0601_Soil
dev:4992023-04-24 09:06:41.853 AMtraceSoil Sensor sendZigbeeCommands(cmd=[])
dev:4992023-04-24 09:06:41.849 AMinfoSoil Sensor Debug logging is will be turned off after 24 hours
dev:4992023-04-24 09:06:41.825 AMinfoSoil Sensor Debug logging is true; Description text logging is true
dev:4992023-04-24 09:06:41.823 AMinfoSoil Sensor Updating Soil Sensor (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = Auto detect (TS0601_Soil)
dev:4992023-04-24 09:06:40.786 AMtraceSoil Sensor sendZigbeeCommands(cmd=[he raw 0xDD20 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200, he wattr 0xDD20 0x01 0x0000 0xFFDE 0x20 {13} {}, delay 200])
dev:4992023-04-24 09:06:40.776 AMinfoSoil Sensor configure()..
dev:4992023-04-24 09:06:40.689 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:06:40.687 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:06:40.677 AMinfoSoil Sensor installed()...
dev:4992023-04-24 09:06:40.589 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:06:40.586 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:06:40.567 AMinfoSoil Sensor Initialize()...
dev:4992023-04-24 09:06:33.076 AMinfoSoil Sensor Initialization finished
version=1.3.3 (Timestamp: 2023/04/23 9:06 AM)
dev:4992023-04-24 09:06:33.074 AMinfoSoil Sensor manufacturer = _TZE200_myd45weu ModelGroup = TS0601_Soil
dev:4992023-04-24 09:06:31.085 AMtraceSoil Sensor sendZigbeeCommands(cmd=[])
dev:4992023-04-24 09:06:31.081 AMinfoSoil Sensor Debug logging is will be turned off after 24 hours
dev:4992023-04-24 09:06:31.050 AMinfoSoil Sensor Debug logging is true; Description text logging is true
dev:4992023-04-24 09:06:31.048 AMinfoSoil Sensor Updating Soil Sensor (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = Auto detect (TS0601_Soil)
dev:4992023-04-24 09:06:30.000 AMtraceSoil Sensor sendZigbeeCommands(cmd=[he raw 0xDD20 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200, he wattr 0xDD20 0x01 0x0000 0xFFDE 0x20 {13} {}, delay 200])
dev:4992023-04-24 09:06:29.988 AMinfoSoil Sensor configure()..
dev:4992023-04-24 09:06:29.901 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:06:29.899 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:06:29.872 AMinfoSoil Sensor installed()...
dev:4992023-04-24 09:06:29.778 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:06:29.769 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:06:29.739 AMinfoSoil Sensor Initialize()...
dev:4992023-04-24 09:05:07.006 AMinfoSoil Sensor Initialization finished
version=1.3.3 (Timestamp: 2023/04/23 9:06 AM)
dev:4992023-04-24 09:05:07.004 AMinfoSoil Sensor manufacturer = _TZE200_myd45weu ModelGroup = TS0601_Soil
dev:4992023-04-24 09:05:04.931 AMtraceSoil Sensor sendZigbeeCommands(cmd=[])
dev:4992023-04-24 09:05:04.926 AMinfoSoil Sensor Debug logging is will be turned off after 24 hours
dev:4992023-04-24 09:05:04.898 AMinfoSoil Sensor Debug logging is true; Description text logging is true
dev:4992023-04-24 09:05:04.894 AMinfoSoil Sensor Updating Soil Sensor (Tuya Temperature Humidity Illuminance LCD Display with a Clock) model TS0601 manufacturer _TZE200_myd45weu modelGroupPreference = Auto detect (TS0601_Soil)
dev:4992023-04-24 09:05:03.800 AMinfoSoil Sensor configure()..
dev:4992023-04-24 09:05:03.709 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:05:03.706 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:05:03.686 AMinfoSoil Sensor installed()...
dev:4992023-04-24 09:05:03.579 AMinfoSoil Sensor Statistics were reset. Press F5 to refresh the device page
dev:4992023-04-24 09:05:03.572 AMinfoSoil Sensor InitializeVars()... fullInit = true
dev:4992023-04-24 09:05:03.554 AMinfoSoil Sensor Initialize()...
dev:4992023-04-24 09:04:57.219 AMinfoSoil Sensor InitializeVars()... fullInit = false
dev:4992023-04-24 09:04:57.214 AMinfoSoil Sensor updating the settings from the current driver version 1.3.2 2023/03/04 9:57 AM to the new version 1.3.3 2023/04/23 9:06 AM
kkossev commented 1 year ago

Soil Sensor no response received (sleepy device or offline?)

The logs don't show anything to be received from the device... which is rather strange, because I have this device and I can pair it to both C-7 and C-8 hubs.

It doesn't work as expected, however... The humidity (the moisture) is stuck at 100% and only the battery level is reported. In the next days I will pair it again to a Tuya hub, and if it doesn't work there will put a 'DO NOT BUY' warning on Hubitat forum. I will try to contact the manufacturer as well, so far they did not respond to my message in HA forum.

strickdd commented 1 year ago

Thanks for the assistance. Please let me know if I can do anything to test or assist.

Thanks, Dave

kkossev commented 1 year ago

Seems like there was a hardware problem in the first batches of this device, which was fixed later.