Pushover Notifications Driver [Slightly Enhanced]

Does it override do-not-disturb? That would be a welcome change from prior functionality for me.

Yes, it does override both Do Not Disturb as well as the physical silent mode switch on an iPhone. Both [H] and [E] will cause an audible notification no matter what...if you enable the Critical Notification feature within the iOS Pushover mobile app. You have to click on the top right three dots to get to the app's detailed settings. It's kind of hidden. You can also force the notification sound to be unique within the mobile app's settings which is very nice, IMHO.

3 Likes

Its a shame there doesn't seem a way of changing the sound from the message , I like to use different sounds for everything as then I know what type of message it is without looking
could we not assign all the different sounds a number so [4] could be added to the message for example?
Maybe change the title with "{Title Here} Message Here"

You could take my old Pushover Driver from my GitHub (link still in the first post) and give your changes a try. I don't believe there are many differences between my old Pushover driver and Hubitat's current version (they actually used mine as a starting point a long time ago :wink: )

1 Like

Was already on the case have done the title

    def title = "Hubitat"
    if((matcher = message =~ /\{(.*?)\}/)){                  
    message = message.minus("{${matcher[0][1]}}")
    title = matcher[0][1]
    }

Can you think of a better/nicer way?

Edit: Done Sound too gone with #Name of Sound# example #bike#

if((matcher = message =~ /\#(.*?)\#/)){                  
    message = message.minus("#${matcher[0][1]}#")
    customSound = matcher[0][1]
    customSound = customSound.toLowerCase()
}
if(customSound){ sound = customSound}

Edit changed the title encasing to ^^ as {} cant be used in webcore expression

Added custom title in message by encasing it in ^^ example ^This is my title^
Added choose sound from message by encasing it in ## example #bike#
Added Default title in preferences

An example message

"[H] ^My Title^ My Message #bike#"

The title & sound can go any where and in any order in the message except before priority if it used

Code is available here Hubitat/pushover-notifications.groovy at master · tmleafs/Hubitat · GitHub

5 Likes

Ok that’s cool. Thanks for making the driver available.

So for the sound, you can specify any of the sounds from the pushover app list?

I’m kinda new to pushover. I just installed it about a month ago.

see this page
https://pushover.net/api#sounds

So Space Alarm would be #spacealarm#

1 Like

Nice. Thanks for the link.

My Hubitat is refusing to set my phone up as a connected device. Would I still be able to use Pushover, or does that depend on Hubitat "knowing" your phone? Can you specify your phone manually under the Pushover configuration?

Do you mean you’re trying to get the hub to see your phone on which you have the hubitat mobile app?

The pushover integration is independent of the hubitat mobile app. When both are setup, the hub creates separate virtual devices even though both of them represent one physical phone. So if you're having trouble with one of them for some reason, that shouldn't affect your ability to use the other.

1 Like

I actually meant had I not been able to set up my phone as a device on the hub at all. As I've not used pushover, and it looks like a cloud dependent service, I wondered if it was on the cloud account that you set up your phone details rather than on the reluctant hub. Though now I have finally got my phone onto the hub, the question is not so pressing.

I think I understand what you mean, but I may not have explained what I was trying to clearly enough.

The way to "setup your phone" so that the hub knows you have the mobile app downloaded onto it (and could use it for presence sensing and notifications if you choose), and the way to "setup your phone" so that that pushover messages from the hub, are completely unrelated. You could use one, the other, or both depending on your needs.

Not sure if this helps, and perhaps it's moot at this point, but here's a screenshot from my hub's device list. I have one iPhone XS but it's two different virtual devices on the hub. One was created by the hub for the mobile app, the other was created by the hub for the pushover notification. Ignore that sleep sensor in between the two :slight_smile:.

Ok I see what you mean... but... if the hub didn't want to set up my phone for presence sensing, would it also have the same disinterest in setting up my phone for a Pushover device? Or is there some stage in setting up Pushover that I can force the phone onto it? :slight_smile:

1 Like

Yeah I think I see what you’re asking, although the short answer is probably “I’m not sure,” or “it depends.”

My guess is if the hub has never been registered with portal.hubitat.com (as I believe you said yours was not initially?), then neither the mobile app nor pushover will work as intended?

Yes I realised that once I was knowingly adding cloud-based features I'd obviously have to register the hub for the cloud. Just wanted to make sure things were not unexpectedly using the cloud when they had no need
to, like some systems :wink:

1 Like

Makes sense!

It’s been a while since I’ve looked at some of these topics, but people have noticed in the past the hub appears to be hard-coded to check an NTP server in the cloud. There’s a couple ways to work around that though.

1 Like

Interesting! Thank you!

1 Like

@TMLeafs: Steven, am I missing something obvious. I switched my Pushover device from the Hubitat standard version to yours above in the hope of using parameterized sounds. When I go into the device details page of my TMLeafs-modified pushover device, and type the above into "Device Notification", I receive the title, the message and the prioritization, per usual, but still no sound. I've been sitting here playing with options on the pushover app, but no joy. My volume is up on my iOS device, and volume works on other apps.

I'm stumped--any suggestions?

What priority are you using?