zha-device-handlers icon indicating copy to clipboard operation
zha-device-handlers copied to clipboard

[Device Support Request] Aubees Tuya Temperature and Humidity LCD sensor

Open hemy81 opened this issue 1 year ago • 44 comments

This is a device request for the Aubees Tuya Temperature and Humidy LCD sensor from Ali: https://de.aliexpress.com/item/1005004059457595.html?spm=a2g0o.productlist.0.0.5b6f72c4OnhJgH&algo_pvid=46b8c263-c6f4-4865-a96e-652f9ca89e9d&algo_exp_id=46b8c263-c6f4-4865-a96e-652f9ca89e9d-6&pdp_ext_f=%7B%22sku_id%22%3A%2212000027896131186%22%7D&pdp_npi=2%40dis%21CHF%2114.1%215.43%21%21%21%21%21%402101e9d516592967255884625e5a92%2112000027896131186%21sea

Describe the solution you'd like So far the device is detected within ZHA. I can see thee entities: Temperature, Humidity and Battery. But all values are 0.0. It would be nice to see the real numbers. I have experimented with clusters, but could not get anything out. Does anybody have a solution?

Diagnostic information
Although the device is detected I get the following message in the log of ZHA during pairing.
![8B952D21-DED6-4357-B225-AFFEFD8D654C](https://user-images.githubusercontent.com/13441102/182043218-90e3ff87-bc99-498d-b840-aa56fc18bf3d.jpeg)

Ignoring message (b'09070200190102000400000111') on cluster 61184: unknown endpoint or cluster id: 'No cluster ID 0xef00 on (a4:c1:38:bd:69:c9:08:6f, 1)'
Additional logs
Paste any additional debug logs here.
Don't remove the extra line breaks outside the ``` marks.

Additional context Add any other context or screenshots about the feature request here.

hemy81 avatar Jul 31 '22 20:07 hemy81

Please, attach the device's signature. You can get it from the device's details view.

javicalle avatar Jul 31 '22 21:07 javicalle

Sorry: { "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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 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)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0302", "in_clusters": [ "0x0000", "0x0001", "0x0402", "0x0405" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_qoy0ekbd", "model": "TS0601", "class": "zigpy.device.Device" }

hemy81 avatar Jul 31 '22 22:07 hemy81

It seems a quite normal Zigbee device. Have you tried reconfiguring the device while keeping the device awake? You can do it short pressing the reset pinhole while pairing.

javicalle avatar Aug 02 '22 17:08 javicalle

In issue #1682 other user was sugested to use the TuyaTempHumiditySensor quirk, but it seems that is not working. @ernstmosch check if after applying the quirk the device signature has changed from the "class": "zigpy.device.Device" value.

In this issue, @hemy81 has reported to get some logs like:

Ignoring message (b'09070200190102000400000111') on cluster 61184: unknown endpoint or cluster id: 'No cluster ID 0xef00 on (a4:c1:38:bd:69:c9:08:6f, 1)'

These logs would give to us information about the device reporting.

Despite that device have the temp & hum clusters it seems to be reporting in the (hidden) Tuya manufacturer cluster.

If can you confirm the reporting cluster a quirk can be made, but probably would need to convert the values, so will need the info from logs and the 'correct' ones to made the conversion.

javicalle avatar Aug 06 '22 09:08 javicalle

My (not tested, not validated) proposal:

class TuyaTempHumiditySensor_Square(CustomDevice):
    """Custom device representing tuya temp and humidity sensor with e-ink screen."""

    signature = {
        # <SimpleDescriptor endpoint=1, profile=260, device_type=0x0302
        # input_clusters=[0x0000, 0x0001, 0x0402, 0x0405]
        # output_clusters=[0x000a, 0x0019]>
        MODELS_INFO: [("_TZE200_qoy0ekbd", "TS0601")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    TuyaPowerConfigurationCluster2AAA.cluster_id,
                    TemperatureMeasurement.cluster_id,
                    RelativeHumidity.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }

    replacement = {
        SKIP_CONFIGURATION: True,
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    TuyaPowerConfigurationCluster2AAA,
                    TuyaTemperatureMeasurement,
                    TuyaRelativeHumidity,
                    TemperatureHumidityManufCluster,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }

Enable the custom quirks configuration, copy the current ts0601_sensor.py inside the folder and edit it adding the proposed class at the end of the file.

  • https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_sensor.py

Save changes, delete cache and restart. Check if the device signature has changed to the new TuyaTempHumiditySensor_Square and look to any relevant info in the logs.

javicalle avatar Aug 06 '22 10:08 javicalle

@javicalle Thank you very much for your suggestion! Let me just summarise what I did:

  • enabled ZHA custom quirks in the config
  • I took your suggested code and added it to the end of the ts0601_sensor.py file in the custom_zha_quirks folder.

This resulted in a ZHA error, which you find attached here:

`Logger: homeassistant.config_entries Source: custom_zha_quirks/ts0601_sensor.py:85 First occurred: 14:10:25 (1 occurrences) Last logged: 14:10:25

Error setting up entry ConBee II - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2481023-if00, s/n: DE2481023 - dresden elektronik ingenieurtechnik GmbH - 1CF1:0030 for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 99, in async_setup_entry setup_quirks(config) File "/usr/local/lib/python3.10/site-packages/zhaquirks/init.py", line 409, in setup importer.find_module(modname).load_module(modname) File "", line 548, in _check_name_wrapper File "", line 1063, in load_module File "", line 888, in load_module File "", line 290, in _load_module_shim File "", line 719, in _load File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_zha_quirks/ts0601_sensor.py", line 71, in class TuyaTempHumiditySensor_Square(CustomDevice): File "/config/custom_zha_quirks/ts0601_sensor.py", line 85, in TuyaTempHumiditySensor_Square PowerConfiguration.cluster_id, NameError: name 'PowerConfiguration' is not defined`

I also tried to replace the "class TuyaTemp..." in the original ts0601_sensor.py file, with the same error. ZHA refuses to work at all here.

hemy81 avatar Aug 06 '22 12:08 hemy81

Caught it! Replace in the new class the PowerConfiguration with TuyaPowerConfigurationCluster2AAA.

Already fixed in the previous code.

javicalle avatar Aug 06 '22 12:08 javicalle

Thanks for the prompt reply. I applied the changes and there was no error message. I removed the device and added it again in the ZHA integration. It was found, but all the measured values are still 0.0.

Screenshot 2022-08-06 at 15 14 20

hemy81 avatar Aug 06 '22 13:08 hemy81

Has the quirk been applied to the device? Check if the device's signature has changed.

Maybe you would need to enable the debug logs.

javicalle avatar Aug 06 '22 16:08 javicalle

Thanks for your answer. The Zigbee-Signature has not changed. So I guess it is still using the ZHA device handler and not the quirk, if I understand this correct. How can I apply the quirk to the device, this is not clear to me.

hemy81 avatar Aug 06 '22 18:08 hemy81

The quirk can't be forced, the device signature must match the quirk signature. Try to remove the TemperatureHumidityManufCluster from the signature, like this:

    signature = {
        # <SimpleDescriptor endpoint=1, profile=260, device_type=0x0302
        # input_clusters=[0x0000, 0x0001, 0x0402, 0x0405]
        # output_clusters=[0x000a, 0x0019]>
        MODELS_INFO: [("_TZE200_qoy0ekbd", "TS0601")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    TuyaPowerConfigurationCluster2AAA.cluster_id,
                    TemperatureMeasurement.cluster_id,
                    RelativeHumidity.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }

Save changes, delete cache and restart. Check if the device's signature changes.

If not, enable debug logs and pair again the device. Attache the logs from the pairing process.

javicalle avatar Aug 06 '22 20:08 javicalle

Hey @javicalle You really MADE MY DAY. Thank You So much for bringing me forward in understanding the ZHA and quirks thing.

After Applying you quirk from 10 hours ago my ZHA Device shows me Temp and Humidity,

Battery charge is not transferred to ZHA and Humidity is not shown as 37% it pops up at 3,7%

But im absolutely fine with that or put it in other words will see at that later, Now that you put a "personal quirk" between me an the zigbee/ZHA/HA infrastructure.

I cannot thank you enough! This Thing is not only about getting a single device to work it is about to show (and in mycase learn) how it can be done.

ernstmosch avatar Aug 07 '22 06:08 ernstmosch

Once again, all the required info seems to be in the zigbee-herdsman-converters library:

  • https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js#L1952-L1980

Interesting that humidity fix:

            case tuya.dataPoints.tthHumidity:
                return {humidity: calibrateAndPrecisionRoundOptions(
                    (value / (meta.device.manufacturerName === '_TZE200_bjawzodf' ? 10 : 1)),
                    options, 'humidity')};

Probably only battery levels (and not % values) will be available.

javicalle avatar Aug 07 '22 10:08 javicalle

@javicalle thanks a lot for the fix. Very much appreciated! I also learned a lot during this fix. I can confirm what @ernstmosch found. The temperature, humidity and even the battery % are transferred. The humidity is an order of magnitude off, which is fine as we can fix this. However I changed the temperature and the humidity and no new values are reported to HA. It seems that it only shows the numbers from the initial configuration. Can you confirm this @ernstmosch ?

hemy81 avatar Aug 07 '22 11:08 hemy81

@hemy81 im not sure if i got your question right but this is what my sensor does:

image

i know the reason for that, but i didnt get my mind up how to smoothen that wave...

And once again thanx to @javicalle @hemy81 and everybody around HA!

ernstmosch avatar Aug 08 '22 08:08 ernstmosch

@ernstmosch Is the device reporting 0 (zero or null) between the normal reports ? If its doing that then i think its good putting one filter in the quirk that taking them way and you is getting one nice graph in HA.

I think the reporting is not good if i remember what the other devs was finding then getting some tuya LCD sensors working in there system.

MattWestb avatar Aug 08 '22 16:08 MattWestb

@ernstmosch Is the device reporting 0 (zero or null) between the normal reports ? If its doing that then i think its good putting one filter in the quirk that taking them way and you is getting one nice graph in HA.

I think the reporting is not good if i remember what the other devs was finding then getting some tuya LCD sensors working in there system.

Hi @MattWestb I found the line in the quirk to get Humidity in to percent

   2: DPToAttributeMapping(
            TuyaRelativeHumidity.ep_attribute,
            "measured_value",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: x * 100,  # decipercent to percent
        ),

And i found that the Device is setting its Values to 0.0 in its "idle" times:

2022-08-09 12:11:48.660 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=24.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-09T12:04:56.233719+02:00>, new_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-09T12:11:48.659719+02:00>>

But my dev-capabilities combined with intense search-engine usage are far tocrappy to filter the Value '0.0' in the two sensors out.

But Again: THANK EVERYBODY around here!

ernstmosch avatar Aug 09 '22 11:08 ernstmosch

As I have asked for several times, please enable the debug logs and attach the relevant info.

If the device reports incorrect values, it can be fixed, but we need to know what is the device reporting. We can't just drop the 0 value (because 0 is a valid temperature).

javicalle avatar Aug 09 '22 12:08 javicalle

Sorry @javicalle

i have set:

logger:
  default: info
  logs:
    homeassistant.core: debug
    homeassistant.components.zha: debug
    bellows.zigbee.application: debug
    bellows.ezsp: debug
    zigpy: debug
    zigpy_deconz.zigbee.application: debug
    zigpy_deconz.api: debug
    zigpy_xbee.zigbee.application: debug
    zigpy_xbee.api: debug
    zigpy_zigate: debug
    zigpy_znp: debug
    zhaquirks: debug

in Config.

and i thaught that the line from "\config\homeasisstant.log which i mentione in my last post;

2022-08-09 12:11:48.660 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=24.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-09T12:04:56.233719+02:00>, new_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-09T12:11:48.659719+02:00>>

Was the Info you have been asking for - if not please tell me what to or tell me that i should not post anymore in this thread.

ernstmosch avatar Aug 09 '22 13:08 ernstmosch

We need the logs from the device report. It must be something like:

2022-08-09 20:14:33 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=2820, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_ENABLE_ROUTE_DISCOVERY: 256>, groupId=0, sequence=180), 255, -53, 0x68e4, 255, 255, b'\x18\xd7\x01\x0b\x05\x00)\x04\x00\x08\x05\x00!\x1a\x00\x05\x05\x00!\xdd\x00']
2022-08-09 20:14:33 DEBUG (MainThread) [zigpy.zcl] [0x68E4:1:0x0b04] Received ZCL frame: b'\x18\xd7\x01\x0b\x05\x00)\x04\x00\x08\x05\x00!\x1a\x00\x05\x05\x00!\xdd\x00'
2022-08-09 20:14:33 DEBUG (MainThread) [zigpy.zcl] [0x68E4:1:0x0b04] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=215, command_id=1, *is_reply=True)
2022-08-09 20:14:33 DEBUG (MainThread) [zigpy.zcl] [0x68E4:1:0x0b04] Decoded ZCL frame: TuyaZBElectricalMeasurement:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x050B, status=<Status.SUCCESS: 0>, value=TypeValue(type=int16s, value=4)), ReadAttributeRecord(attrid=0x0508, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=26)), ReadAttributeRecord(attrid=0x0505, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=221))])

