zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
731 stars 673 forks source link

[Device Support Request] TS0222 by _TYZB01_kvwjujy9 (E-Ink Brightness Thermometer) #961

Closed almico closed 2 years ago

almico commented 3 years ago

The problem The device is identified and added. Reported readings are humidity, illuminance, power and temperature. The temperature is often reported as 0° C, and, when this happens, illuminance shown on the device display is 0 Lux. About every 150 seconds, the devices seems to reset (its screen goes blank and then reappears) and, at the same time, in the log appear the following messages:

2021-07-15 08:26:50 DEBUG (MainThread) [zigpy.device] Ignoring message (b'08010a01f0211400') on cluster 1024: unknown endpoint or cluster id: 'No cluster ID 0x0400 on (xx:yy:zz:aa:bb:cc:dd:ee, 2)'
2021-07-15 08:26:52 DEBUG (MainThread) [zigpy.device] Ignoring message (b'08010a01f0211400') on cluster 1024: unknown endpoint or cluster id: 'No cluster ID 0x0400 on (xx:yy:zz:aa:bb:cc:dd:ee, 2)'
2021-07-15 08:26:53 DEBUG (MainThread) [zigpy.device] Ignoring message (b'08010a01f0211400') on cluster 1024: unknown endpoint or cluster id: 'No cluster ID 0x0400 on (xx:yy:zz:aa:bb:cc:dd:ee, 2)'

Where xx:yy:zz:aa:bb:cc:dd:ee is the anonymized form of the device address. The messages above always appear in a group of three consecutive ones.

Desired solution I would like to read correct values and not see the device resetting every 150 seconds.

