Does anyone have any experience with using MQTT for push notifications? I know this isn’t strictly an OH question, but it’s tied into the ecosystem. Specifically, I’d like to know if the experience has caused any battery drain or reliability issues.
We’ve been using pushover with OH for years now, and the overall experience has been great. However, I’d like to move into more sophisticated integrations, so I’m evaluating other options for improvement. MQTT is everywhere now, so it seems like a good alternative to consider.
Some quick ideas off the top of my head for things I’d like to accomplish:
Show persistent status of an item on an android widget or android wear complication (via tasker). i.e. how much power is being generated/consumed, network bandwidth, server metrics, localized climate conditions, etc
Context-aware android interface triggered by OH items. For instance, if I’m home, display a fixed notification with buttons
If you know of some sort of app that can receive MQTT messages and generate a push notification from it I’m sure many users would like to hear your experience. MQTT by itself can’t do push notifications, you need some sort of app that uses MQTT as the transport. All MQTT is is a way for software to pass messages to each other. Everything else is outside the scope of MQTT.
Of course you also will have to problem of how you can get the push notifications when not connected to your LAN which means you will either need to securely expose your MQTT Broker to the Internet or use a cloud based MQTT Broker.
Really, comparing Pushover to MQTT is an apples to oranges comparison.
Here’s an app that enables Tasker to react to MQTT. I’ve never used it, and as Rich points out it will only work when you’re able to connect to your broker.
I use the OH app to push notifications to my phone, and then the “Notification Listener” plug-in to have Tasker react to those OH notifications (and delete them). You could have Tasker do this (with any notification, including Pushover) and then start a permanent Tasker notification based on context. However, I don’t know if Tasker-generated notifications can have custom toggles.
Also, any Tasker toggles won’t reflect actual item states, because Tasker can’t poll openHAB. So they’d just be blind switches that trigger other Tasker tasks (which can send commands to openHAB).
FYI, you can now use the openHAB app to add custom tiles to the Quick Settings in Android. Not quite what you’re asking, but how much do you really need to do? Personally, my goal with home automation is to not have to think about it or monitor it more than I have to.
Yes, I’m already using MQTT client with tasker on my wallmount tablets showcased here (works great!), but I’ve never tried over WAN.
This is the path i’m getting ready to try out (with either constant ovpn or wireguard), but I’m expecting it will probably fail spectacularly, haha. Just wanted to check in to see if any better options have become available lately.
@rpwong 100% agree the custom tiles in android are amazing. We use them actively in our household. However, they do lack status as you’ve pointed out, so I’m just looking for that last 20% of polish at this point.
I’ll test out this method and post back if I find any interesting results.
great suggestion. telegram wasn’t around back when I started using pushover, but it would be a great option nowadays. others in my family don’t have it, but that may have to change.