Closed yftj closed 1 year ago
Please, can you attach a debug log from the device operation? We need to see if there are multiple commands when light is dimmed or just one command send.
Please, can you attach a debug log from the device operation? We need to see if there are multiple commands when light is dimmed or just one command send.
Sorry, I am having trouble finding the debug logs for the device, are you looking for the /config/homeassistant.log file? I've set the logger to debug in configuration.yaml but there is a ton of text so sift through do I need to filter it? and if so how? Your help is appreciated!
Edit: I've added some logs to the original comment
Have you enabled the debug logs for zhaquirks
?
It is expected that you will have traces of the type Sending Tuya Cluster Command... Cluster Command is %x, Arguments are %s
when turn on/off the device or of the type Sending Tuya Cluster Command. Cluster Command is %x, Arguments are %s
when dimming the device.
In addition there are traces of at least 5 different devices (the first value of the tuple [0x8073:1:0xef00]
defines the device).
We need to get the correct info to be able to understand what is happening.
I am aware that it is not an easy task if you are not used to it, but it is necessary for someone with the device to do this analysis in order to give a correct answer.
Have you enabled the debug logs for
zhaquirks
? It is expected that you will have traces of the typeSending Tuya Cluster Command... Cluster Command is %x, Arguments are %s
when turn on/off the device or of the typeSending Tuya Cluster Command. Cluster Command is %x, Arguments are %s
when dimming the device.
Also, regarding the dimmer itself, tapping the dimming buttons works as expected. However, if it was set at 40% brightness for example and I turn it off and back on again from the middle button, the lights go from 100% to 40%(The previous state it was in before turning it off) instead of a smooth transition from 0% to 40%.
This behaviour is the same thing I'm experiencing if I remotely access it, the quirk seems to be not just sending a brightness command but also a command to turn it on again (since it's already on it flashes off and on really quick).
I'm not completely sure how the quirk functions but if its sending both brightness and on/off commands at the same time this would cause it to behave like this. A fix may be to send only brightness commands to the dimmer and off commands when they hit 0% brightness.
Well, let's analyze it step by step.
If the device has a behavior when you operate it manually, the quirk won't change it at all. The quirk acts as a translator between (for example) HA and the device, but cannot change the behavior of the physical device.
Recently a behavior has been 'corrected' in some of the quirks (including a few Tuya dimmers). HA sends a move_to_level_with_on_off
command when the dim bar is operated from the UI. With the corrected implementation, the quirk sends the corresponding on_off
command and the dim
command. This behavior is 'normal' in standard Zigbee devices and that is why it has been adapted in this way.
Maybe it can be improved, but I'm not going to argue that the behavior has to be different on a particular device. If it is reviewed it will be for any implementation, not a device specific one.
About point 2, you can imagine how it goes. Someone complains that their device won't turn on when they move the dim bar. The reason is detected and corrected. Then someone complains that they have lost the ability to modify the value of dim without turning on the device and that this is a bug, and so on... That is why I am not going to look for a solution for 1 device. I'm only going to implement the solution that fits the 'standard' behavior. I hope you understand my reasons.
IMO the quirk is working (for your device) as expected. In your logs I don't see anything unusual and, as you as said, its behavior is consistent with what is expected.
However I'm going to check what the dim behavior is in HA (sends always on/off command when the dim bar is moved?). I will also review what is 'normal' behavior when (for example) a Zigbee device that is already on receives an on
command. Maybe this point could be improved, but it adds complexity to the quirk and I'm not sure if there is an optimal solution. Give me some time to review it.
Regards.
Thank you for taking the time to work this out it's greatly appreciated and I understand making it work for a broad range of devices is the correct path. Is it possible however to add the individual dim up and dim down entities? This would certainly help. Thanks again, Cheers.
Great work from @javicalle and others contributing to this.
I have the exact same issue with this dimmer. Has anyone worked out a solution?
I have not had any success writing a custom quirk but my experience is pretty limited.
This dimmer is commonly available in Australia.
I'm happy to provide logs etc. Not sure if that's necessary as it's the same behaviour described by @yftj.
Thanks!
Great work from @javicalle and others contributing to this.
I have the exact same issue with this dimmer. Has anyone worked out a solution?
I have not had any success writing a custom quirk but my experience is pretty limited.
This dimmer is commonly available in Australia.
I'm happy to provide logs etc. Not sure if that's necessary as it's the same behaviour described by @yftj.
Thanks!
Here is some more information:
This is the manufacturer provided device handler for SmartThings. I wonder if this can be translated over to ZHA.
https://drive.google.com/file/d/1eqLByV3P_9wEDrZV9bQvIWGg2MIT5ySB/view
In the recent #1748 the behavior for some Tuya dimmers will change. I believe that this issue can be related.
In case someone wants to test the new version before next release, can enable the local quirks and copy the file from here:
Hi @javicalle I've tried to load that quirk file with the prior change but didn't notice any change to the behaviour of these dimmers.
When checking the device it wasn't showing that a different quirk had been loaded though.
They still flicker off and go full brightness before transitioning to the brightness setting requested.
I believe that you will need to copy also the ts0601_dimmer.py
file and made the mcu
imports relative to your custom_quirk_folder
:
If you don't mind, you can wait for next week's version of HA or you can also try tomorrow's beta release.
Happy to wait for new version. Thank you for working on these issues.
Has this change made it to the stable HA release @javicalle ? I have browsed the changelog but I haven't seen anything. Thank you
Has this change made it to the stable HA release @javicalle ? I have browsed the changelog but I haven't seen anything. Thank you
Yep. Works like a charm
Has this change made it to the stable HA release @javicalle ? I have browsed the changelog but I haven't seen anything. Thank you
Yep. Works like a charm
Do you have the same Oz smart dimmers? I still have the same issue with latest home assistant build.
The dimming action from HA has a bug in some quirks (mainly Tuya ts0601_dimmer
devices).
The latest HA version (2022.10.X) have the new implementation.
Double check that device is not loading any local quirk or that you have local changes in your installation. In your "Diagnostic Information" you must have the "zha-quirks==0.0.812"
or 0.0.81
.
If everything is correct, please enable the logs, reproduce the behavior and attach the logs.
Double check that device is not loading any local quirk or that you have local changes in your installation. In your "Diagnostic Information" you must have the
"zha-quirks==0.0.812"
or0.0.81
.Thanks again for your help, I've just looked at my diagnostic info and it shows the version to be zha-quirks==0.0.82. I've also enabled the enhanced brightness slider and temperature transition from off-state options in the Zha configuration. Physically adjusting the brightness from the upper and lower buttons on the switch works as expected, stepping through the brightness levels. However, the same behaviour I explained at the beginning of the post is occurring when adjusting through HomeAssistant
Can you enable also the zigpy
and the zhaquirks
debug logs?
There is something extrange with the 'transitioning timer'.
Can you enable also the
zigpy
and thezhaquirks
debug logs? There is something extrange with the 'transitioning timer'.
sure thing, thanks for looking into this again!
Thanks to the great work by the contributors here I have full control of my dimmer switches. (dimmer switch TS0601 _TZE200_1agwnems)! Thank you very much! There is however a small problem, changing the brightness slider causes the light to momentarily turn off almost like a reset for a fraction of a second (time it takes to blink almost) and then from full brightness goes down to the selected brightness. Expected result would be for the dimmer to change from eg. 40% to 50% instead it goes from 40% to off(barely noticeable) to 100% and slowly dims to 50%.
To Reproduce Steps to reproduce the behavior:
Expected behavior Sliding the brightness slider from eg. 0% to 40% should slowly step through the levels of brightness from 0 to 40% and sliding it bac from 40% to 0% should smoothly transition from 40% brightness to 0%
Device signature - this can be acquired by clicking on the "Zigbee Device Signature" button in the device settings
``` { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information - this can be acquired by clicking on the "Download Diagnostics" button in the device settings
``` { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.5.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.9.9", "docker": true, "arch": "x86_64", "timezone": "Australia/Sydney", "os_name": "Linux", "os_version": "5.10.108", "supervisor": "2022.05.0", "host_os": "Home Assistant OS 7.6", "docker_version": "20.10.9", "chassis": "vm", "run_as_root": true }, "custom_components": { "xiaomi_miot_raw": { "version": "v1.3.1", "requirements": [ "construct", "python-miio>=0.5.3" ] }, "localtuya": { "version": "3.2.1", "requirements": [] }, "webrtc": { "version": "v2.3.0", "requirements": [] }, "meross_lan": { "version": "2.5.8", "requirements": [] }, "hacs": { "version": "1.24.5", "requirements": [ "aiogithubapi>=21.11.0" ] }, "reolink_dev": { "version": "0.52", "requirements": [ "reolink==0.0.61" ] }, "samsungtv_smart": { "version": "0.6.1", "requirements": [ "websocket-client>=0.58.0", "wakeonlan>=2.0.0", "aiofiles>=0.8.0" ] } }, "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.73", "zigpy-deconz==0.16.0", "zigpy==0.45.1", "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": "*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": "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": 65143, "manufacturer": "_TZE200_1agwnems", "model": "TS0601", "name": "_TZE200_1agwnems TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaSingleSwitchDimmer", "manufacturer_code": 4098, "power_source": "Mains", "lqi": 255, "rssi": -84, "last_seen": "2022-05-09T02:07:28", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs - Here are some logs I found during the time I Changed the brightness, I don't know how useful this would be, but if you have any information on where and how I can dig up more useful information to diagnose this please let me know!
``` 2022-05-10 02:01:06 DEBUG (MainThread) [zigpy.zcl] [0x9527:1:0xef00] Received ZCL frame: b'\t.\x01\x00\x8c\x01\x01\x00\x01\x00' 2022-05-10 02:01:06 DEBUG (MainThread) [zigpy.zcl] [0x9527:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=Logs 2
``` 2022-05-10 13:30:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139696786098016] Received {'type': 'call_service', 'domain': 'light', 'service': 'turn_on', 'service_data': {'entity_id': 'light.youssefs_room_level_on_off', 'brightness_pct': 61}, 'id': 89} 2022-05-10 13:30:23 DEBUG (Recorder) [homeassistant.components.recorder] Processing task: EventTask(event=Please let me know if there is any further information you require! Thank you!