Pushover Notifications Driver [Slightly Enhanced]

Please describe in some more detail what you’ve done to implement this. What needs to be signed up for, how much (is the free version enough?), anything needed in the push messages to trigger the speech?

You can however set up notifications to homepod's/google/alexa speaker using the notifications command in your rules..

2 Likes

It's Free. You simply find the voice you'd like to use. Then type out the text you want to hear when you get notified for a certain rule. For example I use #heatresumed# as the sound tag, and then I generated the spoken text "basement heating schedule resumed". It can't do anything dynamic.

1 Like

There. I have learned something today!

Sorry if I’m being dense here, but can you provide an example of what this looks like? Did some testing and can’t figure out what you mean by “[OPEN]/[CLOSE]” Thanks!

Here is an example format that I am using... [HTML][OPEN]center[CLOSE]Your text here... [OPEN]BR[CLOSE][OPEN]A HREF="http://..."[CLOSE]Dismiss Alert[OPEN]/A[CLOSE][OPEN]/center[CLOSE]

2 Likes

@brad Yes that example from sblock23 is exactly how it's used. "[OPEN]" is used in place of “<“ and "[CLOSE]" is used in place of ">" when writing HTML within the notification.

I didn't even know you can center and make line breaks. Good to know it's usable options :ok_hand:

1 Like

Thanks! I’ll give it a try

Ah, got it. Thanks!

All,

I have incorporated @woodsby's enhancements to this driver, to allow embedding an image URL.

Update 07/29/2024 - User @woodsby added the ability to send an embedded URL to an image

Encase your URL in ¨¨, e.g. "¨http://example.com/example.jpeg¨"

Thank you very much, @woodsby!

6 Likes

For anyone who recently upgraded to v20240729, please be sure to upgrade to v 20240816 which I released today. This version fixes a bug that was recently introduced, which causes notifications to go to ALL devices, instead of just the one selected in the Pushover Device's user preferences section on your Hubitat hub.

3 Likes

Any chance we can get this driver added to HPM?

I personally have never used HPM. And I have no current plans to start using HPM. Thus, I am personally not motivated to add it to HPM - :wink:

I am a 'less is more' kind of person, and I really like knowing what is running on my hub. HPM makes it far too easy for third party code to end up on one's hub without really paying any attention to what it is, or what may have changed.

To update the Pushover driver, one needs to only open the Pushover Driver Source Code, Click IMPORT in the banner, and then click SAVE. It really is pretty easy without needing something in the background routinely reaching out to the cloud to check for updates.

YMMV, of course! It is good to have choices! :sunglasses:

6 Likes

I am sorry to confirm that I may have directed blame for my wife receiving unwanted notifications in your direction. If you hear repeated loud and somehow impertinent knocks on your front door, I suggest you hide quietly in your den until she leaves. :wink:

2 Likes

I went back to your driver today but I get this:

dev:20932024-08-16 11:32:26.456errorgroovy.lang.MissingMethodException: No signature of method: user_driver_ogiewon_Pushover_2188.speak() is applicable for argument types: (java.lang.String, java.math.BigDecimal, java.lang.String) values: [Pushover, 70, Nicole]
Possible solutions: speak(java.lang.Object), every(), inspect(), grep() (method speak)

Best to not use the “speak” command, as it appears you’re trying to send a volume level. The Pushover driver only implemented the “speak” command early on due to the fact that it was the only supported command at the time that supported sending an arbitrary text string. Hubitat later added the Notification capability, which is now how this driver should be used.

Please use the “deviceNotification” command instead of the “speak” command. If you really want to use the “speak” command, simply exclude the volume parameter.

Both calls result in the exact same Pushover notification being delivered to your phone or tablet. There is no Text to Speech with Pushover.

I’ll fix the driver to make sure the error you came across is properly handled. Thanks for the feedback.

2 Likes

Geesh. It’s hard to find good hired help these days …

Oh, that’s right. We didn’t pay anything …

:wink:

3 Likes

@dnickel - I have revised my custom Pushover driver (v20240817) to handle the cases where either one or two optional parameters are passed into the speak() command. The command still just ignores them, but it should no longer throw the error you reported.

4 Likes

Adding a note here that @ogiewon approved a pull request I submitted this morning that will allow carriage returns/new lines within messages. HE strips HTML and \n from inputs and this code change will turn the \n into a <br> before it is sent to the Pushover API to be delivered to your device.

A notification of 'Line 1\nLine2' will now be delivered like this:

9 Likes

@ogiewon @stephack Can you kindly provide me an example of how to utilize emergency notification with the delay/retry specifications.

For example. I'd like to acknowledge a notification and to repeat the alert every 30 minutes for 5 times.

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