Node-RED nodes for hubitat

I will say that I have seen more unspecified errors on command nodes than I ever have in the past. As there is a corresponding error in my hubitat log when it happens, I'm pretty sure that is on the hubitat side though.

1 Like

EDIT: As pointed out below, maybe that is just the /devices call generating all those log entries, not an entire cache rebuild. Probably my mistake.

@fblackburn Found what I consider a serious bug.

With Maker API debug logging turned on, I found that any time you double click on a command or device node in node-red, whether you change anything or not, the complete hubitat global cache gets rebuilt. It happens the second you double click on a command or device node.

This creates tremendous load on the hub as I've seen that when editing a few nodes, it may re-initialize the entire cache a dozen or more times...

Issue submitted on github, too.

2 Likes

Do you mean this showing up in the logs?
image

The GETs?? 161 and 124 are 2 of my Hubitat hubs.

1 Like

Yes, that's it.

Maybe that is by design, actually. I guess the Maker API debug logs freaked me out a little, though.

How are you getting motion from your amcrest?

Explanation is here:

It's mostly about Eufy Doorbell but I mention Amcrest also. It requires an Android device and Tasker app (~$4.00). It's fast with Amcrest cameras; not so much with Wyze cams.

1 Like

Thank you for reporting, I replied on github issue :slight_smile:
But yeah I think too it's only because command/device node fetch all devices which add a lot of log on Maker API side

1 Like

Hi guys, in relation to my issue with Node red talking to hubitat.
Installed NR on a new Pi and after realising I had a typo it worked perfectly.
Thanks for your help.

Simon

1 Like

is the "groups" thing in Node-RED anything new? I started grouping a few nodes together so it is easier to manage and am running into constant browser lockups (Chrome on Mac) trying to move things around inside them.

FYI, other people are having problems.

1 Like

Yup. Me too.

Im setting up more notifications, but stuck on a change node to send correct message
This is the flow, and change node.
Without the mode node & switch, i get correct message i want, but as it is, i get the mode and value as my message..
How can i delete the mode message and keep the v/contact message??


Thanks

The Mode node overwrites the topic and payload, so what you'd want to do is capture those values before the Mode node, so you can use them later in the Change node. You could use flow variables, or (I think) you could just write them to a different part of the msg object.

eg. After the Vcontact Device node, a Change node that sets msg.contactState from msg.payload.value

1 Like

Alternatively, since it looks like your notification is always going to be the same in this case, you could just hard-code "Vcontact is currently open"

But if you're looking for some sort of flexibility or re-usability, then you need to do something like what I said above.

Thanks @jason-lane makes sense now

Going to rethink my notifications, as some will always be the same message, and others change.

Gives me somthing to work on
Cheers

1 Like

Oh, and if you want yet another way to do things :wink: ...

Instead of putting the Mode node in-line in the sequence, you can have a separate sequence where you set a flow/global variable with the current Mode, and then check that variable in your Switch node. Taking the Mode node out of the sequence avoids the over-writing of the msg parts. This might also provide a small performance benefit if you're checking the current mode in lots of places in your flows, but I doubt the performance difference is important on its own.

(@JasonJoel outlined this here: Node-RED nodes for hubitat)

2 Likes

Funny you mention another way, I was just trying that!!!!


Works as i like!!

Also, for those that use HSM, whats the benefit in using, say "ARM-Away" in HSM and acting on that mode as opposed to using an "away" mode??
Just curious as to how others use HSM??

Yup, I do that too. Also dump it to MQTT for other uses.

1 Like

Maybe I am missing something but I stopped using HSM and instead am using a combination of MQTT and Global (file context) variables in NR.

1 Like

I don't use HSM any more either - I do that functionality in Node-RED.

I do still set the mode on the Hubitat hub, though. Why? Not sure really as I don't use the mode in Hubitat at all, just use it in node-red. So there is really no reason for me to use the Hubitat mode, versus a node-red/mqtt variable.

Old habits die hard I guess.

3 Likes