Show recent notifications sent in the web UI logs area?

It would be nice if the web UI reported recent notifications sent to any/all devices, perhaps in the Logs area. The Android app will show me the last 20 notifications that phone received, but I'd like to see all of them (sent to any device) in the web interface.

I looked for this feature and didn't find it. I see it's been asked about before:

I use pushover myself which has every push notification ever done since it’s install. It’s much more robust than the built in push notification

3 Likes

Not exactly what you asked for, but push notifications create device events--like regular device events in Hubitat (e.g., for motion, switches, dimmers, etc.). This is for the deviceNotify attribute. Therefore, you can find these in the same way that you can find any attribute's history: go to the device page, the "Events" page from there, and filter on "deviceNotify" (or just look through it yourself).

Because of the above, I also don't see any way that push notifications might be considered "special" to the platform and able to be displayed in the way suggested (but, of course, I don't know implementation details--except for community drivers, where they are indeed not, just regular device commands and resulting events).

If none of the above works for you, perhaps you could create a "dummy" notification device (not sure if one exists, but a virtual driver would be pretty easy to write) and select both it and your "real" device in any app that sends notifications. Then, you'd only have one place to check--and it would give you a way to do what you want.

This is the workaround I was considering doing. But the platform already knows when it needs to send a notification to the app, so it already is considered special. So I figured I'd add for it as a feature.

I'm not convinced. :slight_smile: The driver knows, but I don't see how that's different from other commands and events/attributes on the platform: it's a standard capability command, deviceNotification(), and then the driver does whatever it wants with that. In most cases, this would be sending a notification to a device and generating an event, but you could really do whatever you want. Keep in mind that not everything necessarily goes to the Hubitat mobile app, for example, and that this capability has been around longer than the mobile app itself. This is not too different from asking if there could be a special place to see every time you've issued an on() or off() command to any switch: not impossible (the platform obviously knows at some level), but I wouldn't hold my breath on it being implemented.

I'd personally use the "dummy" device workaround--something you can already do with the platform features available today (probably one more reason we're not likely to see it). But I do understand that this is a feature request. and that certainly still stands. If you're interested in the workaround and don't already have a driver, something like this (totally untested but seems simple enough...) should work:

metadata {
	definition (name: "Notification Storage Device", namespace: "RMoRobert", author: "Robert Morirs") {
		capability "Notification"
	}
	
	preferences() {
        input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: true
	}   
}

void installed(){
    log.debug "installed()"
    initialize()
}

void updated(){
    if (logEnable) log.debug "updated()"
    initialize()
}

void initialize() {
    if (logEnable) log.debug "initialize()"
    if (logEnable) {
        log.debug "Debug logging enabled; disabling in 30 minutes"
        runIn(1800, "logsOff")
    }
}

void logsOff(){
    device.updateSetting("logEnable", [value:"false", type:"bool"])
    log.warn "Debug logging disabled..."
}

void deviceNotification(text) {
    if (logEnable) log.debug "deviceNotification(text = $text)"
    sendEvent(name: "deviceNotification", value: text, isStateChange: true)	
}
1 Like

Been using the email app developed by @erktrek for email-to-sms notifications until recently.

It wasn't until getting a new phone and starting to use the built-in HE notifications that "I GET" what you and @rlithgow1 are saying in this thread. Hence, searching the forums for "last 20 notifications aren't enough".

I now find myself wishing I had that stack of SMS txts to scroll back through, because sometimes it is helpful to be able to quickly look at:

  1. when something happened a day or two ago
  2. if something happened a day or two ago but I missed it
  3. if something happened but it got shuffled off the "last 20 stack" by some series of notifications that I do want to see but are sometimes "noise" (like multiple on/offs when I'm irrigating).

Notifications serve multiple purposes for folks, some of that is more akin to "process monitoring" than "the sky is falling, do something" alerts.

One step forward, one step back. Grrrr.

1 Like