Device signature

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, <Bool.false: 0>]
[0xcb5b] Delivery error for seq # 0x49, on endpoint id 0 cluster 0x0034: message send failure
Sending 'zdo_leave_req' failed: [0xcb5b:0:0x0034]: Message send failure
[0x7c46:zdo] ZDO request ZDOCmd.NWK_addr_req: [00:21:2e:ff:ff:06:be:73, 0, 0]
[0x7c46:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=5 command_id=Command.Report_Attributes>
[0x7c46:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=67>)]]
[0x7c46:1:0x0000] Attribute report received: app_version=67
[0x7c46:5:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=4 command_id=Command.Report_Attributes>
[0x7c46:5:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]]
[0x7c46:5:0x0006] Attribute report received: on_off=0
[0x0bd7:zdo] ZDO request ZDOCmd.Match_Desc_req: [0xFFFD, 49246, [25], []]
light.linea_sotto_tv: polling current state
[0xae4f:11:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=81 command_id=Command.Read_Attributes_rsp>
[0xae4f:11:0x0008] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=83 command_id=Command.Read_Attributes_rsp>
[0xAE4F:11:0x0008]: received attribute: 0 update with value: 20
[0xae4f:11:0x0300] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=85 command_id=Command.Read_Attributes_rsp>
New device 0xf824 (xx:yy:zz:aa:bb:cc:dd:ee) joined the network
[0xf824] Scheduling initialization
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 0 to ep 0, cluster 19: b'\x8c$\xf8\xd9?\x04\xfe\xffr\x02\\\x80'
[0xf824:zdo] ZDO request ZDOCmd.Device_annce: [0xF824, xx:yy:zz:aa:bb:cc:dd:ee, 128]
Tries remaining: 3
[0xf824] Requesting 'Node Descriptor'
Tries remaining: 2
[0xf824] Extending timeout for 0x57 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 0 to ep 0, cluster 32770: b'W\x00$\xf8\x02@\x80\x02\x10RR\x00\x00,R\x00\x00'
[0xf824] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)
[0xf824] Discovering endpoints
Tries remaining: 3
[0xf824] Extending timeout for 0x59 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 0 to ep 0, cluster 32773: b'Y\x00$\xf8\x02\x01\x02'
[0xf824] Discovered endpoints: [1, 2]
[0xf824] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>, <Endpoint id=2 in=[] out=[] status=<Status.NEW: 0>>]
[0xf824:1] Discovering endpoint information
Tries remaining: 3
[0xf824] Extending timeout for 0x5b request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 2 to ep 1, cluster 1024: b'\x08\n\n\x01\xf0!\x14\x00'
[0xf824] Received ZCL while uninitialized on endpoint id 2, cluster 0x0400 id, hdr: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=10 command_id=Command.Report_Attributes>, payload: b'\x01\xf0!\x14\x00'
[0xf824] Uninitialized device command 'Command.Report_Attributes' args: [[Attribute(attrid=61441, value=<TypeValue type=uint16_t, value=20>)]]
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 0 to ep 0, cluster 32772: b'[\x00$\xf8\x12\x01\x04\x01\x06\x01\x01\x03\x00\x00\x01\x00\x00\x04\x02\x19\x00\n\x00'
[0xf824:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=262, device_version=1, input_clusters=[0, 1, 1024], output_clusters=[25, 10])
[0xf824:2] Discovering endpoint information
Tries remaining: 3
[0xf824] Extending timeout for 0x5d request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=False> from ep 0 to ep 0, cluster 32772: b']\x00$\xf8\x0c\x02\x04\x01\x02\x03\x01\x02\x02\x04\x05\x04\x00'
[0xf824:2] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=770, device_version=1, input_clusters=[1026, 1029], output_clusters=[])
[0xf824] Extending timeout for 0x5f request
[0xf824:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=95 command_id=Command.Read_Attributes_rsp>
[0xf824] Read model 'TS0222' and manufacturer '_TYZB01_kvwjujy9' from <Endpoint id=1 in=[basic:0x0000, power:0x0001, illuminance:0x0400] out=[ota:0x0019, time:0x000A] status=<Status.ZDO_INIT: 1>>
[0xf824] Discovered basic device information for <Device model='TS0222' manuf='_TYZB01_kvwjujy9' nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=True>
Device is initialized <Device model='TS0222' manuf='_TYZB01_kvwjujy9' nwk=0xF824 ieee=xx:yy:zz:aa:bb:cc:dd:ee is_initialized=True>
Checking quirks for _TYZB01_kvwjujy9 TS0222 (xx:yy:zz:aa:bb:cc:dd:ee)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1, 2}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1, 2}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1, 2}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because endpoint list mismatch: {1} {1, 2}
device - 0xF824:xx:yy:zz:aa:bb:cc:dd:ee entering async_device_initialized - is_new_join: True
device - 0xF824:xx:yy:zz:aa:bb:cc:dd:ee has joined the ZHA zigbee network
[0xF824](TS0222): started configuration
[0xF824:ZDO](TS0222): 'async_configure' stage succeeded
[0xf824] Extending timeout for 0x61 request
[0xF824:1:0x0000]: finished channel configuration
[0xf824] Extending timeout for 0x63 request
[0xF824:1:0x0019]: finished channel configuration
[0xf824] Extending timeout for 0x65 request
Error handling '_save_attribute' event with (xx:yy:zz:aa:bb:cc:dd:ee, 1, 0, 4, '_TYZB01_kvwjujy9') params: FOREIGN KEY constraint failed
Error handling '_save_attribute' event with (xx:yy:zz:aa:bb:cc:dd:ee, 1, 0, 5, 'TS0222') params: FOREIGN KEY constraint failed
[0xF824:1:0x0400]: bound 'illuminance' cluster: Status.SUCCESS
[0xf824] Extending timeout for 0x67 request
[0xF824:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0xf824] Extending timeout for 0x69 request
[0xF824:2:0x0405]: bound 'humidity' cluster: Status.SUCCESS
[0xf824] Extending timeout for 0x6b request
Ignoring message (b'080a0a01f0211400') on cluster 1024: unknown endpoint or cluster id: 'No cluster ID 0x0400 on (xx:yy:zz:aa:bb:cc:dd:ee, 2)'
[0xf824:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=103 command_id=Command.Configure_Reporting_rsp>
[0xF824:1:0x0400]: reporting 'measured_value' attr on 'illuminance' cluster: 30/900/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0xF824:1:0x0400]: finished channel configuration
[0xf824] Extending timeout for 0x6d request
[0xf824:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=105 command_id=Command.Configure_Reporting_rsp>
[0xF824:1:0x0001]: reporting 'battery_voltage' attr on 'power' cluster: 3600/10800/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0xf824] Extending timeout for 0x6f request
[0xF824:2:0x0402]: bound 'temperature' cluster: Status.SUCCESS
[0xf824] Extending timeout for 0x71 request
[0xf824:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=111 command_id=Command.Configure_Reporting_rsp>
[0xF824:1:0x0001]: reporting 'battery_percentage_remaining' attr on 'power' cluster: 3600/10800/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0xF824:1:0x0001]: finished channel configuration
[0xF824:1:0x0400]: 'async_configure' stage succeeded
[0xF824:1:0x0000]: 'async_configure' stage succeeded
[0xF824:1:0x0001]: 'async_configure' stage succeeded
[0xF824:1:0x0019]: 'async_configure' stage succeeded
[0xf824:2:0x0402] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=113 command_id=Command.Configure_Reporting_rsp>
[0xF824:2:0x0402]: reporting 'measured_value' attr on 'temperature' cluster: 30/900/50: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0xF824:2:0x0402]: finished channel configuration
[0xf824:2:0x0405] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=107 command_id=Command.Configure_Reporting_rsp>
[0xF824:2:0x0405]: reporting 'measured_value' attr on 'humidity' cluster: 30/900/100: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0xF824:2:0x0405]: finished channel configuration
[0xF824:2:0x0405]: 'async_configure' stage succeeded
[0xF824:2:0x0402]: 'async_configure' stage succeeded
[0xF824](TS0222): completed configuration
[0xF824](TS0222): stored in registry: ZhaDeviceEntry(name='_TYZB01_kvwjujy9 TS0222', ieee='xx:yy:zz:aa:bb:cc:dd:ee', last_seen=1626330794.7582607)
[0xF824](TS0222): started initialization
[0xF824:ZDO](TS0222): 'async_initialize' stage succeeded
[0xF824:1:0x0400]: initializing channel: from_cache: False
[0xf824] Extending timeout for 0x73 request
[0xF824:1:0x0000]: initializing channel: from_cache: False
[0xF824:1:0x0000]: finished channel configuration
[0xF824:1:0x0001]: initializing channel: from_cache: False
[0xf824] Extending timeout for 0x75 request
[0xF824:1:0x0019]: initializing channel: from_cache: False
[0xF824:1:0x0019]: finished channel configuration
[0xF824:2:0x0405]: initializing channel: from_cache: False
[0xf824] Extending timeout for 0x77 request
[0xf824:2:0x0402] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=11 command_id=Command.Report_Attributes>
[0xf824:2:0x0402] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=int16s, value=2730>)]]
[0xf824:2:0x0402] Attribute report received: measured_value=2730
[0xf824:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=115 command_id=Command.Read_Attributes_rsp>
[0xF824:1:0x0400]: finished channel configuration
[0xF824:2:0x0402]: initializing channel: from_cache: False
[0xf824] Extending timeout for 0x7a request
[0xf824:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=117 command_id=Command.Read_Attributes_rsp>
[0xf824] Extending timeout for 0x7c request
[0xf824:2:0x0405] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=119 command_id=Command.Read_Attributes_rsp>
[0xF824:2:0x0405]: finished channel configuration
[0xf824:2:0x0405] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=12 command_id=Command.Report_Attributes>
[0xf824:2:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=4992>)]]
[0xf824:2:0x0405] Attribute report received: measured_value=4992
[0xf824:2:0x0402] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=122 command_id=Command.Read_Attributes_rsp>
[0xF824:2:0x0402]: finished channel configuration
[0xF824:2:0x0405]: 'async_initialize' stage succeeded
[0xF824:2:0x0402]: 'async_initialize' stage succeeded
[0xf824:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=124 command_id=Command.Read_Attributes_rsp>
[0xF824:1:0x0001]: finished channel configuration
[0xF824:1:0x0400]: 'async_initialize' stage succeeded
[0xF824:1:0x0000]: 'async_initialize' stage succeeded
[0xF824:1:0x0001]: 'async_initialize' stage succeeded
[0xF824:1:0x0019]: 'async_initialize' stage succeeded
[0xF824](TS0222): power source: Battery or Unknown
[0xF824](TS0222): completed initialization
[0xf824:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=13 command_id=Command.Report_Attributes>
[0xf824:1:0x0400] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=10001>)]]
[0xf824:1:0x0400] Attribute report received: measured_value=10001
[0xf824:1:0x000a] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=19 command_id=Command.Read_Attributes>
[0xf824:1:0x000a] ZCL request 0x0000: [[7]]
[0x0ef7:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=83 command_id=Command.Report_Attributes>
[0x0ef7:1:0x0400] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=24984>)]]
[0x0ef7:1:0x0400] Attribute report received: measured_value=24984

