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.
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.
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.
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):
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.
.
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
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"
}
}
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.
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
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