Pushover Notifications Driver [Slightly Enhanced]

Thanks Stephan -- I was trying to make the 2 parms fully dynamic, but I guess not. Thanks just the same.

Would you mind explaining the use case? Just curious as to how you would use this functionality if it existed.

Yeah sure, NP. Since most of my ~75 rules do notification of one sort or another to various people in my house, I decided to build a single Notifier rule that all other rules use to send notifications. So any rule calls the "Notifier" rule and passes a handful of GV's such as:

  • channel (SMS, pushover, app, email)
  • recipients (admin, Mom & Dad, kids, etc.)
  • voice? (Y/N) and if so, voice-channel (sonos, echo-TTS) and volume
  • priority

I am still in the design stage for the above, and candidly I'm not 100% sure it'll all work. I'm motivated by a desire to have a single place to manage all my notification logic rather than making a change in 75 different apps that takes all day.

Back to your question, I was thinking..... gosh, pushover already takes priority as a parameter (E/H/N/L). And E takes repeat-freq and expire-time. It would make the Notifier even more robust if I could dynamically assign those two parameters. For example, when the sump pump is in trouble, I want constant repeating and no expiry. When the side door is open, I might want hourly reminders, and expiry in 8 hours. All driven by relative urgency.

TMI perhaps, but hope this helps. The reality is, this whole thing isn't really a NEED so much as a fun project.....

Sounds like a fun project...thanks for taking the time to explain.

If you are willing to use the custom driver I linked above (as I mentioned, the official driver was built off of this one and is nearly identical) and you don't mind waiting a bit, I could make a few edits that should make this possible. I think it should be fairly simple, I just don't have a lot of time to sit at my desk and pump out the code at the moment. Let me know.

Edit: you know I only just realized that these posts are in the same thread as the driver I keep linking to....ROFL. I need to take a break. :crazy_face:

1 Like

I’m enjoying using Pushover since HE (wisely) chose to get out of the native SMS support biz. Do keep the Community posted with any updates you make.

This community is amazing. I have to admit, whenever someone like you offers to take their precious time to help lil ol' me with something, I have this instinct to look over my shoulder to check if I'm on candid camera or something. Yknow, the episode where they test how gullible people react when some other selfless person makes an unusually gracious offer. Lol.

I guess that's a long way of saying -- thank you in advance. Even if you don't get to it, I genuinely appreciate the offer. Peace bro.

3 Likes

MANY others (including the Bruce Almighty) have done the same for me so it's the least I can do to pay it forward.

3 Likes

Good Morning
I'm setting up a hub for a friend and wanted to set up Notification for leak detection though Pushover.

When i go into notifications - there isn't a push over option
I have the Pushover account set up but for th life of me i can't recall where to input the token in Hubitat to link the Push over account.

Appreciate any thoughts or direction. I set mine up ver a year ago so id be hard pressed to remember how i did it!

Go into Devices, Add Virtual Device, then select the Pushover Driver. That should get you to where you can input the Pushover Key.

1 Like

That was the ticket.....
THanks
Its already working. And - for interest...im setting up the hub in Texas...then sending to my friend in Canada who is even less computer savvy than me....he already received a " the boat is sinking" notification in Pushover when i tested the water sensor!

Appreciate the help
Mac

2 Likes

That's super nice of you! Just make sure you include enough line-powered zigbee/z-wave devices for their system to have strong mesh networks.

1 Like

Should be decent enough start.

  • 3 zigbee contact sensors
  • 2 zigbee motion sensors
  • 1 zigbee Water Sensor
  • 1 zigbee 4 button key fob

And the stuff i set up for him 4 years ago from Iris

  • Schlag Z wave Lock
  • 2 Jasco Z Wave switches
  • 2 JAsco Z wave Dimmers
  • 2 Smart plugs.......The Iris V1 so guessing Zigbee

I used to know this - but i can't recall if battery powered zigbee devices strengthen the mesh...or if its communications directly from the hub to the device - vs through other devices...like zwave does.

This is the 2nd set up ive helped friends in Canada with.
I just sent a care package to Calgary with about twice this amount.
Cheers
Mac

Had to go look after i noted that on battery. Battery powered zigbee devices do not strengthen the mesh

https://docs.hubitat.com/index.php?title=How_to_Build_a_Solid_Zigbee_Mesh

" Battery powered Zigbee devices do not repeat signals. End devices only communicate with a parent device, which could be the hub or it could be a repeater. Zigbee repeating devices ( Routers ) communicate with both the hub and End devices"

Is it possible to get the code updated to handle Critical Alerts that bypass Do Not Disturb since Pushover supports that option? Second question, is it possible to have separate status alerts for different notifications or is it all or nothing?

I believe what you’re requesting may already be included. See the end of the first post where you can specify a prefix to your notification text to include the priority.

Prefixes
[L] - Low
[N] -
[H] - High

E.g.. Message "[H]This is a test" will send "This is a test" with High Priority to your mobile app.

