Get push notifications for red bubble notifications

On the top right when there is an update, or an issue I get a visual notification on the top right. Today when I logged in after a few days I saw an error with my zwave. I'll reboot it like it recommends, but I would like a push notification to my phone that lets me know when this error comes up.

Is there a way to have the HE device and app to notify me of these kind of notifications?

3 Likes

You can check for messages with the http://ip/hub/messages endpoint.

I have 2.4.0.151 still pending, so that is what it is showing for me now.

{"messages":["<span id='platformUpdateMessage'>Platform update 2.4.0.151 <a href='/hub/platformUpdate'>available</a> (<a href='#' id='linkDismissFirmwareUpdate' data-version='2.4.0.151'>dismiss</a>)</span>"],"mode":{"locationId":1,"id":36,"icon":null,"name":"Home"},"hsm":null,"hsmAlert":null}

You would need to parse the response to see that there was an update or an error, and then send a notification.

1 Like

Ikes. yea, I see that, but how would I have the Hubitat parse that out and then send a push?

1 Like

That's a great idea

1 Like

You can do it in Webcore. Took me some time to figure out that you have to send a HEAD request before the GET, but this is working:

Note: You have to set your Notification Device in Webcore Settings to get notifications.

You really can only check for messages, not have them push as soon as they arrive, so I put in 15 minutes for checks. You will also need to add an IF statement to see if messages has a value, or whatever the value is when there is no message available, to not send a notification if there is nothing there.

Once I do the update I can see what I get when there are no messages, to NOT send the notification, but hopefully you can figure that out.

EDIT:

Ok, I realized it is simple to just save the last message, and make sure the new one is new by comparing it to the last one.

So this will notify once, but not again until the message status changes.

The notification, I realized, does not match what is shown as the value of the string variable. This is because it still contains the html, and the Webcore editor browser renders it. I'm working on the easiest way to strip that out, but it works.

This got me thinking about this, too. I used the fantastic app Hubitat Information Driver V3 [RELEASE] Hub Information Driver v3 by @thebearmay and use the Custom Attribute in Rule Machine.

And here is the rule.

Now I just have to wait for an event to see if it works!

I was just setting up a rule to do the same thing and am wondering two things:

Is it better to use "Any value" or "Changed"? Does it matter?

Should the notification send %value% or %text%? It seems like the latter will be more verbose and maybe more informative, but like you, I'll probably have to wait for an alert to find out.