Node-RED nodes for hubitat

Okie dokie. Looks like a go it alone. Thanks for the awesome nodes.

Sorry, no thoughts on my end on how that would be done.

I don't use GAR. But I do use switch nodes to parse responses from the Alexa-remote2 integration.

No worries. I just thought figured you guys had been at it would be able to guide me to helpful node / flows. Retrieving a response and parsing the request likely has several approaches that can be taken as it's quite basic imo. I'll get it sorted.

1 Like

Yeah sorry not sure beyond the normal stuff.. take a look at "split" & "join" nodes maybe.

Also have you seen this?

Also possibly using MQTT - here's another project..

Having a feature to do not send command if the device state is the same value than the command?

Technically

  • This palette doesn't keep device state for all of devices. Each device node keep its own state. I would require to copy the same init logic as the device node
  • You can set the deviceId dynamically with the input message to the command node.
    • if we want to continue to support it: we need to keep state of all devices in NR (and if we need to initiate cache for all devices (slow process), I think some of us will hate you :stuck_out_tongue: )
    • if we make this feature incompatible with the other, than it add some complexity for the user

Conceptually:

  • We already mention it in this thread (lol but I don't know where :laughing: ), but a node should do one and only one thing.
  • I don't like the idea of half-mixing concept of device node with command node. Otherwise we will end up with one big node to do everything
  • Since it's a good practice to check the device state before sending command. On most scenarios it doesn't do anything to send multi time the same command

Summary
It's technically not an easy process (but possible) and conceptually not an idea that I'm convinced :sweat_smile:

3 Likes

Yeah, I am not wed to the idea, I was spitballing whether it might save pain for others later... I am doing it for myself, so no big issue here.

You guys know if it's possible to emulate a hue bulb on node red then feed those commands into hubitat to control zigbee bulbs linked direct to hubitat?

Looking at the hue node documentation the nodes seem to be able to translate for commands in different formats on the fly..

Looking to incorporate some more led strips into my hue entertainment groups.

Not I, I don't have any hue products.

Maybe this?

1 Like

This looks very promising. Didn't catch that one in my googling.

Tyvm.

1 Like

A big thank you to @aaiyar, now I'm start to learn Node-RED nodes for hubitat.

I had a Hue Dimmer Switch ( 4 button ) on Hue Bridge. On NR, use HueMagic.
On this simple flow, it did not work !
How about Dim Up/Dim Down ?
Any help much appreciated.


I don't have Hue, so I'm not sure. But I have a good guess. Each integration uses a different msg property.

So here is what you should do:

Attach a debug node to the Hue button node. Set the debug node to "complete msg object".

Then save it.

Then open the debug window and press each button. In the window, the msg properties will be displayed. Based on that, you can configure the switch node.

I'm taking a guess and saying that the Hue node sends "msg.payload", not "msg.payload.value".

I'm going to apologise now as I know I am doing something stupid but cannot see what.

I've installed the Maker API on my HE and selected a single Fibaro Switch as a device to publish. I've turned on the debug and in the logs I see the Maker API sending events when I toggle the switch on/off.

I have Node-RED running on my PC and seemingly all is hooked-up to HE correctly as when I configure the webhook in Node-RED that succeeds. I then added a device node to a flow and sure enough I see my Fibaro plug in the list. I hooked that node to a debug node and deployed.

The flow initially looks good as it shows the correct state of the plug. The Maker API logs also show a call being made to listDevices etc so all appears well. BUT if I toggle the switch on/off the HE logs show the device event but nothing happens in Node-RED … no debug message appears and the plug state does not update.

What am I doing wrong? Any ideas?

Depends on OS, but do you have a firewall? Windows would block the events for sure in some cases.

1 Like

My debug now are flooding error " Home Assitant ". I can not delete " node-red-contrib-home-assistant " !?

Find the config node for Home Assistant and delete it. You can find it from "Hamburger Menu" -> Configuration Nodes.

After it is deleted, you can remove the home-assistant nodes from your palette.

1 Like

Have you configured your webhook properly?
on NR HE config node usually something like this:

Node-RED: http://[your-NR-ip]:1880/hubitat/webhook

and then on HE in the maker app:

URL to send device events to by POST
http://[your-NR-ip]:1880/hubitat/webhook

Edit: I realize you said you got the webhook check but thought I'd mention it again anyway because barring a firewall block it just seems like a configuration issue.

I am trying to create a flow for a Pico in a bathroom that has CT Bulbs. Button 1 turns on lights and button 5 turns off lights. That's easy.

Here is where I need some help... I want button 2 to turn level up and button 4 to turn level down. However, if I push button 3, I want button 2 to turn temperature up and button 4 to turn temperature down. So, every time I push button 3, it should toggle whether buttons 2 & 4 control level or temperature. I don't want to push button 3 every time I want 2 & 4 to control temperature.

I know I could do it by creating a virtual switch but is there a better way (that doesn't require a Function Node)?

When you push button 3, you can set a flow variable to be true or false. Then for button 2 and 4, have level actions if the variable is true, and temperature actions if the variable is false. No function node needed.

P.S. Are you importing Picos via HE or directly via the Lutron integration?

Also - I like your idea. I'm going to borrow it!