Node-RED nodes for hubitat

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!

Lol me too. I was puzzling over how to get my wifes pico to do all the things she wants. I think this is the answer.

1 Like

I haven't done much with storing variables so this will be a learning experience.

No, I had some errors when I imported the Lutron flow and it was working fine in HE so I didn't pursue.

Maybe you could also trigger some kind of indicator at the same time. eg. Hit the button, and lights blink once to indicate you're in "level" mode. Lights blink twice to indicate you're in "temp" mode. Or lights dim briefly up and down if in level mode, and change temp up and down when in temp mode.

I like your thinking!!! Its actually a group of 4 zigbee bulbs so maybe i blink one of the end ones so that the room doesn't go dark but it does indicate if you are changing level or temperature.

Ok, here is where I landed. I tested the logic. I just can't test the Pico because I am not at home so this might not work. I implemented @jason-lane's suggestion (i think) to blink one bulb when controlling temperature. I will test more when I get home.

KIDS BATHROOM is the group of Zigbee bulbs. KIDS BATHROOM CT is a virtual device that changes the temperature of bulbs with range from 2700-6500 and converts it to a range of 0-100 so I can control with a dimmer tile on my dashboards. This is that flow and it was inspired by a driver that @adamkempenich wrote to do same but within HE :

2 Likes

Thanks @JasonJoel and @aaiyar for helping out.

I knew it was something daft I was doing but I blame it being a long day yesterday … I had the wrong IP Address setup in the HE Maker API. Put the IP Address of my Node-Red machine and what do you know … it's working.

Now to remind myself what I was trying to in the first place!

Cheers.

3 Likes

Does anyone have a loopback/feedback dashboard flow for a lightswitch, that both updates the dash switch and the physical switch when either is changed?

I tried one, and got into a loop.

I’m trying to find a way to use harmony home control buttons to activate a zigbee light. Would this allow that?

Not directly, but I think you can do this indirectly. You can create a "dummy" activity that is triggered by the desired control button (all done using the Harmony app). Then the node-red-contrib-harmony-websocket integration has a harmony observer node that watches when activities are triggered.

You can use that node to act as a trigger when the "dummy" activity starts. And turn on your zigbee light using one of the Hubitat nodes.

Thx, also how “heavy” is node red. My 4gb as running Homebridge and pihole. Would node red push the limit?

What is a 4gb? An RPi4? If so, it can handle all that easily.

Remind me this weekend, I'll create a test flow for you to confirm my idea works before you invest any time in this.

Yes, sorry. My typing is jumbled. How about the emulated hue one you mentioned. Since harmony controls hue , couldn’t I just make that bulb “hue”?