Additional context The device, if not paired to Home Assistant, worked properly, showing correct values and never resetting.

vvuk commented 2 years ago

Can I get that just from the zigpy/etc logs, or do I need to set up wireshark?

MattWestb commented 2 years ago

Its possible setting up debug in HA but its not so easy see wot happening then the log is very spammed of other messages that is not interesting but you can try and looking if you see bindings and configuring of attribute reporting of the device.

vvuk commented 2 years ago

Yeah, I can filter the other stuff out easily enough though -- will post something later on today.

kkossev commented 2 years ago

I can confirm that TS0222 worked without any resets for a week (in Hubitat), after I removed sending any reporting configuration commands during the device initialization after pairing:

image

The battery percentage is not reported either, but I think this can be easily resolved by sending a battery report command each 24 hours when the device awakes (after receiving a T/H report ).

T/H are reported on value change or on every 60 minutes if no change of the measurement values.

MattWestb commented 2 years ago

Is it possible only configuring reporting of the battery with some long time (Zigbee is reporting normally min, max delta and max time in seconds) then testing only doing that and leaving all other reporting for see is its OK and all other reporting is not needed then all is "self" reported.

If the device is not getting problem its better the the system is reading attributes that is triggered from the host system but if its not working it better then no battery reporting at all.

kkossev commented 2 years ago

