Actionable Notifications

I think both iOS and Android have support for actionable notifications. Would be nice to have.

What Bruce describes above is definitely a good workaround, but I believe the poster above is correct in stating that both iOS (which I know is true) and Android support "actionable" notifications, which provide a number of buttons in the notification itself you can press to perform (or not) certain actions, thus saving you the step of having to launch an app or webpage to do it yourself. For those who don't understand what this looks like or why you'd want it, Home Assistant supports it and has both a description and a screenshot here: Actionable notifications - Home Assistant

However, the Hubitat platform obviously implements these concepts in a different way from Home Assistant. The existing syntax for notifications would have to be modified or at least extended (any way this can be done with optional arguments or something new to not break existing code?), which may not be desirable, plus there's the challenge of finding a way to make this work given the capabilities in Hubitat. One way I see is that each actionable button in the notification could specify a (virtual) button in Hubitat that would be "pressed" when the actionable notification button is pressed on the mobile device. A Hubitat automation of the user's choice could then subscribe to that virtual button and perform the appropriate actions (the same as with any device).

In any case, I could definitely see myself using this feature if it were available (e.g., "Hey, it looks like you're away from home. Did you want to turn the thermostat down?"). Again, this is nothing we can't already do manually (turning on/off a switch or using a virtual button in a dashboard, for example), but that takes more time and effort from the user. The "compromise" suggested above of being able to open a dashboard from a notification would ease some of this--but just being able to do it from the notification would be better. :slight_smile:

Definitely not a must-have, but something that for sure would be nice down the road!

2 Likes

I believe the join api can support this. @stephack kindly provided a driver for it awhile back. Join can also be used for unlimited SMS with small modification to the driver.

I "kinda" created this a while back by using the Cloud Endpoint feature of RM and Pushover.
I created a trigger that used a CloudEndpoint as the Trigger Event and set up my actions accordingly.
I then entered the endpoint url into the "Supplementary URL" field in my Pushover notification.

Whenever I got that specific alert, I had a link right in the notification shade that would execute whatever actions I needed.
I since removed it because I didn't like the fact that I could accidentally hit the link and trigger those actions but it worked perfectly.

Now I have a link to my Hubitat dahboard instead that brings me to my most needed button/switches instead.

I actually created something similar back in the SmartThings days using Tasker and WebCore. It used text messages with a special format that Tasker could convert to an actionable notification. The links hooked into WebCore URLs.

1 Like

@stephack any chance of showing code or doing a quick write up on how to accomplish this?

I think it’s quite easy to see how useful this would be.

I don't have the time for a full write up tonight but I think you can figure it out with a few pictures. See below.

Copy this url

In the pushover driver page, paste the copied url in the Supplementary URL field and give it a name. This will appear as a link at the bottom left of each notification.

I think this would be a great feature to add. There are lots of use cases where a flow could have an interrupt. I noticed recently that Apilio has introduced 3 levels of notification along similar lines, using IFTTT rich notifications (Execution Modes | Apilio Help Center ). It's kinda similar to your idea I think. Something like this but built into the new HE app would be excellent!

This is something I miss from Homey. I made Flows (Rules) that e.g. send me a push "asking me if I wanted to arm the alarm when I left my house and nobody else where home" or "asking me if I wanted to open/close my garagedoor when I approched or left my house".
Very convinent just hit "yes" or "no" on my Apple Watch or iPhone.

Also, when clicking the push sent by Homey opened the Homey app and showed me the push nicly presented in the app. With HE the app opens but nothing shows about the push. If I dont really read the push before clicking on it, I have no idea what the message was. I’m using the native HE iOS app..

1 Like

Any chance to implement that feature natively in Hubitat app?
It would be very useful.

2 Likes

Absolutely agree!

1 Like

I know this is a very old post but I havent found any information about this in much detail elsewhere....

Am I right in saying there is still no way of sending a notification to a device with any kind of callback/action? E.g. You can send a push notification to a device using RM, but the notification is just a message and you cannot include a link (to a dashboard that loads when the notification is clicked) or a couple of links (which could be to actions through a device API)?

This doesnt seem super complex from a tech POV as the notification goes from being text to being some simple JSON, but would be great to hear if there are any thoughts to implement this?

It looks like some Tasker alternative is available, but whilst that would work for me it would leave me with a different notification process for me v.s. everybody else....

Thanks

There is a post above which shows a method using the Pushover driver, which allows a supplemental url to be defined which can be used to trigger an RM rule using an endpoint. You can create as many driver instances as you need for messages that need a unique url/link.

It can also be done quite easily using Node-RED and Pushover. If that's of interest to you I can post more about how to do it.

Neither of these solutions are a perfect solution in that clicking on the link in the notification activates an endpoint trigger for an RM rule but then leave you at a blank browser window which you then have to close. But it does work. Node-RED can also be used to style your message (eg. use colours for parts of the text etc).

You could also open up a specific dashboard using the url. That would be a nice tidy way to present buttons/options for the user.

Cool, yes that is a decent solution and I have heard about pushover before (though never used it). I guess also means that we need to have Pushover installed on everybodies phone, in addition to Hubitat app?

It seems a bit of a shame not to allow some very basic options in the RM implementation of 'notify'. Is this on a development plan of anybody in @Hubitat_Staff @bobbyD ? Or is this too niche?

Yeah, you'd need Pushover installed. The good news is it's a cheap one-off cost and works really well. I hesitated to get it at first, but it really is worth it. And also you can move it from one device to another if you switch phones in the future so it really is a one time purchase per user.

Maybe as you say they can implement it in the HE notifications functionality in the future as per your request but for now I'm very happy with Pushover.

Got it, and I guess I also need to set up a Raspi to run NodeRED in order to send the right URLs and include pictures and that sort of thing?

Yeah, you have to have NR running on a device somewhere (could be an always-on PC, rPi etc). I'm running it on a Pi and it seems bulletproof. It is a rabbit hole for sure but one that I've enjoyed. It's really powerful and has stacks of integrations to all sorts of things but for sure it does have a bit of a learning curve :smile:

So it seems everything does! Haha

I did think that having some slightly more intelligent push messages would be standard feature though, since sending an image would be super easy (but perhaps have a cost due to the data), and sending some text options with links would be super simple and involve minimal extra coding from what I have seen of building notification messages (its just simple JSON)

Their is also a driver for the join api it can send text messages as well. So no need to have an app on all devices.