Skip to content
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

Hue wall switch module. #4566

Closed
ebaauw opened this issue Mar 12, 2021 · 44 comments · Fixed by #4541
Closed

Hue wall switch module. #4566

ebaauw opened this issue Mar 12, 2021 · 44 comments · Fixed by #4541
Assignees
Milestone

Comments

@ebaauw
Copy link
Collaborator

ebaauw commented Mar 12, 2021

Device

  • Product name: Hue wall switch module
  • Manufacturer: Signify Netherlands B.V. (previously known as Philips)
  • Model identifier: RDM001
  • Device type : Wireless (!) switch

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

While being positioned as an in-wall switch, this is a wireless switch.
During installation, you disconnect the live and switch wires from your physical switch, and shortcut them using the included clamp, causing the outlet to be powered permanently.
You then connect the physical switch to the wall switch module, using the included wires.
The module has two inputs, supporting a single-rocker switch, a dual-rocker switch, or two single-rocker switches.
The input wires come in two lengths, presumably to connect a second single-rocker switch in another wall compartment (hope that's the correct term).

Basically, it's a device to smartify your 20th century wall switches.
This should get you some brownie points in the WAF area.

Hue bridge resource

The resource looks familiar: 0xFC01 cluster to report the button actions.
The capabilities suggest it supports initial press (x000) and (short) release (x002) on each input.
However, I cannot seem to get an initial press event.

During my initial research on the Internet, I couldn't find whether the module supports momentarily switches, but looking at config.devicemode, which is newly introduced for this device, it does.
After setting it to "dual pushbutton", I'm even seeing x001 and x003 events.
It doesn't look like the Hue app supports this setting (at least I cannot find it).

{
  "state": {
    "buttonevent": 2002,
    "lastupdated": "2021-03-12T11:20:30"
  },
  "swupdate": {
    "state": "noupdates",
    "lastinstall": "2021-03-12T11:19:27"
  },
  "config": {
    "on": true,
    "battery": null,
    "reachable": true,
    "devicemode": "dualrocker",
    "devicemodevalues": [
      "singlerocker",
      "singlepushbutton",
      "dualrocker",
      "dualpushbutton"
    ],
    "pending": []
  },
  "name": "Hue wall switch module 1",
  "type": "ZLLSwitch",
  "modelid": "RDM001",
  "manufacturername": "Signify Netherlands B.V.",
  "productname": "Hue wall switch module",
  "diversityid": "8ea98295-bec1-477f-bf00-94de51b30987",
  "swversion": "1.0.3",
  "uniqueid": "00:17:88:01:0b:00:05:69-01-fc00",
  "capabilities": {
    "certified": true,
    "primary": true,
    "inputs": [
      {
        "repeatintervals": [
          800
        ],
        "events": [
          {
            "buttonevent": 1000,
            "eventtype": "initial_press"
          },
          {
            "buttonevent": 1002,
            "eventtype": "short_release"
          }
        ]
      },
      {
        "repeatintervals": [
          800
        ],
        "events": [
          {
            "buttonevent": 2000,
            "eventtype": "initial_press"
          },
          {
            "buttonevent": 2002,
            "eventtype": "short_release"
          }
        ]
      }
    ]
  }
}

Screenshots

The device looks very similar to the Hue smart button or the 2021 Hue dimmer.
This gives me good hopes, we'll be able to configure it in hybrid mode.

Screenshot 2021-03-12 at 12 50

Screenshot 2021-03-12 at 12 54

Basic

Nothing spectacular here: it does support the 0x0031 Philips-specific Configuration attribute.
Need to sniff the Hue bridge to see what they set it to.
Screenshot 2021-03-12 at 12 55

Power Configuration

Nothing spectacular here. It's a 3V power cell.
Screenshot 2021-03-12 at 12 57
Created binding to the coordinator without issue; the attribute reporting config was already set by the device (with the same values as Hue dimmer switch):
Screenshot 2021-03-12 at 12 59

Hue

The Hue-specific cluster works as for the Hue dimmer and smart button.
Screenshot 2021-03-12 at 13 02

In rocker mode, the device issues an x000 followed immediately by an x002 (with a duration of 1) when connecting or disconnecting the wires.
So the module doesn't seem to differentiate between an "open" and "closed" state, it just reports state changes.

Need to sniff the Hue bridge to see how to set momentarily switch mode (they call it pushbutton), but I'm betting in this mode, it sends the regular x000, x001 per 0.8s, x003 sequence on connect (press), hold, disconnect (release).

OTAU

Nothing spectacular here either.
The image type is 0x011c
Screenshot 2021-03-12 at 13 07

Client clusters

Client On/Off and Level Control seem to suggest the module can control (a group of) lights directly.
Need to experiment to confirm.
No clue how to set different groups for the different inputs, or even if this is possible.

@ebaauw ebaauw self-assigned this Mar 12, 2021
@Mimiix
Copy link
Collaborator

Mimiix commented Mar 12, 2021

When the PR is ready, i'll forward it to manup.

@Mimiix Mimiix added this to the v2.10.3-beta milestone Mar 12, 2021
@ebaauw
Copy link
Collaborator Author

ebaauw commented Mar 12, 2021

Setting devicemode uses config.pending, as this is a deep sleeper. Once the module wakes, the Hue bridge sends a Write Attributes for 0x0000/0x0034. That's a new one, of type enum8. The module responds with a Write Attributes Response and a Report Attributes. So we need to bind the Basic cluster and setup attribute reporting for 0x0034. Let's call that Device Mode.

The values are straightforward:

Setting Value
singlerocker 0x00
singlepushbutton 0x01
dualrocker 0x02
dualpushbutton 0x03

Unfortunately not a bitmap, so you cannot set one input to rocker and the other to pushbutton.

@ebaauw
Copy link
Collaborator Author

ebaauw commented Mar 12, 2021

That's working as expected. When in pushbutton mode, the module basically acts like a Hue smart button or Hue dimmer switch. In rocker mode, it's a stateless wireless switch, that sends x000/x002 on each flip.

I cannot seem to get the module to control lights or a group directly. Binding of the client clusters is no issue, but I don't see any On, Off, or Move to Level commands. The 0x0030 (Sensitivity) attribute is read-only. I set Configuration (0x0031) to the magic 0x000b, but no joy.

I'm afraid the module isn't meant for standalone use (without the Hue bridge), and simply doesn't support this, despite the client clusters. Bummer.

@ebaauw
Copy link
Collaborator Author

ebaauw commented Mar 12, 2021

Above commits should fully support the Hue wall switch module:

{
  "config": {
    "battery": 100,
    "devicemode": "dualrocker",
    "on": true,
    "pending": [],
    "reachable": true
  },
  "ep": 1,
  "etag": "01173dc5b19bb0a976006eee8d0d3718",
  "lastseen": "2021-03-12T22:55Z",
  "manufacturername": "Signify Netherlands B.V.",
  "mode": 1,
  "modelid": "RDM001",
  "name": "RDM001 15",
  "state": {
    "buttonevent": 1002,
    "eventduration": 1,
    "lastupdated": "2021-03-12T22:21:20.017"
  },
  "swversion": "20210115",
  "type": "ZHASwitch",
  "uniqueid": "00:17:88:01:0b:00:05:5d-01-fc00"
}

When config.devicemode is changed through the API, it will show in config.pending until the value has been written to the device. As the module is a deep sleeper, this might take up to two hours; speed this up by pressing a button to wake the device. There should be web socket notifications for when config.pending is set and cleared.

@Mimiix Mimiix linked a pull request Mar 13, 2021 that will close this issue
@snozzlebert
Copy link

Realy nice to see that @ebaauw already started implementing this. I will receive my Hue Wall Switch modules on Monday :) Thanks!

ebaauw added a commit to ebaauw/homebridge-hue that referenced this issue Mar 13, 2021
- Add support for Hue wall switch module, see dresden-elektronik/deconz-rest-plugin#4566;
- Add support for Linkind 1-Key Remote Control, see #949.
@spookoly
Copy link

Very cool that this is already basically there. Ordered one as soon as it became available and it just turned up. Can't believe how fast you are @ebaauw ! Many many thanks.

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 13, 2021

I'm planning to get this out in the next beta / release

@ebaauw
Copy link
Collaborator Author

ebaauw commented Mar 14, 2021

I think the PR is good to go.

@ebaauw
Copy link
Collaborator Author

ebaauw commented Apr 2, 2021

For completeness, the device can issue the following button events:

devicemode first input second input
singlerocker 1000, 1002 --
singlepushbutton 1000, 1001, 1002, 1003 --
dualrocker 1000, 1002 2000, 2002
dualpushbutton 1000, 1001, 1002, 1003 2000, 2001, 2002, 2003

When configured as rocker, it will issue a x000/x002 each time you flip the rocker (to either position). The event duration for the x002 is 1 (for 100ms), but lastupdated suggests it follows the x000 faster than that.

When configured as pushbutton, it will issue a x000/x002 sequence on press/release, and an x000/x001/.../x001/x003 on press/hold/release, similar to the Hue dimmer switch and the Hue smart button. The eventduration increased with 8 for each x001, and they are issued pretty much every 800ms.

@dworkin74
Copy link

I have added the device but it doesn't show up in the GUI.
Is that correct?

@ebaauw
Copy link
Collaborator Author

ebaauw commented Apr 21, 2021

If it doesn’t show in the GUI, you haven’t added it. It could be hidden behind another node, or far away from the other nodes, making it difficult to locate. Double check the Node List panel to be sure.

@dworkin74
Copy link

Sorry It is in Deconz but not in Phoscon

@ebaauw
Copy link
Collaborator Author

ebaauw commented Apr 21, 2021

Request support by Phoscon in the Phoson repo.

@dworkin74
Copy link

dworkin74 commented Apr 21, 2021

I did now. Another question, I see duplicate events when pressing the button. I believe that is not what should happen. I set it to single push button.
I am trying to use the events in Home Assistant to manage my lamps

@ebaauw
Copy link
Collaborator Author

ebaauw commented Apr 21, 2021

What events are you seeing where?

When set to push button, you should get a 1000 on press, and a 1002 on release; or a 1000 on press, a 1001 every 0.8s while holding, and a 1003 on release.

Short press:

Apr 21 19:33:53 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1000,"eventduration":0,"lastupdated":"2021-04-21T17:33:53.975"}
Apr 21 19:33:54 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1002,"eventduration":6,"lastupdated":"2021-04-21T17:33:54.589"}

Long press:

Apr 21 19:33:59 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1000,"eventduration":0,"lastupdated":"2021-04-21T17:33:59.062"}
Apr 21 19:33:59 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1001,"eventduration":8,"lastupdated":"2021-04-21T17:33:59.872"}
Apr 21 19:34:00 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1001,"eventduration":16,"lastupdated":"2021-04-21T17:34:00.681"}
Apr 21 19:34:01 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1001,"eventduration":24,"lastupdated":"2021-04-21T17:34:01.492"}
Apr 21 19:34:02 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1001,"eventduration":32,"lastupdated":"2021-04-21T17:34:02.302"}
Apr 21 19:34:02 pi5 dc_eventlog[817]: /sensors/15/state: {"buttonevent":1003,"eventduration":35,"lastupdated":"2021-04-21T17:34:02.657"}

@dworkin74
Copy link

dworkin74 commented Apr 21, 2021 via email

@rileymd88
Copy link

Hi everyone - How did you manage to initially pair this device? I have tried clicking the following two ways without any success:

  1. Press reset button once quickly and going to Phoscon -> Switches -> Add new switch -> Others
  2. Holding the reset button for 10 seconds and going to Phoscon -> Switches -> Add new switch -> Others

In Phoscon it says that it did not find any new devices and I do not see any new devices within the DeCONZ map

@ebaauw
Copy link
Collaborator Author

ebaauw commented May 23, 2021

That would have to be a release of the wall switch module firmware.

@TheFops
Copy link

TheFops commented May 23, 2021

@ebaauw OK so I'm not able to add it to deCONZ and use it blinded to my hue lights when the deCONZ server is down?

@dseehof
Copy link

dseehof commented May 25, 2021

@rileymd88 How did you get it into Phoscon in the end? I tried all different Philips switches both in Beta and normal and also other, but nothing.

@sladexos
Copy link

@rileymd88 How did you get it into Phoscon in the end? I tried all different Philips switches both in Beta and normal and also other, but nothing.

Same here! It is very nice that we can use the wall switch module in Phoscon. But how can I get it into Phoscon. GW-Version is "2.11.05 / 9.5.2021" - After I try it 2 hours I don't get it into Phoscon... Can Anybody help?

@apfelflo89
Copy link

apfelflo89 commented May 25, 2021

@sladexos @dseehof

They aren't supported by phoscon yet, they don't show up within the webguis, just within the deconz GUI on your client or within the webapi.
So you might already paired it but it won't show.
Start Paring mode with "Switch other" in Phoscon.
The LED blink while pairing so you might do a reset and then press the button/switch you connected. After success some of your lights should blink and show that the pairing succeeded
So for me it worked with a reset and then pressing a or both bottons.

@sebastien-k
Copy link

@rileymd88 did you manage to get the module to pair?

@apfelflo89 Yes I did - It paired right away after I put one of the provided cables into the input...Not sure if this was the key or if it was just a coincidence.

Hello,

Could you please be more specific and explain in detail how you managed to pair it?
And how did you know you actually paired it ?
I'm struggling, thank you in advance !

@deebeo-blip
Copy link

@rileymd88 did you manage to get the module to pair?

@apfelflo89 Yes I did - It paired right away after I put one of the provided cables into the input...Not sure if this was the key or if it was just a coincidence.

Hello,

Could you please be more specific and explain in detail how you managed to pair it?
And how did you know you actually paired it ?
I'm struggling, thank you in advance !

I'm highly interested in this as well. Question: Will it appear in the webgui once paired through deconz? I can see a lot more of these switches in my house so it would be very nice to include them via webgui like other switches.

@rileymd88
Copy link

@rileymd88 did you manage to get the module to pair?

@apfelflo89 Yes I did - It paired right away after I put one of the provided cables into the input...Not sure if this was the key or if it was just a coincidence.

Hello,
Could you please be more specific and explain in detail how you managed to pair it?
And how did you know you actually paired it ?
I'm struggling, thank you in advance !

I'm highly interested in this as well. Question: Will it appear in the webgui once paired through deconz? I can see a lot more of these switches in my house so it would be very nice to include them via webgui like other switches.

Hi @sebastien-k and @deebeo-blip

I had the device sitting on my desk and then I plugged in the provided cable into the device and then starting the pairing process in Phoscon and then I pressed the button on the switch. As noted above these devices will currently NOT show up in Phoscon so you will have to check in DeCONZ itself to see if it paired successfully.

@steffensammet
Copy link

Hi,

I just achieved to pair the switch (lucky me 😊). This is how I did:

  1. Turn on pairing mode in Phoscon
  2. On the switch, hold reset button for about 10 seconds. You will see the red light going on
  3. Press a button that is connected to the switch 2 times
  4. Smile 😊

I hope this helps,
Steffen

@fridward
Copy link

I am still lost:

  1. Updated to phoscon 2.12.06 first.
  2. tried to pair it with switches - add new switch - other
  3. pushed reset button on the switch for 10 seconds
  4. nothing is shown in the phoscon app
  5. opening home assistant -one Rwl 021 is shown wit battery as the only entity ( I can not get rid of the device in home assistant though - why ?)

....

when I updated from 211.05 to 2.12.06 the switch was shown in phoscon, but when I removed it because I could not get it to work, I ws not able to pair it again.

@fridward
Copy link

fridward commented Aug 25, 2021

I was able to pair the wall switch again and even got to see it in phoscon, but I cannot do anything with it. different to the common hue dimmer I cannot setup a group to control a lamp. In deconz I do get strange data and in home assistant I can see the switch as RWL 121 but I do not have any entity at all (not even the battery entity anmore) :-( Actually the wall plug is in my opion the mot important product hue has to offer in years. Hopefully it will work sooner or later with conbee2.

Bildschirmfoto 2021-08-25 um 07 42 40

Bildschirmfoto 2021-08-25 um 07 42 15

Bildschirmfoto 2021-08-25 um 07 40 43

@Mimiix
Copy link
Collaborator

Mimiix commented Aug 25, 2021

I was able to pair the wall switch again and even got to see it in phoscon, but I cannot do anything with it. different to the common hue dimmer I cannot setup a group to control a lamp. In deconz I do get strange data and in home assistant I can see the watch as RWL 121 but I do not have any entity at all (not even the battery entity anmore) :-( Actually the wall plug is in my opion the mot important product hue has to offer in years. Hopefully it will work sooner or later with conbee2.

Bildschirmfoto 2021-08-25 um 07 42 40 Bildschirmfoto 2021-08-25 um 07 42 15 Bildschirmfoto 2021-08-25 um 07 40 43

As @ebaauw mentioned in #4566 (comment)

It does not support Grouping.

However, does it generate deconz_events in HA?

@fridward
Copy link

when I hit the switch (on/off) connected to the hue wall switch I get the following events:

Event 109 fired 10:52 AM:
{
"event_type": "deconz_event",
"data": {
"id": "rdm001_28",
"unique_id": "00:17:88:01:0b:00:f4:e1",
"event": 1002,
"device_id": "c05fd4bf8839e09a97e232a373e256b6"
},
"origin": "LOCAL",
"time_fired": "2021-08-25T08:52:41.756268+00:00",
"context": {
"id": "69af8e2476a3b4098bcbd0cbe336da4b",
"parent_id": null,
"user_id": null
}
}
Event 108 fired 10:52 AM:
{
"event_type": "deconz_event",
"data": {
"id": "rdm001_28",
"unique_id": "00:17:88:01:0b:00:f4:e1",
"event": 1000,
"device_id": "c05fd4bf8839e09a97e232a373e256b6"
},
"origin": "LOCAL",
"time_fired": "2021-08-25T08:52:41.571140+00:00",
"context": {
"id": "9664c7960b21f65648afd5c9a72cb251",
"parent_id": null,
"user_id": null
}
}

@yves19
Copy link

yves19 commented Sep 8, 2021

No grouping, no binding despite clusters 0x0006 and 0x0008. The interest seems quite low.
It's more or less the equivalent of some IKEA scenario button launchers but is at leat twice more expensive

@vladimir-aubrecht
Copy link

Just for another person who will find this thread, here is how I managed to pair it (just spent two days on it 🤦🏼‍♂️ ):

I had modules pre-paired with Philips Hue Bridge (Bridge S) and wanted to migrate them to another bridge (Bridge T).

  1. Permit joining of new devices on bridge T.
  2. I turned off bridge T.
  3. I switched the channel on Bridge S to channel on which Bridge T is running.
  4. I turned off bridge S.
  5. I turned on bridge T.
  6. I hold reset button on Philips Hue Wall Module. You must hold it long enough (LED must eventually go off, it's much longer then 10s ...). Make sure you hear click when pressing it.
  7. When LED went off release reset button and quickly connect and disconnect white and yellow wires few times on the input 1.
  8. Enjoy! 😊

(Hold that reset button long enough!!)

@spudje
Copy link

spudje commented Dec 4, 2021

When configured as pushbutton, it will issue a x000/x002 sequence on press/release, and an x000/x001/.../x001/x003 on press/hold/release, similar to the Hue dimmer switch and the Hue smart button. The eventduration increased with 8 for each x001, and they are issued pretty much every 800ms.

Why does it work like this? I would like to have behaviour that I only get 1 (one) event for hold (x001), just like with the IKEA Tradfri ON/OFF Switch. This continuous stream of events is unable to automate against...

@leoluk
Copy link

leoluk commented Feb 6, 2022

Looks like it does support controlling groups, but using a custom mechanism: Koenkk/zigbee2mqtt#10740 (comment)

Managed to get mine to control a single group!

@ebaauw
Copy link
Collaborator Author

ebaauw commented Feb 6, 2022

Is that group hard-coded, or does it change resetting the module? I cannot remember any specific setup by the Hue bridge, but this is certainly worth taking out the sniffer and re-examining the pairing with the Hue bridge.

@leoluk
Copy link

leoluk commented Feb 7, 2022

It changes to a new random group when resetting!

@ebaauw
Copy link
Collaborator Author

ebaauw commented Feb 7, 2022

Managed to get mine to control a single group!

Just to be sure: the wall switch module controls the group directly, even when zigbee2mqtt is not running? Or does the zigbee2mqtt external converter issue the group commands? Did you actually capture a packet where the MAC source is the module?

@leoluk
Copy link

leoluk commented Feb 7, 2022

Correct - the wall switch module sends a group command directly to the fixed group. It works without zigbee2mqtt (tested it to be 100% sure), the screenshot in the other threads shows the source NWK address as 0xd4f8, which is the device.

I'm not actually sure whether the custom converter is necessary, I think it just skips some of the default initialization logic just in case that was getting the device in a weird state.

@ebaauw
Copy link
Collaborator Author

ebaauw commented Feb 7, 2022

the screenshot in the other threads shows the source NWK address as 0xd4f8, which is the device.

Yes, I saw that. But is the MAC address in the IEEE 802.15.4 Data frame header also from the wall switch module?

I don't understand what magic zigbee2mqtt has done to get the device to send the group commands from On/Off. Does it still send the commands from the FC00 cluster to the coordinator, in addition to the group commands? When paired with deCONZ, and when paired with the Hue bridge, I only see unicast commands from the FC00 cluster.

@leoluk
Copy link

leoluk commented Feb 7, 2022

Yep, the MAC is the right one. It doesn't send anything to the coordinator.

@spudje
Copy link

spudje commented Oct 10, 2022

Recently my wall switches, configured as push buttons, or deconz started to behave differently)/strangely, Most times when I (short) press I only get x000 events and not the release x002 events anymore. Only when I press a couple of times I get the x002 release.

Has the behaviour been updated and is the x002 now supposed to be a double press? Or is something wrong on my side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.