-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device Support Request] TS0601 _TZE204_lsanae15 Energy Metr https://a.aliexpress.com/_DEPdXVR #3098
Labels
Tuya
Request/PR regarding a Tuya device
Comments
I added to the file tuya/ts0601 din_power.py
I tried to install TuyaOnOff and it doesn't work. MATSEE_TOTAL_ENERGY_DELIVERED_ATTR = 0x0201
MATSEE_VOLTAGE_CURRENT_ATTR = 0x0006
class MatSeeManufClusterDinPower(TuyaManufClusterAttributes):
"""Manufacturer Specific Cluster of the MatSee Power Meter device."""
attributes = {
MATSEE_TOTAL_ENERGY_DELIVERED_ATTR: ("energy_delivered", t.uint32_t , True),
MATSEE_VOLTAGE_CURRENT_ATTR: ("voltage_current", t.uint64_t , True),
}
def _update_attribute(self, attrid, value):
super()._update_attribute(attrid, value)
if attrid == MATSEE_TOTAL_ENERGY_DELIVERED_ATTR:
self.endpoint.smartenergy_metering.energy_deliver_reported(value / 100)
elif attrid == MATSEE_VOLTAGE_CURRENT_ATTR:
self.endpoint.electrical_measurement.power_reported(value & 0x000000000000FFFF)
self.endpoint.electrical_measurement.current_reported(((value & 0x000000FFFF000000) >> 24) / 1000)
self.endpoint.electrical_measurement.voltage_reported((value >> 48) / 10)
class MatSeePowerMeter(TuyaSwitch):
"""MatSee Power Meter Device - DAC2161C"""
signature = {
# "node_descriptor": "<NodeDescriptor byte1=1 byte2=64 mac_capability_flags=142 manufacturer_code=4098
# maximum_buffer_size=82 maximum_incoming_transfer_size=82 server_mask=11264
# maximum_outgoing_transfer_size=82 descriptor_capability_field=0>",
# device_version=1
# input_clusters=[0x0000, 0x0004, 0x0005, 0xef00]
# output_clusters=[0x000a, 0x0019]
MODELS_INFO: [("_TZE204_lsanae15", "TS0601")],
ENDPOINTS: {
# <SimpleDescriptor endpoint=1 profile=260 device_type=51
# device_version=1
# input_clusters=[0, 4, 5, 61184]
# output_clusters=[10, 25]>
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaManufClusterAttributes.cluster_id,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
MatSeeManufClusterDinPower,
TuyaElectricalMeasurement,
TuyaPowerMeasurement,
#TuyaOnOffNM,
#TuyaOnOff,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
Not supported
In a similar project, this device is supported but not completely. Here is the commit: Koenkk/zigbee-herdsman-converters@bb77929
Setting thresholds and their types does not work
Solution description
To support
Screenshots/Video
Screenshots/Video
Device signature
Device signature
Diagnostic information
Diagnostic information
Logs
Logs
Custom quirk
Custom quirk
Additional information
I bought the device here https://a.aliexpress.com/_DEPdXVR
The text was updated successfully, but these errors were encountered: