Node-RED nodes for hubitat

if anyone needs a macOS app to do said scan:
https://debookee.com/

1 Like

I'm just now getting around to setting this up and having the same thing happen to me.

You guys are awesome. I guess we really do need a Node Red section in here @bravenel so we can keep these out of this thread.

Here is what I came up with. Also, very glad I have a spare device to test this on as I'd get lots of looks if I did this in production.

Top(ish) flow is the "not present" flow. If everyone is "not present" then it flows on through and notifies the person who just left that the alarm is on (with a timestamp).

Bottom(ish) flow is "present" flow. If one person is present, then it flows through and notifies the person who just arrived that the alarm is off (with a timestamp). Of course you can add in other things here like unlocking of doors, etc.

The selective notification is what makes this messy - so the more folks you have to selectively notify, the messier. If you are OK with everyone getting Arm/Disarm, then easy enough to strip out.

3 Likes

This also looks promising; presence via ARP (which I was doing on my router using Maker API, but not anymore!). Won’t work for you if folks turn off WiFi, but if you use Combined Presence app, it could be a one-of-many inputs to presence.

https://flows.nodered.org/flow/280e9b116d7fea84ade5

3 Likes

I have a question I'm hoping some folks will have some input on.
I have most of my automations built into custom groovy code in Hubitat but am looking at moving some things to node-red. One thing I've realized is that when you have a dimmable light, if you want to be able to react to the light being switched on and also to a change in that lights brightness, you will always get 2 messages generated from the Hubitat device node. If you just issue the switch on, you get one and if the light is on and you change levels you only get one. But if the light is off and you issue a setLevel to the device, you get 2, one for the switch and one for the level.

How are folks dealing with this? I'm looking at syncing a Hubitat virtual device with a device that I have connected to Node-Red through another system. There are other ways I might be able to integrate with Hubitat but I wanted to explore this one a little deeper before giving up. Thanks!

Well you can now pass "setColor" to HE via the Maker API using a map so that's handy..

On the receiving side you can set the device node to grab all attributes and parse them in a function node as needed.

I started down that path but got distracted by other stuff..

1 Like

Anyone have a better way of handling a switch using the Node Red UI?

Something like this which is similar but combines things into change nodes..

Note: I added the jsonata into the node names so you could see what I am doing. you can also convert directly to msg.command in the dashboard node...

edit: I don't think you need check for the light being on/off before sending the command. Not sure it really helps anything.

I probably don't need to check, but I figured not sending extraneous commands was a good thing. Glad I don't seem to be missing something obvious.

1 Like

@fblackburn

Newbie to Node-Red, seasoned on Hubitat. Trying to tie them together. I went through the tutorial and built the 2 new floods and reviewed the User Guide, but I can't seem how to launch the Hubitat config node.

Your help is invaluable.
Alan

The hubitat config node is abstract, you cannot add it to your flow like other nodes. It's only a configuration shared between nodes. When you add a node (ex: device node) then you have a server field and this server is the config node. It is automatically deployed when it exists
Peek 2020-07-14 06-40

You can view all configuration nodes with the following menu:
Screenshot from 2020-07-14 06-36-50

Did you look this tutorial too?

4 Likes

I can reiterate that. OwnTracks has worked perfectly for me for the last 3-4 months. Still haven't removed Life360, but am no longer using it.

1 Like

look into "node-red-contrib-arp".

.
:: sigh of relief ::

I am now completely off the alexa2 palette (in fact it's uninstalled). Used the Alexa Media Player integration in Home Assistant (HACS) instead and reworked my flows.

Of course this method says it uses the "experimental and unofficial Alexa API" so at some point this will break too lol

It breaks regularly, and requires regular updates which is why I Was just starting to look at the alexa2 palette when I saw your post. I have a flow that makes a random announcement based on who gets home. I'll get home, sit on the couch and start watching tv then it clues in that I didn't hear Alexa greet me. Hop on to HA and there's an update for the integration. Update it and all works again, it's just a little annoying. I'd say it's about 95% reliable which is around 4% too low for my likings.

Does anyone know of a method to backup the Hubitat nightly backup to a network share. I can backup to a directory on the Node Red device (pi/Odriod), but seem unable to backup to my NAS/network share.

1 Like

While I'm not a fan of his actual javascript coding style, you could definitely apply what he talks about in his post using the flow you got off me

Lots of factors though, first and foremost: "what OS is the target for saving?". Obviously if it's Windows or Mac you'll need to set up the permissions differently. And secondly, what/where NR is running (inside Docker? out?) is a factor as well to set up the mount

This sounds like somebody should make an app to automatically send these backups to google drive. If the files are accessible on the hub then it shouldn't be too dificult.

A couple of months ago, I found someone that posted a flow that will backup files to a Dropbox folder. I don't know how it works in the Function Node. I can share the flow if anyone is interested. I would assume that someone smarter than me could figure out how to tweak it to upload to a Google Drive instead.

5 Likes

Nope, missed that one, but it's a great video and has gotten over that hurdle! Now on to my first real flow!

Alan

1 Like