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
720 stars 666 forks source link

[Device Support Request] Philips Hue Wall Switch Module #858

Open aleex1848 opened 3 years ago

aleex1848 commented 3 years ago

Describe the solution you'd like There should be a zha_event triggered when the switch is pushed.

**Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be

Log of the device joining the network:

Device 0x2ab8 (00:17:88:01:0b:00:12:18) joined the network
[0x2ab8:zdo] ZDO request ZDOCmd.Device_annce: [0x2AB8, 00:17:88:01:0b:00:12:18, 128]
[0x2ab8] Requesting 'Node Descriptor'
Tries remaining: 2
[0x2ab8] Extending timeout for 0x52 request
[0x2ab8] Node Descriptor: NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4107, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *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, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)
[0x2ab8] Discovering endpoints
Tries remaining: 3
[0x2ab8] Extending timeout for 0x53 request
[0x2ab8] Discovered endpoints: [1]
[0x2ab8:1] Discovering endpoint information
Tries remaining: 3
[0x2ab8] Extending timeout for 0x54 request
[0x2ab8:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=2080, device_version=1, input_clusters=[0, 1, 3, 64512], output_clusters=[3, 4, 6, 8, 25])
[0x2ab8] Extending timeout for 0x55 request
light.osram_classic_b40_tw_lightify_e287a900_level_light_color_on_off: polling current state
[0x5a9a:3:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=86 command_id=Command.Read_Attributes_rsp>
[0x5a9a:3:0x0008] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=87 command_id=Command.Read_Attributes_rsp>
[0x5A9A:3:0x0008]: received attribute: 0 update with value: 26
[0x5a9a:3:0x0300] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=88 command_id=Command.Read_Attributes_rsp>
[0x2ab8:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=85 command_id=Command.Read_Attributes_rsp>
[0x2ab8:1] Manufacturer: Signify Netherlands B.V.
[0x2ab8:1] Model: RDM001
Checking quirks for Signify Netherlands B.V. RDM001 (00:17:88:01:0b:00:12:18)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because device_type mismatch on at least one endpoint
device - 0x2AB8:00:17:88:01:0b:00:12:18 entering async_device_initialized - is_new_join: True
device - 0x2AB8:00:17:88:01:0b:00:12:18 has joined the ZHA zigbee network
[0x2AB8](RDM001): started configuration
[0x2AB8:ZDO](RDM001): 'async_configure' stage succeeded
[0x2ab8] Extending timeout for 0x59 request
[0x2ab8] Extending timeout for 0x5a request
[0x2ab8] Extending timeout for 0x5b request
[0x2AB8:1:0x0000]: bound 'basic' cluster: Status.SUCCESS
[0x2AB8:1:0x0000]: finished channel configuration
[0x2AB8:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0x2ab8] Extending timeout for 0x5c request
[0x2ab8] Extending timeout for 0x5d request
[0x2ab8:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=92 command_id=Command.Configure_Reporting_rsp>
[0x2AB8:1:0x0001]: reporting 'battery_voltage' attr on 'power' cluster: 3600/10800/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0x2ab8] Extending timeout for 0x5e request
[0x2AB8:1:0xfc00]: bound 'manufacturer_specific' cluster: Status.SUCCESS
[0x2AB8:1:0xfc00]: finished channel configuration
[0x2ab8] Extending timeout for 0x5f request
[0x2ab8:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=94 command_id=Command.Configure_Reporting_rsp>
[0x2AB8:1:0x0001]: reporting 'battery_percentage_remaining' attr on 'power' cluster: 3600/10800/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]'
[0x2AB8:1:0x0001]: finished channel configuration
[0x2ab8] Extending timeout for 0x60 request
[0x2AB8:1:0x0008]: bound 'level' cluster: Status.SUCCESS
[0x2AB8:1:0x0008]: finished channel configuration
[0x2AB8:1:0x0006]: bound 'on_off' cluster: Status.SUCCESS
[0x2AB8:1:0x0006]: finished channel configuration
[0x2AB8:1:0x0019]: bound 'ota' cluster: Status.SUCCESS
[0x2AB8:1:0x0019]: finished channel configuration
[0x2AB8:1:0x0000]: 'async_configure' stage succeeded
[0x2AB8:1:0x0001]: 'async_configure' stage succeeded
[0x2AB8:1:0xfc00]: 'async_configure' stage succeeded
[0x2AB8:1:0x0008]: 'async_configure' stage succeeded
[0x2AB8:1:0x0006]: 'async_configure' stage succeeded
[0x2AB8:1:0x0019]: 'async_configure' stage succeeded
[0x2AB8](RDM001): completed configuration
[0x2AB8](RDM001): stored in registry: ZhaDeviceEntry(name='Signify Netherlands B.V. RDM001', ieee='00:17:88:01:0b:00:12:18', last_seen=1618816060.5545013)
[0x2ab8] Extending timeout for 0x61 request
[0x2ab8:1:0x0003] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=97 command_id=Command.Default_Response>
[0x2AB8:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: [64, <Status.UNSUP_CLUSTER_COMMAND: 129>]
[0x2AB8](RDM001): started initialization
[0x2AB8:ZDO](RDM001): 'async_initialize' stage succeeded
[0x2AB8:1:0x0000]: initializing channel: from_cache: False
[0x2AB8:1:0x0000]: finished channel configuration
[0x2AB8:1:0x0001]: initializing channel: from_cache: False
[0x2ab8] Extending timeout for 0x62 request
[0x2AB8:1:0xfc00]: initializing channel: from_cache: False
[0x2AB8:1:0xfc00]: finished channel configuration
[0x2AB8:1:0x0008]: initializing channel: from_cache: False
[0x2AB8:1:0x0008]: finished channel configuration
[0x2AB8:1:0x0006]: initializing channel: from_cache: False
[0x2AB8:1:0x0006]: finished channel configuration
[0x2AB8:1:0x0019]: initializing channel: from_cache: False
[0x2AB8:1:0x0019]: finished channel configuration
[0x2ab8:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=98 command_id=Command.Read_Attributes_rsp>
[0x2ab8] Extending timeout for 0x63 request
[0x2ab8:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=99 command_id=Command.Read_Attributes_rsp>
[0x2AB8:1:0x0001]: finished channel configuration
[0x2AB8:1:0x0000]: 'async_initialize' stage succeeded
[0x2AB8:1:0x0001]: 'async_initialize' stage succeeded
[0x2AB8:1:0xfc00]: 'async_initialize' stage succeeded
[0x2AB8:1:0x0008]: 'async_initialize' stage succeeded
[0x2AB8:1:0x0006]: 'async_initialize' stage succeeded
[0x2AB8:1:0x0019]: 'async_initialize' stage succeeded
[0x2AB8](RDM001): power source: Battery or Unknown
[0x2AB8](RDM001): completed initialization
Hedda commented 3 years ago

Can you check and verify if that Philips Hue Wall Switch Module is a ZGP (Zigbee Green Power) device or not?

I am guessing that it is and if so then you should know that ZGP is not yet supported by zigpy (or ZHA), see: https://github.com/zigpy/zigpy/issues/341

Developers are however working on it in https://github.com/zigpy/zigpy/pull/519 and https://github.com/zigpy/zigpy/pull/656

aleex1848 commented 3 years ago

Can you check and verify if that Philips Hue Wall Switch Module is a ZGP (Zigbee Green Power) device or not?

I am guessing that it is and if so then you should know that ZGP is not yet supported by zigpy (or ZHA), see: zigpy/zigpy#341

Developers are however working on it in zigpy/zigpy#519 and zigpy/zigpy#656

I'm sorry, but i've no clue how to check if this device is ZGP. Never heard about that before. On the main product page there is no info about ZGP https://www.philips-hue.com/de-de/p/hue-philips-hue-wall-switch-modul/8719514318045#specifications

Hedda commented 3 years ago

On the main product page there is no info about ZGP https://www.philips-hue.com/de-de/p/hue-philips-hue-wall-switch-modul/8719514318045#specifications

Ah, I thought you meant a different product. FYI, if a specific device is always connected to mains-power then that will normally mean that it would never be a ZGP device. ZGP are low-energy devices that normally use energy harvesting technology (or sometimes energy harvesting technology and a battery-operated by a small coin-cell battery as backup power). Regardless it's probably safe to ignore my comments/links about ZGP in regards to that device since no mention of it anywhere.

Philips Hue wall switch module looks like it is basically a remote control that can use the buttons from any standard wall switch:

https://www.philips-hue.com/en-gb/p/hue-philips-hue-wall-switch-module/8719514318045

https://www.philips-hue.com/en-gb/p/hue-philips-hue-wall-switch-module/8719514318045#specifications

https://www.philips-hue.com/en-gb/p/hue-philips-hue-wall-switch-module-2-pack/8719514318021

https://zigbee.blakadder.com/Philips_RDM001.html

https://www.zigbee2mqtt.io/devices/929003017102.html

https://zigbeealliance.org/zigbee_products/philips-hue-wall-switch-module/

https://api.knack.com/v1/applications/54e658034b4f44e42fb18201/download/asset/6005a6f2693cc6001bb99b52/60435273001_philipshuewallswitchmodule_pics.zip

From the above references:

Zigbee ID: "RDM001"

Zigbee Alliance Certificate ID: ZIG21081ZB330941-24

Manufacturer: Philips / Signify

Philips Hue wall switch module 1-pack = EAN/UPC product code: 8719514318045 (12NC Material number: 929003017101) Philips Hue wall switch module 2-pack = EAN/UPC product code: 8719514318021(12NC Material number: 929003017102)

Batteries included: Yes ZigBee Light Link: No

PS: It is wierd that they did not make it mains-powered but I guess that removes the need to get an electrician to install it legally.

Adminiuga commented 3 years ago

Do you get anything in the logs when you press buttons? Post the logs when you turn the switch on/off.

aleex1848 commented 3 years ago

Do you get anything in the logs when you press buttons? Post the logs when you turn the switch on/off.

I activated debug logging like this: https://www.home-assistant.io/integrations/zha/#debug-logging

But unfortunately there is nothing logged when i push the button.

Adminiuga commented 3 years ago

Well, if device doesn't send anything, then the quirk unlikely to help. Can you try the following:

  1. Unbind remote from the coordinator: devices -> your remote -> Manage zigbee clusters -> device binding -> pick your coordinator (what radio are you using) -> unbind. After you press unbind, wake up the remove by pressing any button on it
  2. check what groups your coordinator is member of?
  3. Bind the remote the one of the groups that coordinator is member of

post the separate logs of unbinding and binding. Alternatively you could put the lights you'd like to control with that remote into a new group and bind remote to that group and see if it control the lights

jonas18z commented 3 years ago

Yes, this would be greate if wall switch module is supported

dieneuser commented 3 years ago

@Adminiuga: Perhaps the following links will help. Both deconz and zigbee2mqtt support the switch: deconz:

zigbee2mqtt

overview

@Hedda: It's not a ZGP device.

Adminiuga commented 3 years ago

There's nothing specific in those other implementations. Out of the box zha should originate the events.

dieneuser commented 3 years ago

@Adminiuga "

Nothing specific

is probably not it. I got a wall switch and can register it with ZHA, but only see a sensor with battery status but i cannot see any ZHA event when the switch is pressed. But i can see much of "unknown cluster-specific commands" in the log:

2021-05-14 16:38:44 DEBUG (MainThread) [zigpy.zcl] [0xb6ad:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=45 command_id=Command.Report_Attributes>
2021-05-14 16:38:44 DEBUG (MainThread) [zigpy.zcl] [0xb6ad:1:0x0400] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=27316>)]]
2021-05-14 16:38:44 DEBUG (MainThread) [zigpy.zcl] [0xb6ad:1:0x0400] Attribute report received: measured_value=27316
2021-05-14 16:38:52 DEBUG (MainThread) [zigpy.zcl] [0x2e33:1:0x0400] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=106 command_id=Command.Report_Attributes>
2021-05-14 16:38:52 DEBUG (MainThread) [zigpy.zcl] [0x2e33:1:0x0400] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=39043>)]]
2021-05-14 16:38:52 DEBUG (MainThread) [zigpy.zcl] [0x2e33:1:0x0400] Attribute report received: measured_value=39043
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=True is_reply=True disable_default_response=True> manufacturer=4107 tsn=19 command_id=0>
2021-05-14 16:38:55 WARNING (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] Unknown cluster-specific command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL request 0x0000: b'\x01\x00\x000\x00!\x00\x00'
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] No handler for cluster command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=True is_reply=True disable_default_response=True> manufacturer=4107 tsn=20 command_id=0>
2021-05-14 16:38:55 WARNING (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] Unknown cluster-specific command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL request 0x0000: b'\x01\x00\x000\x02!\x01\x00'
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] No handler for cluster command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=True is_reply=True disable_default_response=True> manufacturer=4107 tsn=21 command_id=0>
2021-05-14 16:38:55 WARNING (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] Unknown cluster-specific command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL request 0x0000: b'\x01\x00\x000\x00!\x00\x00'
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] No handler for cluster command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=True is_reply=True disable_default_response=True> manufacturer=4107 tsn=22 command_id=0>
2021-05-14 16:38:55 WARNING (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] Unknown cluster-specific command 0
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL request 0x0000: b'\x01\x00\x000\x02!\x01\x00'
2021-05-14 16:38:55 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] No handler for cluster command 0
2021-05-14 16:38:56 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=True is_reply=True disable_default_response=True> manufacturer=4107 tsn=23 command_id=0>
2021-05-14 16:38:56 WARNING (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] Unknown cluster-specific command 0
2021-05-14 16:38:56 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] ZCL request 0x0000: b'\x01\x00\x000\x00!\x00\x00'
2021-05-14 16:38:56 DEBUG (MainThread) [zigpy.zcl] [0x655a:1:0xfc00] No handler for cluster command 0
2021-05-14 16:38:56 DEBUG (MainThread) [zigpy.zcl] [0xb4d4:1:0x0019] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=162 command_id=1>
2021-05-14 16:38:56 DEBUG (MainThread) [zigpy.zcl] [0xb4d4:1:0x0019] ZCL req

