Node-RED nodes for hubitat

I have finally gotten all of the useless logging turned off EXCEPT for the Konnected app. Part of it's logging shows up on the Location Node in Node Red toooo. I wish it had the option to turn off logging.

I generally don't use dashboards at all but added one in NR to chart battery life for all my buttons and battery sensors. Too bad my Aeotec recessed 5's don't seem to want to report but still a nice page to have.

I mostly use HE dashboards that are on my phone. My Node Red dashboards are like yours where I am monitoring batteries for one, monitoring wifi strength for my Sonoff devices, last motion detected on sensors, & temperature of all of my sensors that send that info.

1 Like

@Geoff_T

Sorry to drag this up again. I installed an MQTT broker for something else today. And I totally get @JasonJoel's perspective now. MQTT is perfect for your purpose - using a change in a variable to trigger a sequence.

Although I installed mosquitto outside of node-RED, I noticed there's a broker than can be installed inside of Node-RED as well. I strongly recommend you look into this - works really well.

2 Likes

Thanks Ash. I will take another look at MQTT. I did use it previously on Home Assistant in combination with the Hubitat MQTT beta and found it all a bit of a PITA to be honest, but will have another look at using it directly in NR, now that I have a bit more NR experience.

At the moment I've stuck with using a couple of virtual switches linked to Hubitat, mostly now because of remote access. I've looked at accessing my NR dashboard remotely but it looks like a whole new can of worms, so I'm sticking with HE cloud dash access displaying settings switches (Home/Away etc) linked to NR.

My node-red is (I presume) crashing and rebooting about 5 times a day. Ordinarily, it wouldnt be a problem, but it resets all my switches and gets stuff out of sync. How would I go about debugging? I'm pretty sure that it's not rebooting the entire device (an Odroid).

Every time it crashes and restarts, it sends a notification to my phone, about the garage door being shut (but it hasnt just shut, it's just that the NodeRed thinks it has, as it just registered so).

It's not running out of Ram. Not in picture, but 1109 MB of 3709 MB used.

It just did it again.

I forget are you running this on an oDroid? If so looks like you have the gui installed which adds a lot of overhead.

apologies see you mentioned odroid... mmmm I still don't like running with a gui but you should have enough resources.

depending upon how you installed your NR from the cli there is a command to monitor:

node-red-log

if not then:

journalctl -f -u nodered -o cat

you can also check:

journalctl -xe

I am not all that familiar with the systemd stuff so there are probably other things you can check as well. I'm running mine in a proxmox vm with debian have not noticed any restarts yet.

1 Like

I think I fixed it, but deleting my secret credentials file, and restarting node-red. Dunno what the secret does if I can delete it and nobody cares, not even Node red.

2 Likes

So I think I may have misunderstood your earlier post about training. You are interested in learning javascript. I sadly missed the fact that you are already using NR... even though we all have been posting at each other for a little while now.. yes I think a course could help especially if you want to write your own function nodes beyond simple assign statements. A really useful course would be Javascript + Node.js - as these are the underpinnings of NR and other things.

3 Likes

Huh. I didn't know that - guess it makes sense though, as there are js based MQTT brokers.

Sure enough:

I would still prefer mosquitto or hive, but if your only use of MQTT was node-red, that could potentially be a simple way to get it done! Although I guess you would have to test node startup order, etc, if using it for variable storage.

2 Likes

Just found this:

node-red-contrib-deduplicate-adv.

Very useful as I was getting bounce on a door contact sensor causing multiple messages. Adding this sorted the problem.

2 Likes

Is there a reason you used that instead of the built-in RBE node? Just curious as maybe there is a use case I don't understand/haven't thought of for this different node?

1 Like

Yes, total ignorance of it. :grinning:

In my defence I don't know how you are meant to guess what it does from it's name.

EDIT actually having had a quick read about RBE, I think de-duplicate might still be better for my needs. I get quick open/closed/open messages from the sensor in question (it's not in a great position but can't easily be improved) so I think RBE would pass the messages through as they have changed. De-duplicate ignores any but the first message for a certain period of time, so I just get the first "open".

1 Like

Agreed. But in Node-REDs defense, they do discuss RBEs use in the documentation and tutorials. :smile: In fact, if you go through the docs and tutorials, they cover pretty much every in-box node type.

That might be useful in some cases. Good point. I would have done a delay block w/intermediate message drop for a fixed time interval debounce. But whatever works!!! That is a handy looking node, so might install that to my palette, too. Thanks for sharing / pointing it out.

1 Like

What is this thing you speak of?

4 Likes

I've used "throttle" which lets the first message through and blocks others until you send a msg.reset. In my case I was getting messages from a bunch of devices potentially simultaneously and only cared about the first one that got through.

2 Likes

I've been trying something new. Graphing temperatures over time. I have a couple of flows operating, but the data does not persist restarts. I see that the output of a graph can be sent to a file, but there are file configuration. What is everyone using?

Also, how do you restore that saved information after a restart?
image

1 Like

I jut let mine reset on a reboot. It is a good question, though. I would also like my trends to not reset - if that is even possible (the dashboard nodes aren't exactly flexible).

That has been on my to-do list to look into, just hasn't made it to the top yet.

Don't know, I need to find the time to try one of the google results...

Maybe this? Looks promising.

Now I've really done it... :wink:

Removed HubConnect, SL/ML and most of the RM rules and other apps from ALL of my hubs. Running entirely in NR. :cold_sweat:

I am still using groups for collections of zigbee bulbs etc, motion zones for sensor aggregation and some virtual switches to record things like hub restarts, act as "storage variables" etc. Also am keeping lock manager for now.

I did make hub backups this morning before the great purge and just now in NR so hopefully there is a way back if needed.

We will see how this goes over the next few days.. am pretty optimistic based on my recent experiences.. :crossed_fingers:

3 Likes

WOW!! I am impressed!!! I would like to stop using HubConnect but I have some remotes that only work on ST thru HubConnect but they don't work using the SmartThings Nodes in NR. I also have Echo Speaks and Ecobee Thermostat on my ST hub but I could easily move those 2 to HE if I was going to shut down my ST hub.