Node-RED nodes for hubitat

Example flow:

In the change block I specify the device name (obviously it has to match a device name you have setup at pushover.net):
image

And in case you are wondering how I knew that, if you look at the node help/info for any node it should list any configurable input variables:

I use msg.device and msg.priority extensively, as there are some pushover messages I want to be emergency level and keep alerting until acknowledged.

Thanks for the info. I trying to absorb all of this and it is intimating at times but once I get a concept it sticks. Anyhow thanks for sharing.

3 Likes

Any time! I'm always happy to help when I have free time. I learn just as much as I teach on here, that's for sure!

I spend A LOT of time in node-red for work and personal use, so have learned a few tricks here and there. :wink:

2 Likes

Would someone mind giving me some examples to get me started? For whatever reason I'm having a hard time grasping Node-Red. I get what it does, I understand the idea behind it I'm just having a hard time getting it to click when it comes to what nodes to use and when.

For example, I've got quite a few simple rules setup in HE like the following.

Inovelli Red Dimmer (latest)
Button X pushed, lights at 25%
Button X pushed, lights at 100%

I've got notifications setup for certain door sensors. They open, I'm notified via HE.

Simple lights come on at this, lights go off at this time.

Those are some examples of things I've been trying to figure out just can't wrap my head around it. So if anyone has a few, and doesn't mind, I'd greatly appreciate some assistance.

Thanks!

I would suggest scrolling through this thread. There are many examples posted already - some easy, some complex.

Or if you need help in making a specific flow, let us know.

Hopefully I understood what you are trying to do clearly

[{"id":"de0cf56b.fc7ae8","type":"tab","label":"Requested Light Switch","disabled":false,"info":""},{"id":"ea0c757f.eea9d8","type":"hubitat device","z":"de0cf56b.fc7ae8","name":"Zooz Switch","server":"bcc58271.76572","deviceId":"1121","attribute":"pushed","sendEvent":true,"x":150,"y":220,"wires":[["c2c787ed.cb73f8"]]},{"id":"c2c787ed.cb73f8","type":"hubitat device","z":"de0cf56b.fc7ae8","name":"Is On?","server":"bcc58271.76572","deviceId":"1121","attribute":"switch","sendEvent":false,"x":290,"y":220,"wires":[["a0512111.953e8","3b584c8f.184414"]]},{"id":"a0512111.953e8","type":"switch","z":"de0cf56b.fc7ae8","name":"Decide what to do based on off/on","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":220,"wires":[["4a404e52.63734"],["a28f4bd9.472b18"]],"outputLabels":["Switch is off, turn on at 25%","Switch is already on, check level"]},{"id":"4a404e52.63734","type":"hubitat command","z":"de0cf56b.fc7ae8","name":"Turn on light","server":"bcc58271.76572","deviceId":"1121","command":"on","commandArgs":"","x":790,"y":160,"wires":[["5856cbe2.2fca54"]]},{"id":"5856cbe2.2fca54","type":"hubitat command","z":"de0cf56b.fc7ae8","name":"Set to Level 50","server":"bcc58271.76572","deviceId":"1121","command":"setLevel","commandArgs":"50","x":1020,"y":160,"wires":[]},{"id":"a28f4bd9.472b18","type":"hubitat device","z":"de0cf56b.fc7ae8","name":"What is current level?","server":"bcc58271.76572","deviceId":"1121","attribute":"level","sendEvent":false,"x":680,"y":320,"wires":[["69216087.e0559","fd008dca.63b7e"]]},{"id":"69216087.e0559","type":"switch","z":"de0cf56b.fc7ae8","name":"Set new level","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"50","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":320,"wires":[["8c224c36.03eea"],["991244e7.996b08"]],"outputLabels":["Is at 50, set to 100","Is at 100, turn off"]},{"id":"3b584c8f.184414","type":"debug","z":"de0cf56b.fc7ae8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":455,"y":120,"wires":,"l":false},{"id":"991244e7.996b08","type":"hubitat command","z":"de0cf56b.fc7ae8","name":"Was 100, turn off","server":"bcc58271.76572","deviceId":"1121","command":"off","commandArgs":"","x":1150,"y":340,"wires":[]},{"id":"8c224c36.03eea","type":"hubitat command","z":"de0cf56b.fc7ae8","name":"Was 50, set to 100","server":"bcc58271.76572","deviceId":"1121","command":"setLevel","commandArgs":"100","x":1150,"y":280,"wires":[]},{"id":"fd008dca.63b7e","type":"debug","z":"de0cf56b.fc7ae8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":835,"y":260,"wires":,"l":false},{"id":"bcc58271.76572","type":"hubitat config","z":"","name":"Hubitat Elevation","usetls":false,"host":"10.21.0.56","port":"80","token":"maker_api_token","appId":"174","nodeRedServer":"http://ip_address:1880/","webhookPath":"/hubitat/webhook"}]

@morningz That helps quite a bit actually, I appreciate that!

@JasonJoel Thanks for the reply. Based on what @morningz supplied I may be on the right track to actually understanding this thing. Time will tell!

Thanks!

1 Like

Once you get a few flows under your belt, it gets easier.

1 Like

I having a hard time to get this to work I have a Contact Sensor named Front Door and when the open I have a light switch that I want to come on? I using a Hubitat device node for the contact sensor and what to pass the open or closed to a switch that changes to on (open) or off (closed) is there a simple way to accomplish this. Contact is open and closed but it doesn't seem to pass that to the switch? Do i have to change the open to on etc??? Thanks

Absolutely! this community has been really great! I have learnt a lot!

I would suggest you do a debug on complete msg to see what payload that you are actually getting and move from there.
I don't have a contact sensor myself, but if you wanna share your debug output, I'm sure we are all more than happy to chip in advise.

I just solve this thanks.

@danfox52 That's the problem right now, getting anything to work. :stuck_out_tongue: I'm trying to setup a simple button pushed on an inovelli dimmer turns on a lamp. So literally 3 nodes, and it's not doing anything. I put a debug off of the button push node and it shows nothing.

image

The first node, Office dimmer, needs to be the other node in HE (the device node). It's an input, not a command. You're not issuing a command to the button, which is how it's set up as present.

Set it up so that the right button is allocated in the node.

2 Likes

To add to Mike's advice also when you want to see activity from the debug node you need to make sure and hit the Deploy in the upper right corner of the screen, that makes the little blue circle on the device go away. That blue circle means there have been changes made to that node that haven't been yet deployed.

2 Likes

Here is the bare basics, hopefully this will get you started.

Basic button sequence.

1st device (a device node) setting

pico1

2nd node (a switch node) setting

pico2

3rd node (a command node) setting

pico3

3 Likes

@mike Appreciate the feedback sir.

@waynespringer79 You were reading my mind. My response to @mike was going to be asking how to pass the button number along. Thank you SOOOO much! My crap works now!

I appreciate everyone's willingness to help, it's kinda sorta starting to make sense to me now.

2 Likes

I followed this thread until about 200 posts (without diving in), and then decided to get wet and dove into NodeRed. Late last week, went back and reread from the first post (again) and picked up heaps. I commend it. Lots of questions asked and answered about the same order you'll be asking them. Stop and import the flows when one is linked and learn from what they do.

4 Likes

How do I poll() a Hubitat device at the end of a sequence?

My Z-wave non-plus devices all have POLL as an option in the Command dropdown. Is that what you are asking? Or are you trying to use an evil Function Node?

1 Like