It must be possible to set the switch mode during setup. (singlerocker, singlepushbutton, dualrocker, dualpushbutton): https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4566#issuecomment-797488162 I do not know how.

aleex1848 commented 3 years ago

I just updated from core-2021.4.3 to core-2021.6.2 but unfortunately nothing changed. There are still no zha_events when pushing the hue wall switch.

jonas18z commented 3 years ago

@dieneuser I have exactly the same problem as you I can ad but only find the battery level. I have a hue dimmer which I can find all different buttons. Anyone figure ut how to use this?

I have also updated the firmware on my conbeeII

dieneuser commented 3 years ago

@jonas18z ZHA does not (yet) support the switch. As a workaround, I use the Deconz integration in parallel - also for existing Hue Tap switch modules. There, the wall switch is already supported in the beta phoscon web app.

jonas18z commented 3 years ago

Ok, let’s hope that it will be supported. It’s only ZHA that misses the support now. I don’t think you can run conbee II at the same time in ZHA and deconz?

htodep commented 3 years ago

How/where can we request ZHA support? Really need this device ;)

dieneuser commented 3 years ago

I don’t think you can run conbee II at the same time in ZHA and deconz?

That's right. I use a second Conbee II with deconz integration.

jonas18z commented 3 years ago

Is there some guide how to add new devices. I will try to add it I was thinking to just modify the hue dimmer switch file to make this wall switch to work. But I don’t find anything here

