Node-RED nodes for hubitat

How would I make the word Move bold in the change node below, with Jsonata expression?

image

I'm sending it to a dashboard, and I've just added in the battery percentage, but the non-bold is affecting my OCD. This is part of a flow that auto joins my Sonos speakers to be based on motion sensor movements in their respective rooms.

image

Hey guys, I've been playing around with this palette in node-red and it's really great. I'm converting some of my rule machine rules and came across one issue that hopefully someone can help me with:

I'm trying to send a notification to the hubitat app on my phone when my doors are unlocked (with the lock name and the name of the person who unlocked it), but the "Arguments" field in the command node for deviceNotification doesn't seem to parse variables. I tried using msg.payload.descriptionText, msg.payload and a global variable. What am I doing wrong?

I am not 100% sure I understand what you're trying to do but have you looked at the Template Node? It allows you to take a bunch of different payload items and combine them into one and then output as msg.arguments for example.

2 Likes

Correct, it does not (at least not as far as I remember, I would never do it that way so haven't ever tried). Expand the variables to strings in a change node before the command node. Stick them in msg.arguments.

2 Likes

Thanks @stephen_nutt and @JasonJoel - setting msg.arguments in a change node right before the command node worked!

1 Like

Welcome to the HE NR rabbit hole! :rabbit: :hole:

Also check out this thread for ideas... lots of cool stuff.

and this too...

3 Likes

@erktrek Thanks for those links. I had spent some time searching for a passthrough type of node to reduce the number of connecting lines...couldn't find one and wound up using a switch node with a single 'otherwise' case. On that second link you sent there's a node listed under must haves that does exactly what I was looking for :smiley:

3 Likes

Yeah, no-op is handy - especially when I'm spit-balling something and making a lot of changes adding/deleting nodes.

Sometimes I also use a lot of link-in/out to "pretty up" a flow if there are a ton of connections.

5 Likes

Anyone updated to Node Red 2.0.1 yet ?

I've been running node-red 2.0 since beta 1 on my dev .instance. will probably wait a few weeks to upgrade my production one.

3 Likes

rain is expected in the next week and it's on my todo list to test all the functionality of the hubitat nodes on the new version :crossed_fingers:

4 Likes

I only recently found out that I could get the labels to show for the link nodes! Makes it easier to follow the links now.

5 Likes

Nice. I didn't know that until you posted it!

1 Like

Just upgraded my main pi to NR 2.01 - so far so good but we will see how it goes..

:crossed_fingers:

4 Likes

Has anyone here used the node-red-contrib-apcaccess pallet with with UPS's in their setups.

I am playing with it using UPS virtual driver and this seems to work ok..

It is a bit chatty though. My virtual driver creates a command for each attribute so it can be updated. Is there an easy way with Node-Red to Consolidate a set of messages and make one long comma delimited string. I know it is probably a simple answer, but i can't seem to figure it out.

I bit the bullet and updated to NR 2.0.1 yesterday, and it created an issue with my http request/web scraping (keeping an eye on certain prices/variables on the web, and even internally in my home network - solar etc). Anyway, I posted over at the Node Red forums and they fixed it within about 4 hours. There's a fix coming in 2.0.2, but the workaround was to delete an offending node built old dependancies.

2 Likes

Thanks for the heads up! What node were you using?

SpeedTest Node. node-red-contrib-speedtest-updated

But it's not limited to that Node, there's a number who use the underlying dependancies. There's a fix in 2.0.2.

1 Like

I tinkered with node red, but I didn’t see any benefit of using that vs other things in hubitat.

Are you all seeing a benefit?

yes! :grinning_face_with_smiling_eyes:

2 Likes