Node-RED nodes for hubitat

So here is a weird one, on some of my really old z-wave (not plus) GE dimmer and switches I get this randomly.

{"error":true,"type":"java.lang.Exception","message":"An unexpected error occurred."}

For Maker API, I see this, see highlighted section:

ideas?

In my effort to move processing off HE, I need to move my stinking locks! For any that don't know I'll sum it up with I have "the lock that shall not be named" and they are unreliable. To replace "Reliable Locks, and the rules I had to make things work (most of the time)

1st I need to have a flow that will retry the locks until they actually lock. I also need one to refresh them every 30 minutes (since they are Z-wave, not plus, and seem to like being "polled"). That one should be pretty strait forward.

The second is to create a place for any flows I make to have a place to "go" to become a persistent rule and continue trying.

This is the first time I have used such a rule or the "link-in" "link-out" nodes.

Lastly here is an example of where I would use the link-out nodes to get them "in to" the persistent flow.

Does this look correct, or am I using these nodes incorrectly? It seems to work (with fake injections), but I just wanted to be sure, this one is getting a bit complex for a rookie.

There's so many ways to do things with Node-Red, that's what makes it great.

Personally I'd have just dragged a line from your locked/unlocked switch back to the start. Nothing wrong with doing it with a link node either. It wouldn't be a bad idea to use a repeat node here either to limit how many times it retries so you don't end up in an infinite loop in case the lock fully drops off the network for whatever reason.

One thing that catches my eye, having 2x 5s delays in there might be a point of frustration if it doesn't respond on the first try. You'll end up standing at your door cursing at it for being so slow, or even worse... trying to find keys!!! I'd experiment on seeing how low you can get those delays while still serving their purpose.

1 Like

Didn't know about that one thanks! I foresee my node sections list growing rapidly.

I should throw up the repeat node I use lol

I have some loops setup to verify everything is closed, locked and armed as part of my away routine and after a few repeats I use the else output to notify me of what isn't in the right state.

1 Like

Thats the one I grabbed and I'll add it into the mix. I appreciate it!

using what node/resource? If you care to share.

I just do it the multi-node way. Once I do it 1x, it is too easy to copy/paste it a few more times.

The repeat node looks nice though, too. I think I'll play with that this weekend. @MRobi It would be nice to see a screenshot of how you use it, if you get the time.

I assume something kind of like this (this works, for the record, I just tested it):

3 Likes

Yep I updated mine as well. I like the repeat/notify if fail. Added refresh (seems to "wake up" my locks)

The 'light' version

1 Like

I use pushover for all of my notifications. I originally started doing it with the built-in HA integration and the HA call-service node, but I've since switched to the pushover node and add a function node in front (can also set it up with a change node). The reason I made the switch is the ability to add images to the pushover message with the pushover node. So instead of a "Garage doors closed, locks locked, alarm armed" message I get a picture of a house with a lock in the middle. Looks cleaner on a smartwatch and quicker to glance and recognize a picture than text.

2 Likes

You should share some of your masterful JSON with us padawan? :wink:

1 Like

.
I've been slowly honing this little group of nodes together and I'm just about done with it i think.. In fact it may be time to remove that 4th debug output because I haven't needed to use it in forever

Screenshot 2020-07-10 21.26.08

I can send out an MQTT from inside Home Assistant or elsewhere in NR in the format like

{
     "topic": "message/all/lametric/telegram/alexa", // pick the target(s)
     "payload": {
            "whisper" : true/false/null // will whisper in Alexa if true. If house is in night mode, set this anyways
           "text": "Message text", 
           "photo": "if set, will send a photo to Telegram and use 'text' as caption", 
           "devices": ["alexa device1", "alexa device 2"],  // If not set, will default to living room
           "icon": "if set, the icon to use for LaMeteric", 
          "sound": "if set, will be the sound LaMeteric plays"
     }
}

This has worked out great in past few months

LOL I definitely wouldn't say masterful. The pushover node is about as straightforward as it gets. I store images locally, but you can also use images hosted online as well. Just use the web address for the image. Simple and easy to use wherever needed.

[{"id":"89dd3439.69b178","type":"unsafe-function","z":"7cbae11a.719b1","name":"Format Pushover Message","func":"msg.topic = \"House\"\nmsg.image = \"/config/www/home_locked.png\"\nmsg.payload = \"Garage doors closed, doors are locked and alarm system is armed\"\nmsg.priority = 0\nmsg.device = \"MikePhone\"\nmsg.sound = \"pianobar\"\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":240,"wires":[["ffc1396.6563ac8"]]},{"id":"ffc1396.6563ac8","type":"pushover api","z":"7cbae11a.719b1","keys":"6701c359.a8a66c","title":"","name":"Notify","x":1010,"y":240,"wires":[]},{"id":"6701c359.a8a66c","type":"pushover-keys","z":"","name":""}]

2 Likes

Absolutely loving all the little things they've done in the new major Node-RED version.

The "Help" sidebar is 10000x improved with the ability to choose which node in a group to read documentation for without having to go to the left sidebar and choose it first.

I also like the new "Inject" node dialog UI among other things

2 Likes

Have y'all noticed that it's slower to open now? Mine is noticeably slower from time I open URL until my flows appear.

3 Likes

Ive noticed the same. Get to watch the flows loading bar!

2 Likes

Yup. It takes longer to load initially. But after that, I don't see any performance decrease.

2 Likes

Yes, longer initial loading was a side effect of it building the outliner/tree view.

2 Likes

Definitely worth it then.

2 Likes

I want to use a function to pass payload to pushover. I understand enough of this to be dangerous, but I want to say who unlocked the door. I'm accomplishing that, but I can't seem to get the syntax right were it's not preceding it with the non matching code. I'm missing something that keeps that from translating into pushover. So it pushes everything prior to and including the garage door message

image