MattWestb commented 3 years ago

https://github.com/zigpy/zha-device-handlers#how-to-contribute

jonas18z commented 3 years ago

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/philips/rwl022.py rename the file to RDM001 in the file Find RWL022 replace with RDM001

is it that simple or what do I miss?

What is "DEVICE_SPECIFIC_UNKNOWN = 64512"

MattWestb commented 3 years ago

The 64512 (in dec you must calculating it from the hex in the device signature) is the number of one manufacture specific cluster that for Philips HUE that they is using. If your device is using it you need adding it so it can being reconciled of the quirk and if its not then you shall deleting all references to it.

Hedda commented 3 years ago

Maybe now test your Philips Hue Wall Switch Modules again with the recently released zha-device-handlers / zha-quirk 0.0.60 and zigpy 0.37.0 releases or later as those contain new features in zigpy so quirks should no longer be needed for most if not all new Philips Hue Zigbee devices. See:

zha-quirks==0.0.60 -> https://github.com/zigpy/zha-device-handlers/releases/tag/0.0.60

and

zigpy==0.37.x -> https://github.com/zigpy/zigpy/releases/tag/0.37.0 or better yet https://github.com/zigpy/zigpy/releases/tag/0.37.1

Specifically, zigpy 0.37.0 added https://github.com/zigpy/zigpy/pull/788 and zha-device-handlers 0.0.60 added https://github.com/zigpy/zha-device-handlers/pull/993