The interesting ones must contain something like [0xABCD:1:0x0402] where 0xABCD would be your device Nwk (you can get it from 'Zigbee info' in the device view). The 0x0402 is the TemperatureMeasurement cluster.

There must have several reports along the time. It seems that some can be with the correct value and some must be something else:

  • correct: ReadAttributeRecord(attrid=0x0000, status=<Status.SUCCESS: 0>, value=TypeValue(type=int16s, value=26))
  • wrong: ReadAttributeRecord(attrid=0x0000, status=<Status.SUCCESS: 0>, value=TypeValue(type=int16s, value=¿¿??))

The attrid=0x0000 is the measured_value (for the Temperature cluster). If there is not attrid=0x0000 reports with wrong values, look for any other reports for the Temperature cluster. Also, all the values reported in the logs, must be in the HA graph. Maybe there is something wrong with the data (non integer values?).

javicalle avatar Aug 09 '22 18:08 javicalle

Dear all, sorry for the late reply, I just turned on logging, will send more data when available. @ernstmosch's fix worked for the humidity! Thanks!

I have two of these sensors running and both work, expect that HA only receives values from time to time (see graph). Screenshot 2022-08-09 at 16 38 27 Even if I change the temperature/humidity by breathing on the device the changes are not registered immediately. I thought that once temp. or hum. changes a zigbee command is send, which is likely not the case.

