Node-RED nodes for hubitat

@rakeshg @erktrek thank you so much for your quick replies. I had thought of using the device nodes like @rakeshg stated earlier but my automation was failing i think that might have been due to another factor. As I type this my light keeps turning on and off too lol. Likely due to the slowness of ecobee updates.. stupid ecobee

2 Likes

Just be careful - you can get yourself into some weird looping or strange sequence misfires if you have "send events" checked on the wrong device node..

Generally I like to keep my triggered event nodes at the start of my sequences and usually not in the middle.

4 Likes

Hi can you upload your thermostat flow Jason?

cheers

Don't have it any more / I don't do it that way any more. Since I went back to Ecobee (after I figured out I could get local control via Homekit) I just use its scheduling now.

All the details you need to recreate it are in the post you replied to, though.

I just can't get the payload from a sensor to upload to my hubitat virtual thermostat. Any thought on how I should be doing that? if you could, an example flow would be really helpful. cheers Jason

Can't tell based on your description. There is no magic to it, though. You make a command node set to the virtual thermostat and send it a message with msg.command and msg.arguments set to what you want. msg.payload isn't used for anything on command nodes other than triggering a pre-configured command node (that already has command and arguments pre-sepcified).

Put a debug node (showing FULL msg, not just payload) before the command node and post the output when you run your flow. My guess is you didn't set msg.command and/or msg.arguments right.

Example - just testing, this works:

1 Like

Send the output from the sensor to a change node that does two things.

  1. set msg.command to setTemperature
  2. set msg.arguments to msg.payload.value

The output from the change node should go to a command node for the virtual thermostat.

1 Like

still can't get it. any thoughts?

The output from the change node should go to a command node, not a device node.

Also, I don't recognize your sensor node - what is that? I ask because I don't know what it's payload will be, so setting msg.arguments to msg.payload.value may not be the right thing. But this is secondary to the device/command node issue noted above.

is this the correct change node?

[{"id":"8ae8f03a.a39ae","type":"tab","label":"Flow 10","disabled":false,"info":""},{"id":"cbe14965.e0dff8","type":"change","z":"8ae8f03a.a39ae","name":"","rules":[{"t":"set","p":"command","pt":"msg","to":"setTemperature","tot":"msg"},{"t":"set","p":"arguments","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":120,"wires":[[]]}]

Two things:

  1. Attach a debug node DIRECTLY to the temperature sensor node - so we can see its output.
  2. Replace the Hubitat device node with a Hubitat command node.

I see...

it's a fibaro hc device btw

That's fine, but we need to know how it's payload is structured to create a proper change node for a Hubitat command node.

snip

1 Like

Perfect!

Then your change node will have the following content:

Screen Shot 2021-03-14 at 9.32.47 AM

Now - the only remaining issue is to send the output from the change node to a command node, not a device node.

2 Likes

I'm not trying to be rude by making this suggestion, but I would HIGHLY recommend you go read through the node-red documentation. It is very good, and explains the basics of message handling and the built-in nodes better than any of us could.

I see so many people just trying to jump into Node-RED without an understanding of how the flows, messages, and built-in nodes work. And it is probably the HARDEST way to learn node-red.

Specifically:
https://nodered.org/docs/user-guide/messages

Also make sure you ALWAYS read the online help for a node. It almost always explains what the expected inputs are. In the case of a hubitat command node it says:

3 Likes

thanks sooooooo much. Worked!!!

1 Like

thanks for this also.
I am new to node red and am still learning everyday. appreciate this community help. great work guys!!

2 Likes

Also, many nodes come with working examples that can be very helpful to learn new nodes (which is also discussed in the node-red documentation :slight_smile: ).

There is only 1 example for the hubitat flows ("switch-light"), but you may find it useful:

Menu --> Import --> Examples --> node-red-contrib-hubtiat:

4 Likes

Cheers Jason

2 Likes