Note! The mentioned zha-quirk and zigpy releases are not yet included even in the latest Home Assistant release so to test those follow https://github.com/zigpy/zha-device-handlers#testing-new-releases and https://github.com/zigpy/zigpy/blob/dev/CONTRIBUTING.md#testing-new-releases

PS: Looking at https://github.com/home-assistant/core/pull/55242 and https://github.com/home-assistant/core/milestone/429 it seems that these zha-quirk and zigpy releases will first be used in the upcoming Home Assistant 2021.9.0 https://rc.home-assistant.io/blog/2021/08/25/release-20219/

jonas18z commented 3 years ago

Thanks, Installed 2021.9 and did a new search for device and the device is found and added via ZHA but now next problem is that it only founds two triggers "Device Offline" and "power battery level changes" For example my dimmer RWL021 founds all trigger on,off, dim up, dim down etc with RDM001. So maybe there is some more editing needed in the Python file but I can't find what?

EDIT: I don't se any zha_event when pushing a button.

MarvinSchenkel commented 2 years ago

Thanks, Installed 2021.9 and did a new search for device and the device is found and added via ZHA but now next problem is that it only founds two triggers "Device Offline" and "power battery level changes" For example my dimmer RWL021 founds all trigger on,off, dim up, dim down etc with RDM001. So maybe there is some more editing needed in the Python file but I can't find what?