hemy81 avatar Aug 09 '22 19:08 hemy81

Hello Everybody

my logs a bit "loded but i hope the needed info is in it

here is how my sensor jumps to the correct value:

2022-08-10 12:19:16.648 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [36, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 61184, b'\tU\x02\x00\xe5\x01\x02\x00\x04\x00\x00\x00\xe8', 0, 175, 255, 197, 216, 99, 0, -70] 2022-08-10 12:19:16.650 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received ZCL frame: b'\tU\x02\x00\xe5\x01\x02\x00\x04\x00\x00\x00\xe8' 2022-08-10 12:19:16.651 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=85, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:19:16.654 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=229, dp=1, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xe8\x00\x00\x00', *payload=232))) 2022-08-10 12:19:16.655 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received command 0x02 (TSN 85): set_data_response(data=TuyaCommand(status=0, tsn=229, dp=1, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xe8\x00\x00\x00', *payload=232))) 2022-08-10 12:19:16.661 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=85, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:19:16.662 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>) 2022-08-10 12:19:16.666 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0xef00, data: b'09550200e501020004000000e8' 2022-08-10 12:19:16.723 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (20, 94, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=2 address=0x3E71 endpoint=1>, 260, 61184, 1, b'\x18U\x0b\x02\x00', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0) 2022-08-10 12:19:16.865 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0x5e 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=ADDRESS_MODE.NWK address=0x3e71 endpoint=1>, status: 0x00 2022-08-10 12:19:17.034 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [36, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 61184, b"\tV\x02\x00\xe6\x02\x02\x00\x04\x00\x00\x00'", 0, 175, 255, 197, 216, 99, 0, -70] 2022-08-10 12:19:17.035 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received ZCL frame: b"\tV\x02\x00\xe6\x02\x02\x00\x04\x00\x00\x00'" 2022-08-10 12:19:17.037 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=86, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:19:17.039 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=230, dp=2, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b"'\x00\x00\x00", *payload=39))) 2022-08-10 12:19:17.039 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received command 0x02 (TSN 86): set_data_response(data=TuyaCommand(status=0, tsn=230, dp=2, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b"'\x00\x00\x00", *payload=39))) 2022-08-10 12:19:17.043 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=86, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:19:17.044 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>) 2022-08-10 12:19:17.048 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0xef00, data: b'09560200e60202000400000027' 2022-08-10 12:19:17.049 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (20, 95, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=2 address=0x3E71 endpoint=1>, 260, 61184, 1, b'\x18V\x0b\x02\x00', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0) 2022-08-10 12:19:17.074 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0x5f 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=ADDRESS_MODE.NWK address=0x3e71 endpoint=1>, status: 0x00

