Closed sltvtr closed 1 month ago
I've just read through the device diagnostics and I think I found something relevant. There is cluster 0xE001 for external switch type and its attribute 0xD030, but in "unsupported_attributes" section:
"0xe001": {
"endpoint_attribute": "tuya_external_switch_type",
"attributes": {},
"unsupported_attributes": {
"0xd030": {
"attribute_name": "external_switch_type"
}
}
Why is that? Is that somehow recoverable?
It turned out that this model doesn't support changing button type. I had to return them and buy 1-channel controllers for bistable button. Case closed.
Bug description
I've purchased some OXT Zigbee curtains controllers, but they all have the same issue. They work by default with monostable external switches, but my switches are bistable. I did some digging and found that there is an attribute in that model, that is used to change the external switch type value, based on that:
There is a cluster:
With attribute external_switch_type:
I try to do change this the same way You change calibration_time for theese modules, I click "Save", get a green OK sign, but the value is not saved.
I took another step and installed ZHA Toolkit, enabled debug for it and tried to change it that way with this script:
It executes ok, but in the result there is an error:
When I add manf: 0 to the script as below:
I get somewhat different error:
I tried many combinations with values, manufacturer codes and it always ends the same. Am I doing something wrong? (but theese steps works for calibration_time) Or is it someting with devices themself?
Steps to reproduce
homeassistant | 2024-04-24 09:09:25.623 DEBUG (MainThread) [custom_components.zha_toolkit] event_data {'zha_toolkit_version': 'v1.1.10', 'zigpy_version': '0.63.5', 'zigpy_rf_version': '0.38.1', 'ieee_org': a4:c1:38:50:cb:7d:72:46, 'ieee': 'a4:c1:38:50:cb:7d:72:46', 'command': 'attr_write', 'command_data': None, 'start_time': '2024-04-24T07:09:25.426038+00:00', 'errors': ['TypeError("\'uint8_t\' object is not subscriptable")'], 'params': {'endpoint_id': 1, 'cluster_id': 57345, 'attr_id': 53296, 'attr_val': 1, 'dir': 0, 'manf': 4417, 'tries': 1, 'expect_reply': True, 'args': [], 'read_before_write': True, 'read_after_write': True}, 'compare_val': <enum8.undefined_0x01: 1>, 'attr_type': '0x30', 'write_is_equal': False, 'read_before': ({}, {53296: 0}), 'result_write': Default_Response(command_id=2, status=<Status.UNSUP_MANUF_GENERAL_COMMAND: 132>), 'result_read': ({}, {53296: 0}), 'warnings': ['Result: {53296: 0} - Attribute 53296 not in read ({}, {53296: 0})'], 'success': False}
or
homeassistant | 2024-04-24 09:08:15.802 DEBUG (MainThread) [custom_components.zha_toolkit] event_data {'zha_toolkit_version': 'v1.1.10', 'zigpy_version': '0.63.5', 'zigpy_rf_version': '0.38.1', 'ieee_org': a4:c1:38:50:cb:7d:72:46, 'ieee': 'a4:c1:38:50:cb:7d:72:46', 'command': 'attr_write', 'command_data': None, 'start_time': '2024-04-24T07:08:15.578186+00:00', 'errors': [], 'params': {'endpoint_id': 1, 'cluster_id': 57345, 'attr_id': 53296, 'attr_val': 1, 'dir': 0, 'tries': 1, 'expect_reply': True, 'args': [], 'read_before_write': True, 'read_after_write': True}, 'compare_val': <enum8.undefined_0x01: 1>, 'attr_type': '0x30', 'write_is_equal': False, 'read_before': ({}, {53296: <Status.UNSUPPORTED_ATTRIBUTE: 134>}), 'result_write': Write_Attributes_rsp(status_records=[WriteAttributesStatusRecord(status=<Status.UNSUPPORTED_ATTRIBUTE: 134>, attrid=0xD030)]), 'result_read': ({}, {53296: <Status.UNSUPPORTED_ATTRIBUTE: 134>}), 'warnings': ['Result: {53296: <Status.UNSUPPORTED_ATTRIBUTE: 134>} - Attribute 53296 not in read ({}, {53296: <Status.UNSUPPORTED_ATTRIBUTE: 134>})'], 'success': False}
Expected behavior
The attribute value should change.
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]Device signature
Device signature
```json { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
Diagnostic information
```json { "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.4.4", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.12.2", "docker": true, "arch": "x86_64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "5.15.0-92-generic", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "zha_toolkit": { "version": "v1.1.10", "requirements": [ "pytz" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly", "@TheJulianJES" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp", "universal_silabs_flasher" ], "requirements": [ "bellows==0.38.1", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.114", "zigpy-deconz==0.23.1", "zigpy==0.63.5", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.18", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "10C4", "pid": "EA60", "description": "*slzb-07*", "known_devices": [ "smlight slzb-07" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "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": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 35611, "manufacturer": "_TZ3000_j1xl73iw", "model": "TS130F", "name": "_TZ3000_j1xl73iw TS130F", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130Double_GP_ESTC", "quirk_id": null, "manufacturer_code": 4417, "power_source": "Mains", "lqi": 132, "rssi": -67, "last_seen": "2024-04-24T09:38:43", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs
Logs
```python homeassistant | 2024-04-24 09:08:15.554 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service:Additional information
Home Assistant docker release: Core 2024.4.4 Interfejs użytkownika 20240404.2