EDIT: I don't se any zha_event when pushing a button.

I have the exact same issue. Has anyone found the reason for this?

jonas18z commented 2 years ago

I still have the same issue and no solution. if some know what could be wrong or what I could try to make it work.

htodep commented 2 years ago

What's the current status of this issue? I really want to use these modules in ZHA.

th3d00d commented 2 years ago

I've been wondering as well, is there any progress on how to integrate a HUE wall switch module into HASS using ZHA?

florianw12 commented 2 years ago

Hello I think I have the same issue but I am not sure. I am using a raspberry pi 4 with homeassistant in a docker container and the conbee 2 usb on the raspberry with deconz also in a container. I have managed to connect the hue wall switch and I get events in home assistant but I am not able to use them for anything. Wall switch also shows just as battery in devices image

MattWestb commented 2 years ago

In ZHA is normal switches (or if battery powered remotes) only getting one battery. All things one switch is doing event and you is getting them by development, events, listening to events and putting in zha_event and clicking start listening to events and you is getting all in the log window.

One remote dont have any state like one light that can being on or off or dimmed and only sending events.

Also if Philips have making it good it shall having one switch configure cluster for changing the function of the wall switch but i cant saying if its having it then no one have posting one device signature.

MattWestb commented 2 years ago

If some like implanting the switch configuration i think i have found the attribute that need being added in one quirk for getting it working. https://github.com/dresden-elektronik/deconz-rest-plugin/blob/3338039cb8a498f90f5000f0b118ded7ef963a84/general.xml#L211-L229

wigster commented 2 years ago

and you is getting them by development, events, listening to events and putting in zha_event and clicking start listening to events and you is getting all in the log window.

So does this mean that XHA supports the module or not yet? I was about to purchase a few but am hesitating.

water-escape commented 2 years ago

Same here. Using ZHA. Did anyone get this to work via ZHA so it is useable in automations.

tube0013 commented 2 years ago

Worked with @dmulcahey and got a rough quirk working for this device. device automation triggers are only for the 1st input.

still some thought to be done on how best to implement this in the code base, but this is usable as a custom zha quirk just drop the py file in the custom quirk folder as defined in your configuration.yaml under zha. https://www.home-assistant.io/integrations/zha/#custom_quirks_path

to enable the second input - go to the devices configuration page > Manage Clusters.

pick the Philips Basic cluster - pick the mode attribute, put 2 in the value and set attirbute (toggle switch to wake the device so it gets the setting.

image

rdm001.py.zip

dieneuser commented 2 years ago

@tube0013

Thank you for the quirk file. But I can't manage to configure the switch to double rocker/Dual Push Button. No mode value (0,1,2,3) is taken over in the cluster manage window. When reading out the value is always enum8.undefined_0x00 or None. The switch remains in the default configuration as Single Rocker - but I really need the Dual Push Button mode (value=3).

here all possible value for the mode: mode value="0" type="Single Rocker" mode value="1" type="Single Push Button" mode value="2" type="Dual Rocker" mode value="3" type="Dual Push Button"

tube0013 commented 2 years ago

Was the switch awake when the attribute to change the mode is written? May want to enable debug logging and watch to be sure the attribute is received. I confirmed changing to mode 2 worked but did not try any others.

dieneuser commented 2 years ago

Oh, thanks for pointing out the debug level.

2021-12-11 16:39:59 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x432F](RDM001): set: None for attr: 52 to cluster: 0 for ept: 1 - res: [2, <Status.MALFORMED_COMMAND: 128>]
2021-12-11 16:39:59 DEBUG (MainThread) [homeassistant.components.zha.api] Set attribute for: cluster_id: [0] cluster_type: [in] endpoint_id: [1] attribute: [52] value: [None] manufacturer: [2] response: [[2, <Status.MALFORMED_COMMAND: 128>]]

I wrote the value in the wrong line in the dialog (manufacturer code), so the mode value is None.

Now it worked. I use value 3 for Dual Push Button mode and it works perfect. 👍

htodep commented 2 years ago

@tube0013 Thank you so much! it worked like a charm. Is this a permanent fix or does it need some tweaking(works fine though)?

aleex1848 commented 2 years ago

Worked with @dmulcahey and got a rough quirk working for this device. device automation triggers are only for the 1st input.

still some thought to be done on how best to implement this in the code base, but this is usable as a custom zha quirk just drop the py file in the custom quirk folder as defined in your configuration.yaml under zha. https://www.home-assistant.io/integrations/zha/#custom_quirks_path

to enable the second input - go to the devices configuration page > Manage Clusters.

pick the Philips Basic cluster - pick the mode attribute, put 2 in the value and set attirbute (toggle switch to wake the device so it gets the setting.

image

rdm001.py.zip

After many months i'm finaly able to use the switch module. Thank you so much!!

WernerRH21 commented 2 years ago

@tube0013 I am excited to find this solution, but unfortunately don't know exactly what to do. Could you please explain your sentence "just drop the py file in the custom quirk folder as defined in your configuration.yaml under zha" a littlebit more? I don't have a zha section in my configuration.yaml Thanks in advance

tube0013 commented 2 years ago

you add the zha: section like this:

zha:
  custom_quirks_path: zha_custom_quirks

then in your config folder create a folder named zha_custom_quirks and within that drop the .py file that's in the zip I posted:

image

WernerRH21 commented 2 years ago

Thx for your quick reply. Have the zip file smoothly overlooked :) Now the section entry is set and the file is in place and I see the PhilipsBasicCluster. Sorry for my maybe silly questions. But what do I have to do now? I come from ioBroker and are quite new to HA. Thanks for your patience.

WernerRH21 commented 2 years ago

This is all I need, or shall they also have an entity? image

WernerRH21 commented 2 years ago

I created an automation to toggle a hue lamp when "Turn on" button pressed, but no success. Same automation with an Aqara Switch runs as expected.

htodep commented 2 years ago

@WernerRH21 what kind of switch are you using? Don't forget to change the cluster settings as mentioned above if you have a double switch or something else. Check the logs when you press the switch and see what triggers com up. For automation use remote_button_short_press as type and turn_on as subtype.

WernerRH21 commented 2 years ago

A single push button switch and set the cluster settings like below and push the switch when I set zigbee attribute. "Set Zigbee attributes" blinks green. image Where can I check the log for this device? In the logbook is no entry when I select Hue Wall Switch entity.

htodep commented 2 years ago

https://www.home-assistant.io/integrations/zha/#debug-logging

WernerRH21 commented 2 years ago

Hi @htodep Cool, thank you. I added the wall switch again and set the cluster setting. Should be fine now? image Where do I find for automation remote_button_short_press as type and turn_on as subtype. image

WernerRH21 commented 2 years ago

Amazing. I got it. Thank you so much guys. How much you can enjoy a simple smart light switch.

htodep commented 2 years ago

Nice! I know the feeling 😎 How did you make it work at the end?

WernerRH21 commented 2 years ago

The debug-logging was important to see that the switch works. Then just "Turn on button" as trigger and bäähm, the light toggles. image

RaveGun commented 2 years ago

Thank you!

I also followed the examples and hints and made it work on my desk. Now I just have to drill and mount everything.

PS. Is there a possibility to connect the Switch directly to the Bulb so that an automation is not needed?

Thanks!