[RELEASE] Device Status Announcer (TTS or notification if lock unlocked, door/window open, etc.)

I would like to use the app to trigger messages that need to be fixed, followed by the cause (open doors or windows). This would allow me to use a single child instance instead of creating one per situation.

Many thanks for sharing! I was looking to start writing a rule for a similar situation ( set house alarm but windows are open or doors are unlocked). I was trying to get my head around the best way of approaching it, when I found your app.

Brilliant, Really appreciate it as this is making the move from Vera Plus to Hubitat that bit less hassle.
Mike

One thing that would be useful is to only send messages to devices that are 'present'. For example if I am away on business and my wife is going out and sets the alarm, it is better that she receives the notification rather than me. If both of us are home and going out together then if both of us get the message that would be ok.

Just released an update, version 3.2, with this feature. :slight_smile: It should work in any of the four text inputs, including these two. I've tested it and tried to be a good "hub variable citizen," including registering the variables as in use and even changing the variable name in the app if you change it in Hub Variables Settings, so hopefully it works without problem. Format is just %hubVariableName% like in many other string inputs in other app UIs.

Let me know if anyone sees any problems!

I'll think about this. As usual, no guarantees.

Thanks!

1 Like

Awesome!!! Thanks! Will let you know if I run into any issues.

Thinking about this more, presence and notifications are two separate device capabilities. There is not necessarily a way to know if a notification device is "home" or not because these two capabilities do not need to be used together, even though some devices do implement both (like the Hubitat mobile app device — perhaps the most popular choice for both?). In this particular case, a notification device could be checked if it also has the presence attribute and, if so, whether it is present (or not not present ... or would anyone want the option to do the opposite?). If the device doesn't have the attribute at all, it could continue to work as-is, as it also could if this hypothetical option were not enabled.

Alternatively, for users who use these functions via separate devices, some option could be provided, either per app or per notification device (might get messy...), to send or not send notifications, either at all or to specific (possibly other) devices, based on that state.


As yet another alternative, I'm thinking it may be good to keep this out of the app and rely on another solution, like a "notification proxy" device, which could be configured at that level to do or not do something based on presence. This would also be more usable across a variety of apps without the app needing any specific functionality.

I'd have to "beef up" my app/driver combo that right now just groups devices (or allows you to create one virtual device that could stand in for even just one real device if that's all you want, say, because you don't want to have to swap them in apps all the time if you change devices), but that seems like a good candidate. I talked about that a bit here, though I've never made a thread just for it (and again, as-is, it probably can't quite do this):

1 Like

Adding presence would be of value to me in the following use case:

I have some of my window sensors that occasionally drop off the mesh. I have an alarm notification that tells me that the alarm was armed with the following windows open… the status of those windows that have dropped off the mesh is not known, so I would prefer to ignore them in the notification. I could also have a separate notification that notifies me that some windows may be open, but this is unknown since the device is off the mesh…

Do you mean excluding devices from notifications if they "fell off" your network? This is a non-standard use of the presence attribute that I'd be unlikely to consider (and I don't think many drivers are using it anymore); my assumption above was that this was for the notifications themselves, e.g., do or don't send the whole thing based on your literal presence.

In my usecase, yes, excluding devices from notifications if they fell off my network.

I would likely also use it for notifications - that could always be a follow-up message regardless of the implementation of the first. :blush:

The biggest problem I see is that there is no standard way to determine that. I could ignore disabled devices, or least provide an option to (Device Activity Check does), though that won't really address the specific issue. :thinking:

1 Like

For my use case, adding an option to ignore “Not Present” when available would work, but even better would be something that can ignore devices that haven’t reported in 24 hours, as in the information found in the Zigbee Details screen…

Thanks for taking the time to think about this and come back with a suggestion. I’ll take a look at this more in the morning. Thx.

Wouldn't device activity check work for this?

Yes, but not for an announcement of this… unless I missed that functionality?

I use device activity check separate from announce. I mean usually if a device drops off it shouldn't set off the announce rule.

Same. Just thinking I could have it announce certain off-line sensors if they are key to having a “secure” home. For now, I do all this with Rule Machine. (Though haven’t done the off-line bit yet…)

1 Like

@bertabcd1234

Any way you could add the ability for a custom message? So I could add something like, "It's raining, whateverdevicename is open. Close it please" instead of just "whateverdevicename open" ?

Wouldn't the existing "text to prepend/append" options do what you want? You can also use hub variables in them now if needed to customize more.

2 Likes

I would think so! Something very similar is working great for me!

One thing to remember @rlithgow1 - Add a space at the end of the first variable, and a “. “ at the beginning of the second.

Another addition that would be good if it is even possible… Most of my devices are connected via hub mesh and therefore have “on C-7” or “on Hub” or “on Radios”, etc. appended to their name. It would be nice if there was a way to remove those from the device names before the notification occurs? Ideally, several options could be identified for removal… Possible?