jdomeij / node-red-contrib-node-hue

Node RED nodes for controlling Philips Hue lights
Apache License 2.0
17 stars 8 forks source link

Not working with boolean devices (e.g. power plugs) #10

Closed dersimn closed 6 years ago

dersimn commented 6 years ago

Devices with just on/off field like Osram Lightify Plug

"3": {
    "state": {
        "on": false,
        "alert": "none",
        "reachable": true
    },

causing error "parameter, bri, not available".

jdomeij commented 6 years ago

I have added workaround for empty bri, not certain if it fixes the problem because i couldn't reproduce to see where it was triggered.

dersimn commented 6 years ago

Hm, ok now it's turning on, the label shows on (0%) (strange, eh?) but turns off again for no reason at the next polling intervall.

Do you have some kind of tutorial how to debug Node RED scripts? I'm just familiar with NodeJS.

jdomeij commented 6 years ago

on (0%) is not strange because i set the brightness to zero if it's not set. This node should not send new status during polling, most likely you have something that triggers on the updated values and send new value to the light. An example is enabling the "If msg arrives on input, pass through to output" on the dashboard switch node, which can trigger some strange behavior

Try adding an debug node that receives the same data as the node-hue output node,