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
749 stars 687 forks source link

[Device Support Request] Tuya Blind motor battery #1540

Closed thib5 closed 1 year ago

thib5 commented 2 years ago

Describe the solution you'd like Hi, Just wondering if it's possible to have battery status on this device

Device signature - this can be acquired by clicking on the "Zigbee Device Signature" button in the device settings ``` { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *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": "0x0202", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x0102", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_zah67ekd", "model": "TS0601", "class": "ts0601_cover.TuyaMoesCover0601" } ```
javicalle commented 2 years ago

Please, attach logs from device with battery reports (if there's none). Search for 'unhandled' reports/messages with values between 0-100

thib5 commented 2 years ago

I just check the log and I don't think there is a battery status ... could it be do able to "hack" one .. flash the code on it or something ?

Log for info :

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.4.7", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.9.9", "docker": true, "arch": "x86_64", "timezone": "America/Toronto", "os_name": "Linux", "os_version": "5.10.108", "supervisor": "2022.04.0", "host_os": "Home Assistant OS 7.6", "docker_version": "20.10.9", "chassis": "vm", "run_as_root": true }, "custom_components": { "climate_group": { "version": "0.4.2", "requirements": [] }, "iphonedetect": { "version": "1.4.0", "requirements": [] }, "deebot": { "version": "1.3.0", "requirements": [ "deebot-client==1.3.0", "numpy>=1.21.2" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "tuya_custom": { "version": "0.1.7", "requirements": [] }, "browser_mod": { "version": "1.5.3", "requirements": [] }, "tapo_control": { "version": "3.5.0", "requirements": [ "pytapo==2.1", "onvif-zeep-async==1.2.0" ] }, "hilo": { "version": "2022.4.2", "requirements": [ "python-hilo>=2022.3.1" ] }, "sonoff": { "version": "v2.4.7", "requirements": [ "pycryptodome>=3.6.6" ] }, "favicon": { "version": "10.4", "requirements": [] }, "hacs": { "version": "1.24.5", "requirements": [ "aiogithubapi>=21.11.0" ] }, "spotcast": { "version": "v3.6.29", "requirements": [ "spotify_token==1.0.0" ] }, "fullykiosk": { "version": "1.0.1", "requirements": [ "python-fullykiosk==0.0.11" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.29.0", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.72", "zigpy-deconz==0.14.0", "zigpy==0.44.2", "zigpy-xbee==0.14.0", "zigpy-zigate==0.7.4", "zigpy-znp==0.7.0" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "2652", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "10C4", "pid": "EA60", "description": "sonoffplus", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "tubeszb", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "tubeszb", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "zigstar", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "conbee", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "zigbee", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "10C4", "pid": "8B34", "description": "bv 2010/10", "known_devices": [ "Bitron Video AV2010/10" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube" } ], "after_dependencies": [ "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "REDACTED", "nwk": 17711, "manufacturer": "_TZE200_zah67ekd", "model": "TS0601", "name": "_TZE200_zah67ekd TS0601", "quirk_applied": true, "quirk_class": "ts0601_cover.TuyaMoesCover0601", "manufacturer_code": 4098, "power_source": "Battery or Unknown", "lqi": 156, "rssi": -61, "last_seen": "2022-05-01T14:48:44", "available": true, "device_type": "EndDevice", "signature": { "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.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": "0x0202", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x0102", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "entities": [ { "entity_id": "cover.tze200_zah67ekd_ts0601_64ce07fe_window_covering", "name": "_TZE200_zah67ekd TS0601" } ], "neighbors": [], "endpoint_names": [ { "name": "WINDOW_COVERING_DEVICE" } ], "user_given_name": null, "device_reg_id": "1f6264a7b82e0d703d6a3a2d9e71468b", "area_id": null } }

thib5 commented 2 years ago

oups I accidentally close the

javicalle commented 2 years ago

These aren't the application logs.

Look at:

Then at home-assistant.log search for info related to your device. You will see logs when you operate your device similar to:

2022-05-01 21:50:49 INFO (MainThread) [zigpy.zcl] [0xd37d:1:0xef00] some trace about your device operation ....

The [0xd37d:1:0x0006] part is important because will identify your device. Look at any trace for your device that refers to 'unhandled' commands. Usually they came after operate the device.

There's no any other hack or code flash posible.

thib5 commented 2 years ago

Hi,

I see trace of my device (witch in my case is : 0x452f:1:0x0000 ) but there is non unhandled commands...

does it mean the device have no battery status ? can you double check my log ?

home-assistant.log

Thanks

javicalle commented 2 years ago

I don't see any attribute report (other than those already known). And in Z2M it seems that they don't know either:

So my guess is that there's no battery status. Maybe if low battery there is a low battery report, but hard to know.

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.