Actionable Notifications

I’m looking forward to the Hubitat mobile app and would like to request the ability for customizable, actionable notifications. I’d love for this to also be part of the web dashboard as well if possible.

Example Scenario:
It’s raining outside, or the Hubitat (or 3rd party) weather app is stating as so. Hubitat weather triggers condition that it’s raining, also realizing that the sprinkler is scheduled to run a few hours later, Hubitat mobile app notifies me that “it may be raining and sprinklers are scheduled to run, shall I snooze for 24 hours?” Since it could be raining on one block and not another, it might be great if you could “verify” and immediately take “appropriate” action.

I understand taking concrete actions when certain triggers happen, but something as subjective as “is it raining at my house” may or may not be true. I also understand smart sprinkler systems could have wireless rain sensors (or weather data itself) and adjust themselves also based in weather. The ability to give you that extra step to “snooze” the sprinkler and save you gallons of water is beyond useful. This is just a very minor example, I see the ability to be notified when certain conditions exist and take immediate actions as incredibly powerful.

Thanks again for all your hard work! I’m loving Hubitat and think this is something that could take it to next level.

1 Like

You do this with just a button or switch, the activation of which does the "appropriate" action. You get a notification, you push the button in the Dashboard, or not, depending on your judgement. Presumably this is only needed for actions where your judgement in the circumstance is needed, otherwise an automation would just do it for you.

I have something like this: I get a notification if both my wife and I leave home and there is a garage door open. I have a dashboard from which I can close my garage doors. I don't automate this because it could be that we intended to leave the door open for some reason. This actually happened yesterday when some workmen were doing a job at the house, and I got the notification. I knew they were there, applied my judgement, and did nothing. I did it this way because the frequency of leaving a door open on purpose exceeds the frequency of leaving one open by mistake. Either way, I'm covered.

1 Like

How about a compromise and pull up the appropriate dashboard and/or control to take action on?

I get that you get notified and can pull up appropriate dashboard or separate application and take action, but why not add as a feature a shortcut to said dashboard or control? I see this as a unique feature that would be wildly helpful.

Thanks for considering.

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: