# Are Hue Wall Switch modules supported?

**URL:** <https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880>\
**Category:** General\
**Created:** [5 October 2021 10:31 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880 "2021-10-05T10:31:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [5 October 2021 10:31 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/1 "2021-10-05T10:31:51Z")

</div>

Hello,

I'm trying to configure a Philips Hue wall switch module in my dashboard, but I don't seem to be able to add them as "Hue Switch" in my dashboard as it does not appear in the device dropdown.

Are they not supported?

![huewallswitch](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/722d57c08d7b16a5bd2493396ec50deaf28f71f7.jpeg)

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [5 October 2021 18:19 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/2 "2021-10-05T18:19:27Z")

</div>

What node are you using?

---

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [7 October 2021 08:57 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/3 "2021-10-07T08:57:03Z")

</div>

I'm running node-red 2.0.6 with node-red-contrib-huemagic 3.0.0.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [7 October 2021 09:34 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/4 "2021-10-07T09:34:51Z")

</div>

> [@iowahansen](#):
>
> node-red-contrib-huemagic

I don't use this node, or Hue, but what data do you get from the Bridge node?

---

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [7 October 2021 09:47 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/5 "2021-10-07T09:47:29Z")

</div>

I've done some digging around and it looks like _node-red-contrib-huemagic_ depends on a library called _huejay_ for interfacing with the Hue bridge. That library has not been updated since 2019 though and there are a bunch of outstanding merge requests for Hue devices that were released after 2019.

These in-wall switches were released about 6 months ago, so I've added support for them in _huejay/lib/SensorModel/RDM001.js_ as ZLLSwitch and when I try to add a new Hue Switch node to node-red, I see the backend returning

```auto
http://192.168.1.140:1880/hue/sensors?bridge=192.168.1.124&key=Y0VNk9DyXtlAdaXtlFNoQI7B-QgCkKGUUlC2PITr&type=ZLLSwitch

[{"id":"35","name":"Hue wall switch module 1","model":"Hue Wall Switch","model_id":"RDM001"}]

```

but even so, I still can't select the switch in the dropdown as shown in the following screenshot:

 ![switch_node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c9eb6ceddab0878b63c8f823d30c37fd1d80b3c9.png)

---

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [7 October 2021 11:16 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/6 "2021-10-07T11:16:38Z")

</div>

Another update: if I manually specify the sensor id (instead of using the dropdown), I do seem to get events that look like this:

{ button: 1002, name: "On", action: "short released", updated: "2021-10-07T10:40:55+00:00" }

{ button: 1000, name: "On", action: "pressed", updated: "2021-10-07T10:41:36+00:00" }

I don't seem to see "Off" events, but at least it is a start.

---

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [7 October 2021 14:44 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/7 "2021-10-07T14:44:24Z")

</div>

Everything works now. I had to edit _./huemagic/hue-switch.html_ to include my new device type "Hue Wall Switch" to show up in the dropdown

```auto
if(sensor.model == "Hue Wireless Dimmer Switch") // add here

```

Also interesting, the wall switch module is essentially a button that always sends a "short released" event independent of the on/off state of the switch. This was counterintuitive at first, but made sense after considerung that the state of lights can change independent of the current switch setting (e.g. switch turns on lights, app turns off lights, next switch interaction should turn on the lights again).

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [7 October 2021 14:45 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/8 "2021-10-07T14:45:30Z")

</div>

Goes this device have an 'off' state. From looking at some reviews the units I saw only had a press state, so you have to keep track of how many times it was pressed. It can probably also allow you to track a long press (if you get a release after a pressed)

---

<div class="post-metadata">

**Author:** ![iowahansen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iowahansen/32/49021_2.png) [@iowahansen](https://discourse.nodered.org/u/iowahansen)\
**Post date:** [8 October 2021 06:24 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/9 "2021-10-08T06:24:29Z")

</div>

I only saw "short released" events from this switch. Because the switch is either open or closed, I don't see how it can distinguish between short & long press.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [8 October 2021 15:11 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/10 "2021-10-08T15:11:56Z")

</div>

Hi, I am sure that the switch cannot distinguish between a short and long press, but the software monitoring the switch should be able to 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 October 2021 15:12 UTC](https://discourse.nodered.org/t/are-hue-wall-switch-modules-supported/51880/11 "2021-10-22T15:12:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
