question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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={"sku_id"%3A"12000027896131186"}&pdp_npi=2%40dis!CHF!14.1!5.43!!!!!%402101e9d516592967255884625e5a92!12000027896131186!sea

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:52 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hemy81commented, Aug 14, 2022

@javicalle I attached the quirk I am using atm:

"""Tuya temp and humidity sensor with e-ink screen."""

from typing import Dict

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import RelativeHumidity, TemperatureMeasurement

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SKIP_CONFIGURATION,
)
from zhaquirks.tuya import TuyaLocalCluster, TuyaPowerConfigurationCluster2AAA
from zhaquirks.tuya.mcu import DPToAttributeMapping, TuyaDPType, TuyaMCUCluster

# NOTES:
# The data comes in as a string on cluster, if there is nothing set up you may see these lines in the logs:
# Unknown message (b'19830100a40102000400000118') on cluster 61184: unknown endpoint or cluster id: 'No cluster ID 0xef00 on (a4:c1:38:d0:18:8b:64:aa, 1)'
#                                          28.0 degrees
# Unknown message (b'19840100a5020200040000022c') on cluster 61184: unknown endpoint or cluster id: 'No cluster ID 0xef00 on (a4:c1:38:d0:18:8b:64:aa, 1)'
#                                          55.6% humid
# Unknown message (b'19850100a60402000400000064') on cluster 61184: unknown endpoint or cluster id: 'No cluster ID 0xef00 on (a4:c1:38:d0:18:8b:64:aa, 1)'
#                                          100% battery


class TuyaTemperatureMeasurement(TemperatureMeasurement, TuyaLocalCluster):
    """Tuya local TemperatureMeasurement cluster."""


class TuyaRelativeHumidity(RelativeHumidity, TuyaLocalCluster):
    """Tuya local RelativeHumidity cluster."""


class TemperatureHumidityManufCluster(TuyaMCUCluster):
    """Tuya Manufacturer Cluster with Temperature and Humidity data points."""

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaTemperatureMeasurement.ep_attribute,
            "measured_value",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: x * 10,  # decidegree to centidegree
        ),
        2: DPToAttributeMapping(
            TuyaRelativeHumidity.ep_attribute,
            "measured_value",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: x * 100,  # decipercent to percent
        ),
        4: DPToAttributeMapping(
            TuyaPowerConfigurationCluster2AAA.ep_attribute,
            "battery_percentage_remaining",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: x * 2,  # double reported percentage
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
    }


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

    signature = {
        # <SimpleDescriptor endpoint=1, profile=260, device_type=81
        # device_version=1
        # input_clusters=[4, 5, 61184, 0]
        # output_clusters=[25, 10]>
        MODELS_INFO: [("_TZE200_bjawzodf", "TS0601")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TemperatureHumidityManufCluster.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: [
                    TemperatureHumidityManufCluster,  # Single bus for temp, humidity, and battery
                    TuyaTemperatureMeasurement,
                    TuyaRelativeHumidity,
                    TuyaPowerConfigurationCluster2AAA,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }
    
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],
            }
        },
    }
1reaction
ernstmoschcommented, Nov 2, 2022

Hi Javicalle,

i dont feel very comfortable in submitting this code on github, because i somehown have to merge the two devices “_TZE200_bjawzodf” (from original source) and “_TZE200_qoy0ekbd” (mine) in the quirk.

Even after locally testing i wouldnt know if i ruined the other device.

If you woul finish the pull request i woul feel much better.

kind regarde, Ernsti

Read more comments on GitHub >

github_iconTop Results From Across the Web

Smart Humidity & Temperature Sensor |Sensors
Get smart Humidity & Temperature Sensor at the Expo - the Global AIoT B2B Supplier Platform powered by Tuya. Request a free quote...
Read more >
[RELEASE] Tuya Temperature Humidity Illuminance LCD ...
Update: this device can display the temperature in Fahrenheit scale (when F scale is set on your HE hub), although may require several...
Read more >
Tuya Wifi Smart Home Temperature and Humidity Sensor with ...
Support Fahrenheit & Celsius Display. Connected to Wifi directly, low power consumption, reliable and efficient transmission; The LCD screen dynamically ...
Read more >
Tuya Zigbee 3.0 Temperature And Humidity Sensor not show ...
HI ! I connect via zigbee ( usb dongle zigbee ) Tuya Zigbee 3.0 Temperature And Humidity Sensor with lcd, and luminous intensity...
Read more >
Tuya Zigbee humidity sensor with LCD display
Smart Home LCD Electronic Digital Temperature Sensor Humidity Meter Cable Indoor Outdoor Brightness Thermometer Hygrometer 2021.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found