Done - battery reporting configured for a maximum interval of 8 hours, will see if it will work and whether it will affect the stability.

almico commented 2 years ago

By the way... I connected a TS0222 to an official Tuya Zigbee gateway and... I'm not getting lovely results 😆 I've seen the temperature report 0 and then return to the same temperature from two days ago, even if it actually decreased by more than 2 degrees centigrades. I hope it's not due to the continuous resets it performed connected to ZHA 😢

almico commented 2 years ago

I just tried pressing its red button and all sorts of things happened (repeatedly blinking the whole screen, show all zeros, ...). I'm going to reset it completely once again now...

kkossev commented 2 years ago

@almico seems like the battery cell has depleted. This is a side effect of the frequent restarts, followed by zigbee network join sequences - these consume a lot of energy. So, if your TS0222 device has been resetting itself for a week or two, the battery may have gone.

kkossev commented 2 years ago

@MattWestb Configuring the power reporting undoubtedly causes TS0222 to reset! My device was resetting every 5 minutes, when I configured minimum 600 seconds reporting interval ( like this in Hubitat : zigbee.configureReporting(0x0001, 0x0021, DataType.UINT8, 600, 28800, 0x1)) Disabling the reporting configuration brings back stable operation of the device.

almico commented 2 years ago

@kkossev Unfortunately (?), the battery is new and reporting 100% 😢 I removed the TS0222 from Tuya, removed the battery for 15 minutes, then paired again. Now it seems to be working fine. In between, Tuya Zigbee Gateway updated both its core firmware module and its Zigbee module, thus, I don't know if now it works because of the TS0222 reset or because of the gateway update 😄

almico commented 2 years ago

I have the TS0222 next to another temperature sensor, thus, they should report similar temperatures or, at least, similar variations, but this is what I get: image where the mostly horizontal line is from the TS0222. The TS0222 is currently connected to a Tuya Zigbee gateway and data is brought to Home Assistant via the official Tuya integration. By the way: even the Tuya app reports the very same, almost flat, temperature. I wonder if the multiple resets caused the device to be less than fully functional or what's going on otherwise...

kkossev commented 2 years ago

@almico unfortunately, I have to confirm the same problem... After a week my device stopped sending temperature and humidity updates to the Zigbee coordinator. Only the brightness readings are sent on illuminance change.

I don't believe a microprocessor-controlled device can be broken by continuous reboots, nor the simple temperature and humidity sensor inside it... Seems more like a bug in TS0222 firmware.