And it falls back to zero

2022-08-10 12:31:01.938 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|APSDE_DATA_INDICATION|2: 42>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1029, b'\x18W\n\x00\x00!\x00\x00', 0, 175, 240, 23, 217, 99, 0, -71] 2022-08-10 12:31:01.939 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Received ZCL frame: b'\x18W\n\x00\x00!\x00\x00' 2022-08-10 12:31:01.941 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=87, command_id=10, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:31:01.942 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Decoded ZCL frame: TuyaRelativeHumidity:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=0))]) 2022-08-10 12:31:01.943 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Received command 0x0A (TSN 87): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=0))]) 2022-08-10 12:31:01.943 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Attribute report received: measured_value=0 2022-08-10 12:31:01.947 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0x0405, data: b'18570a0000210000' 2022-08-10 12:31:01.950 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1026, b'\x18X\n\x00\x00)\x00\x00', 0, 175, 255, 164, 216, 99, 0, -71] 2022-08-10 12:31:01.951 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received ZCL frame: b'\x18X\n\x00\x00)\x00\x00' 2022-08-10 12:31:01.952 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=88, command_id=10, *direction=<Direction.Client_to_Server: 1>, *is_reply=True) 2022-08-10 12:31:01.953 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame: TuyaTemperatureMeasurement:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))]) 2022-08-10 12:31:01.953 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received command 0x0A (TSN 88): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))]) 2022-08-10 12:31:01.954 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Attribute report received: measured_value=0 2022-08-10 12:31:01.957 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0x0402, data: b'18580a0000290000'

