I have a problem with the hue - switch

#1

I am using a HueSwitch-Node. The switch itself is configured and functioning within the hue bridge. The switch can turn lights on and off.
Now, I want to use the switch in Node-red.
BUT
The switch node does not throw (send) messages to a debug-node.
under the switch are several messages displayed
...waiting
...off pressed
...on pressed
...long released and so on.
the switch-node looks like it is working fine.
BUT no messages ... on the debugnode

0 Likes

#2

You have to tell us exactly which node you are using or better, post your flow here.

0 Likes

#3

36
node-red-contrib-huemagic
51

[{"id":"191670d7.43c4d7","type":"function","z":"5b470d4d.05b974","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":1180,"y":1640,"wires":[[]]},{"id":"cd42d39d.f198d","type":"hue-switch","z":"5b470d4d.05b974","name":"Dimmer Schalter WZ","bridge":"1be654be.3ac6cb","sensorid":"6","x":960,"y":1620,"wires":[["191670d7.43c4d7","5ad3a7fe.6268b"]]},{"id":"5ad3a7fe.6268b","type":"debug","z":"5b470d4d.05b974","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1180,"y":1600,"wires":[]},{"id":"1be654be.3ac6cb","type":"hue-bridge","z":"","name":"Philips Hue EG Flow","bridge":"192.168.4.111","key":"KEY88KEYKEYKEYKEYKEYk--KeyKeyKeyKeyKeyK","interval":"3000"}]

0 Likes

#4

Strange, I've just tried with my Hue-Bridge and an Hue dimmer switch. It works for me.

Which versions are you using?
node.js
node-red
node-red-contrib-huemagic

0 Likes

#5

v0.19.5 in node red menue
node -v 10.14.2
1.9.0 HueMagic

0 Likes

#6

I'm using node.js v8.15.0
I'd ask the author, as far as I know it has not been tested for node.js 10.x.

BUT no messages ... on the debug node

To be sure, does it mean you don't get any msg? or any msg.payload?

0 Likes

#7

nothing no message, no payload, on entry in the debug-window

0 Likes

#8

An output example:

{
	"payload": {
		"button": 4002,
		"name": "Off",
		"action": "short released",
		"updated": "2019-02-22T11:50:41+01:00"
	},
	"info": {
		"id": "3",
		"uniqueId": "00:17:88:01:10:39:f4:68-02-fc00",
		"name": "Hue dimmer switch 1",
		"type": "ZLLSwitch",
		"softwareVersion": "5.45.1.16265",
		"battery": 83,
		"model": {
			"id": "RWL021",
			"manufacturer": "Philips",
			"name": "Hue Wireless Dimmer Switch",
			"type": "ZLLSwitch"
		}
	},
	"_msgid": "35aa22e4.4edf9e"
}

Try node.js v8.x or ask the author > huemagic

Edit:

Try the Hue Bridge node, do you get a message?

huebridge

0 Likes

#9

Something STRANGE happened:
11
I had this nodes before, and deployed it without problems, errors, warnings.
Then I placed the injector:
23
Tried to deploy it:
58
and these two messaged appeared.

??? what is going on here ??? I have not installed a homekit-accessory (I do not remember) Homekit is for Apple?

0 Likes

#10

Stop Node-RED, and then restart it and post the startup log here

0 Likes

#11

where do I get the log from?

0 Likes

#12

That depends on what OS you are on, how you installed node-red and how you run it.
If when you start node-red you get a Welcome to node-red message then it is that output that is wanted. If not then if you are on a Pi, for example, you should be able to run

node-red-stop
node-red-start
0 Likes

#13

Ah, ok, this log:

(I do not know how to publish this as CODE)

sudo node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.4.97:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
22 Feb 13:21:27 - [info] 

Welcome to Node-RED
===================

22 Feb 13:21:27 - [info] Node-RED version: v0.19.5
22 Feb 13:21:27 - [info] Node.js  version: v10.14.2
22 Feb 13:21:27 - [info] Linux 4.14.79-v7+ arm LE
22 Feb 13:21:28 - [info] Loading palette nodes
22 Feb 13:21:31 - [info] Settings file  : /root/.node-red/settings.js
22 Feb 13:21:31 - [info] Context store  : 'default' [module=memory]
22 Feb 13:21:31 - [info] User directory : /root/.node-red
22 Feb 13:21:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
22 Feb 13:21:31 - [info] Flows file     : /root/.node-red/flows_raspberrypi.json
22 Feb 13:21:31 - [info] Creating new flow file
22 Feb 13:21:31 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

22 Feb 13:21:31 - [info] Server now running at http://127.0.0.1:1880/
22 Feb 13:21:31 - [info] Starting flows
22 Feb 13:21:31 - [info] Started flows
0 Likes

#14

Are you running node-red as root for some reason? That is generally not recommended. It may well be that previously you were not running as root, and now you are.
Are you still getting the messages in the browser? If you click where it says to click to see unused nodes you can see what it is, and then double click and Delete it if you don't need it.

0 Likes

#15

How to publish as code.Please read the following post How to share code or flow json or use the </>button above

0 Likes

#16

Great SOLVED. There was a unused Bridge on a flow, and a "key". I have deleted both, and now EVERYTHING is running quite well.

  1. the injector,
  2. the Messages from the switch
0 Likes