Pushover Notifications Driver [Slightly Enhanced]

Sure, I'll give it a go... You'll need to try this yourself to make sure it works as expected.

The first thing to do is configure the default behavior for Emergency notifications. To do so, open up the Pushover device on your HE hub, and configure the following two settings as you see fit.

For Retry Interval, try using 1800 seconds. For Auto Expire After, try using 9000 seconds. This should translate into every 30 minutes for 5 times.

Then, when sending the push notification, simply include the "[E]" prefix to your text message. Some like "[E]Please check the sump pump! It is overflowing!".

Hope that helps!

Also, on your phone, inside the Pushover application, please make sure you configure the settings to allow Emergency pushover messages to audibly alert you, even if you have your phone on silent (if desired.)

1 Like

Ahh, I see.

I was under the impression this can be done on a per-notification basis instead of it being on the device level.

1 Like

Is there a way I can set it temporarily in my RM rule and then clear it out after the notification is sent? Customer Action doesn't have the field available to set it. I'm trying to figure out a way avoid creating seperate devices for specific rules.

Are you a Hubitat Developer? If so, you could further extend the syntax of the embedded text in a message, have the Pushover Driver parse it out, and set the two parameters as desired on a per message basis. Once you get it working, I'd be happy to add the additional functionality to my custom driver so everyone could use it.

3 Likes

I personally am not a developer, but thanks to AI. This worked for me. :nerd_face:

I added the following code to your driver:

    // New Retry and Expire Code
    if((matcher = message =~ /\&(.*?)\&/)){
        message = message.minus("&${matcher[0][1]}&")
        message = message.trim()
        customRetry = matcher[0][1]
    }
    if(customRetry){ retry = customRetry}

    if((matcher = message =~ /\%(.*?)\%/)){
        message = message.minus("%${matcher[0][1]}%")
        message = message.trim()
        customExpire = matcher[0][1]
    }
    if(customExpire){ expire = customExpire}
    // End new code

Encasing the retry interval in &...& and %...% interval for expiry.

[E]&300& %3600% this is a test
300-second (5 minute) retry interval with expire time of 3600 seconds (1 hour).

1 Like

Hi, thanks again for the work on this. It’s my go-to for Hubitat notifications. Is there a prefix to make individual messages low priority? I use [H] and [E] a bunch for HSM and water notifications and the like, but I would like to designate low priority for something like error monitor, because it’s a bit noisy and doesn’t seem to respect its own filters that I have set.

1 Like

Yes

1 Like

Thanks for the quick response. Soooo sorry to bug you. I thought I searched for priority on this page and totally missed it. I’m re-reading the OP twice right now :roll_eyes:

1 Like

No worries. I am working on adding in @garz's enhancement, so the timing was actually perfect.

4 Likes

@garz - Thank you for your additional functionality to the Pushover Driver. I have updated the first post with details of your change. I have also updated my GitHub repository with these changes. I did add some additional logic to make sure the values entered are within Pushover's limits for RETRY interval and EXPIRE timeout for the EMERGENCY priority messages.

Please update to the latest version and let me know if everything is still working as you expect.

Again - Thank You very much for your contribution!

2 Likes

Updated to the latest driver. Confirmed working as expected. :+1:

Thanks for including the addition. To this day this is one of my favorite integrations in hubitat. Especially now that I found out there's also the inclusion of images.

2 Likes

Do you need to revisit this post now that you’re making updates? :wink: I just realized I wasn’t on the most recent version when trying to figure out why the images feature wasn’t working!

1 Like

Do I plan of adding my various Hubitat drivers to the Hubitat Package Manager? Probably not. I have never used HPM and have no plans to start any time soon. I prefer to manually install and manage all third party code on my Hubitat hub. There have been times when I have had to implement 'breaking changes' in my shared community code that really require the user to properly plan and execute a series of steps to minimize the impact to their systems. HPM would allow those changes to get deployed and mess up their hub without them ever reading the detailed release notes.

At this point, most of my contributions are in the mature stage of their lives, with minimal changes occurring.

7 Likes

I totally understand this. While I support HPM install of my drivers and apps, and run HPM on my dev hub, I also manage my 3 production hubs manually.

2 Likes

Thanks for this driver, I was previously using the system driver.

Unfortunately, it seems that the Emergency prefix notifications are not working for me on my Samsung Galaxy S23 ultra using the driver.

I have tested the Emergency priority on the pushover website, and it works fine.

I created a rule to test, and can confirm that the [H] priority message is received, but [E] priority message is not received?

Any advice on why I am not able to receive [E] notifications and if there is a way to receive notifications with sound in silent/vibrate mode will be appreciated.

in the notification put [E] before any text

1 Like

I hope the edit of the rule below shows clearly that all the E prefix is correct, I have copied the E example from the 1st post.

As you can see from the Pushover app, all the different priority messages are received except the two E messages ?


This may be a total red herring, but I'm not familiar with "&xxx&" value format -- is it possible that nomenclature combined with the ] bracket is mucking something up?

Does the test still fail if you just put something plain like this example in the "Message to send" text box?

[E]Simple E test 1

2 Likes

Yes, something is definitely broken as I am not receiving even plain messages for [E] as per your example and my example "this is a E test 2" above.

To explore this further, I have explored some revised codes with chatGPT this morning and managed to get the [E] priority to work.

Please share your findings. If there is an issue with the new code that supports "&...&" and "%...%", it would be good to figure it out sooner, rather than later.

Which Hubitat App are you using to send Notifications? I wonder if either the '&' or '%' symbol are being treated in some special way within that app? If so, we can figure out a different set of characters to use.

I appreciate the help in debugging this issue. Thanks!

1 Like