image

now with a filter on the sensor

2022-08-10 12:19:16.657 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:00:56.768494+02:00>, new_state=<state sensor.thermi_temperature=23.2; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:19:16.656819+02:00>>
2022-08-10 12:19:17.041 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_humidity, old_state=<state sensor.thermi_humidity=0.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-10T12:00:56.756530+02:00>, new_state=<state sensor.thermi_humidity=39.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-10T12:19:17.041613+02:00>>
2022-08-10 12:31:01.944 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_humidity, old_state=<state sensor.thermi_humidity=39.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-10T12:19:17.041613+02:00>, new_state=<state sensor.thermi_humidity=0.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-10T12:31:01.944550+02:00>>
2022-08-10 12:31:01.955 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=23.2; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:19:16.656819+02:00>, new_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:31:01.954807+02:00>>

ernstmosch avatar Aug 10 '22 12:08 ernstmosch

or after reading your last post one more time

filter on: [0x3e71:1:0x0402]

2022-08-10 12:46:04.544 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received ZCL frame: b'\x18\\\n\x00\x00)\x00\x00'
2022-08-10 12:46:04.545 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=92, command_id=10, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-10 12:46:04.546 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame: TuyaTemperatureMeasurement:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))])
2022-08-10 12:46:04.546 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received command 0x0A (TSN 92): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))])
2022-08-10 12:46:04.547 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Attribute report received: measured_value=0