Can you again first remove the device from Tuya app, then remove the battery for at least 10 minutes, then add the device again to the Tuya gateway - for how long the temperature and the humidity reading updates will be reported?

almico commented 2 years ago

I unpaired from Tuya Zigbee coordinator, removed the battery for a few hours, paired to Tuya again and this is what I see: image

To be honest, Tuya integration in Home Assistant is a plain pain in the ... Thus it might be due to it the lack of readings. Unfortunately, the official Smart Life application reports an identical graph.

I really think the two TS0222 I purchased will be better used as coasters 😆

kkossev commented 2 years ago

Unfortunately, the official Smart Life application reports an identical graph.

This is what worries me as well... if it doesn't work well with Tuya ZGW then there is very little chance to work better in other HA platforms...

That's a pity because the e-ink displays really look nice!

almico commented 2 years ago

Ok! Today, after the device has always been connected to a Tuya Zigbee Controller, the device itself is showing zero for temperature and humidity and only brightness is properly updated. Definitely a useless device. At least with its current firmware 😭

MattWestb commented 2 years ago

Hope tuya is making one firmware update that making it working more normal so we can have some use of it also in tuya and open system.

Very sad then the device is looking very nice ;-(

nohat commented 2 years ago

I have 4 of these devices and had this problem with the bad data and constant resets when I paired them to my HUSBZB-1 connected to ZHA.

I recently acquired a CC2652-P-based Sonoff Zigbee Dongle 3.0 Plus which I have set up with Zigbee2MQTT, and paired all four TS0222 devices to it. They have been set up this way for about a week now and have been working flawlessly. No data dropouts, no resets. Everything just works fine.

MattWestb commented 2 years ago

Shall being interesting to knowing if you is having the same problem with TI coordinator in ZHA.

Also if updated firmware on the the HUSBZB-1 (the latest EZSP 6.7.8.0 is normal working good and older is having many problems but we is having problem getting it running on the latest 6.10.x then its not supported but perhaps possible getting working with Garys help).

By the was nice snow white there !!

almico commented 2 years ago

As a last resort, I removed from Smart Life, took off the battery for 15 minutes, then paired to Zigbee2MQTT. The device shows, on its display, 7 lux, 0 temperature, and 0 humidity. Does anybody know a way to factory reset it?

almico commented 2 years ago

By the way, after endless patience, I managed to see realistic illuminance, temperature, and humidity on the device after having removed the battery for the whole night and then connected to Zigbee2Mqtt. Everything, for Home Assistant to Z2M integration, appears to be the latest version. Unfortunately, after less than 30 minutes, zeroes appeared again (and never went away). I did this final check on an Intel NUC with M.2, a fully updated ZZH! zigbee controller, and all latest versions available of everything (including the latest firmware for the TS0222). I think this sets, at least for me, the tombstone on this device. That's sad.

MattWestb commented 2 years ago

Great work done with testing all possible and impossible things @almico !!

Sad for you and all other user that the device is made for the recycle bin but i think its the right place for it until tuya is releasing one working firmware for it :-((

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

evlo commented 2 years ago

for me it worked bit better with z2m, but then other stuff works worse with it, at least for me it does

I don't know if my issues stem from tuya or zigbee, but not the greatest experience overall with migration to HA so far.

almico commented 2 years ago

I wouldn't judge ZHA from any experience around this horrible device 😄

akloeckner commented 1 year ago

Hi there, I just wanted to chime in with the choir: I really do like the looks of the device and the features it brings. But I really do not want to route all my temperature readings through the Tuya cloud... If you see any way this can be supported, I would really appreciate!

igorsantos07 commented 1 year ago

Confirming that the only way for now seems to be having information coming from Tuya. Besides this deaded cloud dependency, it's pretty much instant - sometimes I even see my dashboard updating before the actual device lol

Sadly, this "joke" was pretty expensive, since I pretty much had to buy the gateway just for it. I wasn't even able to include the gateway in the HA network.

akloeckner commented 1 year ago

the only way for now seems to be having information coming from Tuya

I don't want to spoil the joy. But: I had it hooked up to a Tuya gateway, too. And sooner or later, the sensor would also start behaving strangely. For now, I am just using them offline. :-/