# Nodes for Hue switch not responsive

**URL:** <https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302>\
**Category:** General\
**Created:** [29 October 2019 23:32 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302 "2019-10-29T23:32:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [29 October 2019 23:32 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/1 "2019-10-29T23:32:51Z")

</div>

I am using the Hue switch node from node-red-contrib-huemagic wired straight into a debug node to capture responses. At most the node will send responses with a significant delay if any. I have configured the switch on the bridge to turn on/off one light and the bridge acts immediately.  
Using the Light node I can capture the lights response. While with delays, I can get the light state reliably.  
The current behavior makes it impossible to use Hue switches in node red to control as in my case a mqqt message.

The question I have, is this just me or are the hue nodes generally acting with significant delays? I am keen to hear from anyone who is using Hue switches via node red.

---

<div class="post-metadata">

**Author:** ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)\
**Post date:** [30 October 2019 14:08 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/2 "2019-10-30T14:08:04Z")

</div>

Try changing the poll frequency in the config node.

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [30 October 2019 23:11 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/3 "2019-10-30T23:11:56Z")

</div>

Thanks. I tried it and it did not solve the issue.

I did had a look at the logs and found these:

```auto
31 Oct 07:06:33 - [debug] [hue-bridge:Philips hue] TypeError: Cannot read property 'lastUpdated' of undefined
    at HueBridge.getUpdates (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/red/hue-bridge-config.js:120:34)
    at scope.client.rules.getAll.then.then.results (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/red/hue-bridge-config.js:59:31)
    at process._tickCallback (internal/process/next_tick.js:68:7)
31 Oct 07:06:34 - [debug] [hue-bridge:Philips hue] TypeError: Cannot read property 'lastUpdated' of undefined
    at HueBridge.getUpdates (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/red/hue-bridge-config.js:120:34)
    at scope.client.rules.getAll.then.then.results (/home/pi/.node-red/node_modules/node-red-contrib-huemagic/red/hue-bridge-config.js:59:31)
    at process._tickCallback (internal/process/next_tick.js:68:7)

```

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [31 October 2019 08:37 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/4 "2019-10-31T08:37:57Z")

</div>

> [@Antil](#):
>
> I have configured the switch on the bridge to turn on/off one light and the bridge acts immediately.

The hue magic nodes are made to do this.  
I have no problems with hue-magic at all, works instantly. But I don't use the switches.

If you add a switch to the flow and capture the output in a debug node and press the button ? What is the delay ?

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 12:55 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/5 "2019-10-31T12:55:59Z")

</div>

> [@bakman2](#):
>
> > [@Antil](#):
> >
> > I have configured the switch on the bridge to turn on/off one light and the bridge acts immediately.
> 
> The hue magic nodes are made to do this.  
> I have no problems with hue-magic at all, works instantly. But I don't use the switches.
> 
> If you add a switch to the flow and capture the output in a debug node and press the button ? What is the delay ?

I have no issues with any other devices than sensors (switches, motion). Poll time has been reduced. Everything else works fine.  
The delay is massive and messages are not reliable. So far that it is not usable.  
Openhab is working fine. My plan was to replace Openhab with NodeRed but this is off the table now.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [31 October 2019 13:10 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/6 "2019-10-31T13:10:08Z")

</div>

If you have checked the recommended nodejs version in the ReadMe and that you have the latest version of the node, you can open an issue on the nodes page on github to communicate directly with the nodes author

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [31 October 2019 13:11 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/7 "2019-10-31T13:11:39Z")

</div>

> Openhab is working fine.

Are you using the same API key for OH and NR ? ie. interference. And indeed I would open een issue on github if you can replicate it.

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 13:26 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/8 "2019-10-31T13:26:47Z")

</div>

> [@ukmoose](#):
>
> If you have checked the recommended nodejs version in the ReadMe and that you have the latest version of the node, you can open an issue on the nodes page on github to communicate directly with the nodes author

Good point. It is a fresh install using the NodeRed recommended approach, so I assume it is the latest.  
I checked on GitHub after I posted here and someone already raised an issue. I was curious if anyone else is seeing the same. I now know I am not alone.

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 13:27 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/9 "2019-10-31T13:27:34Z")

</div>

> [@bakman2](#):
>
> > Openhab is working fine.
> 
> Are you using the same API key for OH and NR ? ie. interference. And indeed I would open een issue on github if you can replicate it.

No. I created a new key. Even turned off OH completely but will go back and used the OH nodes to interface.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [31 October 2019 13:32 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/10 "2019-10-31T13:32:41Z")

</div>

> [@Antil](#):
>
> It is a fresh install using the NodeRed recommended approach, so I assume it is the latest.

That would give you the latest version of Node-RED, to see if you have the latest version of the node you can check in the “Manage palette” option in the menu

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 13:45 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/11 "2019-10-31T13:45:06Z")

</div>

> [@ukmoose](#):
>
> > [@Antil](#):
> >
> > It is a fresh install using the NodeRed recommended approach, so I assume it is the latest.
> 
> That would give you the latest version of Node-RED, to see if you have the latest version of the node you can check in the “Manage palette” option in the menu

Yes it is 1.0.2.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [31 October 2019 13:46 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/12 "2019-10-31T13:46:39Z")

</div>

@ukmoose was referring to the nodejs/npm versions.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [31 October 2019 13:53 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/13 "2019-10-31T13:53:01Z")

</div>

Actually I wasn’t!

The nodes ReadMe lists recoomended versions of nodejs

The latest version of the node is v2.0.4

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 14:03 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/14 "2019-10-31T14:03:03Z")

</div>

> [@bakman2](#):
>
> @ukmoose was referring to the nodejs/npm versions.

Node.js version: v10.17.0

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [31 October 2019 14:09 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/15 "2019-10-31T14:09:05Z")

</div>

> [@ukmoose](#):
>
> Actually I wasn’t!
> 
> The nodes ReadMe lists recoomended versions of nodejs
> 
> The latest version of the node is v2.0.4

How do I check this in "Manage palette"? I can't spot it there.  
I am learning fast but I am pretty new to NodeRed,

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [31 October 2019 15:40 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/16 "2019-10-31T15:40:13Z")

</div>

In managed palette you can see all your installed nodes on one tab

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/90a0666b0d4e21be724a4332593b03f2388f0567.png)

---

<div class="post-metadata">

**Author:** ![Antil](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Antil](https://discourse.nodered.org/u/Antil)\
**Post date:** [5 November 2019 06:55 UTC](https://discourse.nodered.org/t/nodes-for-hue-switch-not-responsive/17302/17 "2019-11-05T06:55:25Z")

</div>

> [@ukmoose](#):
>
> In managed palette you can see all your installed nodes on one tab
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/90a0666b0d4e21be724a4332593b03f2388f0567.png)

It is 2.0.4.

I have given top on this and I am using the OH nodes to connect to Hue switches. While it adds a component it is at least reliable.