filter on thermi temperature

2022-08-10 12:45:52.465 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:31:01.954807+02:00>, new_state=<state sensor.thermi_temperature=23.6; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:45:52.464884+02:00>>
2022-08-10 12:46:04.548 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=23.6; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:45:52.464884+02:00>, new_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-10T12:46:04.547856+02:00>>

image

Thank you

ernstmosch avatar Aug 10 '22 12:08 ernstmosch

I can't say that something is wrong but some report values seems at least strange to me:

  • b'\x18X\n\x00\x00)\x00\x00'
  • b'\x18\\\n\x00\x00)\x00\x00'
  • b'\x18W\n\x00\x00!\x00\x00'

@dmulcahey sorry to ping to you directly, but before drop all the 0 values (which would be legitimate values for a temperature) could you check if there is something wrong in the decode frame part? Or can be some kind of zero/default value when parsing an incomplete frame? (This part is difficult for me to go through)

Thanks in advanced.

javicalle avatar Aug 11 '22 16:08 javicalle

If filtering the device looks working OK the greater then 0.01 and lesser - 0.01 is being reported OK and only some reports with 0 is being missed and shall not being any large problem in the graph in HA.

MattWestb avatar Aug 11 '22 20:08 MattWestb

If filtering the device looks working OK the greater then 0.01 and lesser - 0.01 is being reported OK and only some reports with 0 is being missed and shall not being any large problem in the graph in HA.

Yes, I can agree with that but I was worry that we were masking some other problem. Since I don't control the frame parsing part, I wanted a second opinion about it 🤷🏻‍♂️

javicalle avatar Aug 12 '22 19:08 javicalle

Wait, there are a pattern here... 💣 When the device reports through the Tuya cluster (0xEF00), the values appear to be correct. It seems that the problem comes from the values reported by the cluster of temperature (0x0402) and humidity (0x0405) that have the values 0. And it seems that they are replies (*is_reply=True) to something, maybe some polling mechanism?

javicalle avatar Aug 12 '22 19:08 javicalle

I dont actually understand what it means but the times in log suggest that [0x3E71:1:0x0402] is responsible for the zeros while [0x3E71:1:0xef00] has to deal with values.

[0x3E71:1:0x0402] (when sensor jumps to 0):

`2022-08-13 06:27:21.056 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1026, b'\x18\xac\n\x00\x00)\x00\x00', 0, 175, 248, 115, 78, 100, 0, -68]
2022-08-13 06:27:21.057 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received ZCL frame: b'\x18\xac\n\x00\x00)\x00\x00'


2022-08-13 07:12:28.734 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1026, b'\x18\xb5\n\x00\x00)\x00\x00', 0, 175, 184, 73, 80, 100, 0, -74]
2022-08-13 07:12:28.735 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received ZCL frame: b'\x18\xb5\n\x00\x00)\x00\x00'`

[0x3E71:1:0xef00] at a timestamp when sensors jump to values:


`2022-08-13 06:58:38.675 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received ZCL frame: b'\t\xb1\x02\x00\xe9\x01\x02\x00\x04\x00\x00\x00\xe8'
2022-08-13 06:58:38.676 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=177, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:58:38.678 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=233, dp=1, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xe8\x00\x00\x00', *payload=232)))
2022-08-13 06:58:38.681 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received command 0x02 (TSN 177): set_data_response(data=TuyaCommand(status=0, tsn=233, dp=1, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\xe8\x00\x00\x00', *payload=232)))
2022-08-13 06:58:38.684 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=177, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:58:38.685 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)
2022-08-13 06:58:38.944 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received ZCL frame: b'\t\xb2\x02\x00\xea\x02\x02\x00\x04\x00\x00\x00%'
2022-08-13 06:58:38.945 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=178, command_id=2, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:58:38.947 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:set_data_response(data=TuyaCommand(status=0, tsn=234, dp=2, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'%\x00\x00\x00', *payload=37)))
2022-08-13 06:58:38.948 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Received command 0x02 (TSN 178): set_data_response(data=TuyaCommand(status=0, tsn=234, dp=2, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'%\x00\x00\x00', *payload=37)))
2022-08-13 06:58:38.952 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=178, command_id=<GeneralCommand.Default_Response: 11>, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:58:38.953 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0xef00] Sending reply: Default_Response(command_id=2, status=<Status.SUCCESS: 0>)`


ernstmosch avatar Aug 13 '22 05:08 ernstmosch

and here is the unfiltered log of a zero event:

2022-08-13 06:27:21.030 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.128|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|APSDE_DATA_INDICATION|2: 170>, 0]
2022-08-13 06:27:21.032 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, 1)
2022-08-13 06:27:21.035 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.128|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|APSDE_DATA_INDICATION|2: 170>, 0]
2022-08-13 06:27:21.040 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|APSDE_DATA_INDICATION|2: 42>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1029, b'\x18\xab\n\x00\x00!\x00\x00', 0, 175, 252, 35, 79, 100, 0, -68]
2022-08-13 06:27:21.041 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Received ZCL frame: b'\x18\xab\n\x00\x00!\x00\x00'
2022-08-13 06:27:21.042 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=171, command_id=10, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:27:21.044 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Decoded ZCL frame: TuyaRelativeHumidity:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=0))])
2022-08-13 06:27:21.045 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Received command 0x0A (TSN 171): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=0))])
2022-08-13 06:27:21.045 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0405] Attribute report received: measured_value=0
2022-08-13 06:27:21.050 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_humidity, old_state=<state sensor.thermi_humidity=37.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-13T06:13:08.765099+02:00>, new_state=<state sensor.thermi_humidity=0.0; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Thermi Humidity @ 2022-08-13T06:27:21.049819+02:00>>
2022-08-13 06:27:21.052 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0x0405, data: b'18ab0a0000210000'
2022-08-13 06:27:21.052 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, 1)
2022-08-13 06:27:21.056 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [31, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x0000>, 1, <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, 1, 260, 1026, b'\x18\xac\n\x00\x00)\x00\x00', 0, 175, 248, 115, 78, 100, 0, -68]
2022-08-13 06:27:21.057 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received ZCL frame: b'\x18\xac\n\x00\x00)\x00\x00'
2022-08-13 06:27:21.058 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=172, command_id=10, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-08-13 06:27:21.059 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Decoded ZCL frame: TuyaTemperatureMeasurement:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))])
2022-08-13 06:27:21.059 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Received command 0x0A (TSN 172): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=int16s, value=0))])
2022-08-13 06:27:21.060 DEBUG (MainThread) [zigpy.zcl] [0x3E71:1:0x0402] Attribute report received: measured_value=0
2022-08-13 06:27:21.061 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.thermi_temperature, old_state=<state sensor.thermi_temperature=23.2; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-13T06:13:08.537182+02:00>, new_state=<state sensor.thermi_temperature=0.0; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Thermi Temperature @ 2022-08-13T06:27:21.060799+02:00>>
2022-08-13 06:27:21.064 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK address=0x3e71>, ep: 1, profile: 0x0104, cluster_id: 0x0402, data: b'18ac0a0000290000'

ernstmosch avatar Aug 13 '22 05:08 ernstmosch

Both temp and humidity is sending 0.0.

state sensor.thermi_temperature=0.0
state sensor.thermi_humidity=0.0

so i think both need filter for 0.0 and all other shall being OK and its only bad if the humidity (not possible in the real world) or the temperature is long measured 0.0 for long time and the graph shall looking OK all the other time.

MattWestb avatar Aug 13 '22 06:08 MattWestb