[E] prefix is now used for emergency notifications and requires the following parameters
retry - how often to resend notification until it is acknowledged (in seconds with a minimum of 30 seconds)
expire - timeout for resending notifications if they are never achknowledged (in seconds with a maximum of 10800)

I am no longer updating/maintaining this driver as Hubitat now includes built-in support for Pushover. I would recommend you make a Feature Request via support@hubitat.com to make sure the Hubitat team understands exactly what you’re requesting.

Of course, you can take my custom Pushover driver and enhance it as you see fit for your use. If you do so, and the changes are backwards compatible, and will happily merge those changes into my GitHub repository.

3 Likes

Do you mean different audio notifications? If so, one simple way is to add multiple Pushover devices, each with the same API key. Then, tweak the audio notification to be unique. This allows you to pick the device in each app as you see fit based on the notification sound you want.

1 Like

Are Emergency Alerts you are referring to the same as what pushover/iOS calls Critical Alerts? I’m just trying to figure out how to set up a Critical Alert which will allow it to bypass Do Not Disturb on iOS since Pushover added that capability.

The different alerts I was referring to was not audio, just different levels of alerts, but I think you answered that by exclaiming to but an L or H in front of it. I just wanted different alert tones for specific alerts like Pushover allows you to change within its app.

I think we're probably talking about the same thing... However, within the official Pushover API documentation, there is no mention of a special "Critical Alert" that I could find...

From Pushover: API

Message Priority
By default, messages have normal priority (a priority of 0). Messages may be sent with a different priority that affects how the message is presented to the user. Please use your best judgement when sending messages to other users and specifying a message priority. Specifying a message priority does not affect queueing or routing priority and only affects how device clients display them.

Lowest Priority (-2)
When the priority parameter is specified with a value of -2, messages will be considered lowest priority and will not generate any notification. On iOS, the application badge number will be increased.

Low Priority (-1)
Messages with a priority parameter of -1 will be considered low priority and will not generate any sound or vibration, but will still generate a popup/scrolling notification depending on the client operating system. Messages delivered during a user's quiet hours are sent as though they had a priority of (-1).

Normal Priority (0)
Messages sent without a priority parameter, or sent with the parameter set to 0, will have the default priority. These messages trigger sound, vibration, and display an alert according to the user's device settings. On iOS, the message will display at the top of the screen or as a modal dialog, as well as in the notification center. On Android, the message will scroll at the top of the screen and appear in the notification center.

If a user has quiet hours set and your message is received during those times, your message will be delivered as though it had a priority of -1.

High Priority (1)
Messages sent with a priority of 1 are high priority messages that bypass a user's quiet hours. These messages will always play a sound and vibrate (if the user's device is configured to) regardless of the delivery time. High-priority should only be used when necessary and appropriate.

High-priority messages are highlighted in red in the device clients.

Api message priority
Emergency Priority (2)
Emergency-priority notifications are similar to high-priority notifications, but they are repeated until the notification is acknowledged by the user. These are designed for dispatching and on-call situations where it is critical that a notification be repeatedly shown to the user (or all users of the group that the message was sent to) until it is acknowledged. The first user in a group to acknowledge a message will cancel retries for all other users in the group.

Applications sending emergency notifications are issued a receipt that can be used to get the status of a notification and find out whether it was acknowledged, or automatically receive a callback when the user has acknowledged the notification.

To send an emergency-priority notification, the priority parameter must be set to 2 and the retry and expire parameters must be supplied.

The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. In a situation where your user might be in a noisy environment or sleeping, retrying the notification (with sound and vibration) will help get his or her attention. This parameter must have a value of at least 30 seconds between retries.

The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). If the notification has not been acknowledged in expire seconds, it will be marked as expired and will stop being sent to the user. Note that the notification is still shown to the user after it is expired, but it will not prompt the user for acknowledgement. This parameter must have a maximum value of at most 10800 seconds (3 hours).

For example, sending a retry parameter of 60 and an expire parameter of 3600 will cause your notification to be retried every 60 seconds for 1 hour.

The optional callback parameter may be supplied with a publicly-accessible URL that our servers will send a request to when the user has acknowledged your notification.

When your application sends an emergency-priority notification, our API will respond with a receipt value that can be used to get information about whether the notification has been acknowledged. See our receipts and callbacks section for more information.

If your application is not capable of storing receipt identifiers, you can send a tags parameter of comma-separated, arbitrary tags which will be stored with the receipt on our servers. You can then use the cancel_by_tag API call to cancel all receipts with a specific tag.

2 Likes

I just found the new iOS feature within the Pushover mobile app to enable iOS Critical Notifications. I was able to test it using a [H] priority message and it broke through my iPhone's silent mode successfully and played an audio notification.

So, the driver as-is does support the iOS Critical Notifiaction using High [H] and Emergency [E] prefixes.

Thank you for bringing this new iOS feature to my attention. I plan on using this for Water Leak notifications immediately.

1 Like

Awesome, that’s what I was wondering. I really wish more things would implement this like security cameras and whatnot.

2 Likes