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

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?

Create a "group" but only with that one device. You can call it whatever you want, including a similar name without the "on X" part (though if you change the names, you'll have to manually keep them in sync).

My original intent here was so you could have something like a door lock and a contact sensor and get a notification like "front door is open and unlocked" instead of "front door lock is unlocked and front door contact sensor is open" (by creating a group with both devices and calling it "front door"), but it seems like it would work for your use case, too.

2 Likes

Ah nice! I’ll give that a try. Thanks!

I just realized that I was using the 2.x version, and decided to look again at this app and redo my rule to the new version. I see it now has the option for setting the volume. Is there any way to make this be a Hub Variable? I am trying to have one place to change the volume on my announcements and this is one of the apps I use.

Seems simple enough. I've released v3.2.1 with this change. Let me know if there are any problems!

3 Likes

@bertabcd1234 That was quick! Thanks!