MQTT Alarm Control Panel for Raspberry Pi and Android

Hello, I’m trying to send notification from HA but I miserabely fail to do it.

MQTT is working well I think, as I can see all the home/alarm messages in the app data logs.
However, I’m not able to send an alert to the tablet. I tried all the different syntaxes I found in this thread and the syntaxes provided as example in the android app but nothing works. I see the messages published in the mqtt server but I see nothing in the app log.

Could someone provide me the correct syntax to send a simple “hello” notification? Thank you.

It’s a known issue and was reported on the Github project page. Maybe a new release next week .

oh, so I’m not totally crazy :slight_smile: Thank you for the info.

I can’t say for sure, but this issue is real.

could you provide me a small example that should work?

Hey!

I like really clean layouts. I had a suggestion earlier to be able to hide the hom/settings/sleep-icons to make it even family-friendlier, but I realized that it may be a lot of work.

I therefore have a suggetion for a (really ugly but effective) tweak:
An option to change font & icon color. Then I could choose to have same color as the background. The stuff is still there, but not visible.

And another one:
Auto-start at boot (nice if if there is a power outage and the phone starts when the power comes back).
(Edit: Found an autostart app without root, so this one’s not really needed).

Thanks a lot for a great app!

Yeah that is not an ideal solution. I suggest we use a slide out menu to show the controls as an option. This might not work so good with the sliding platform screen but we could manage some tweaks to make it easier. I will add a slide out menu feature to the list if features in the projects GitHub page.

Yeah I have start on reboot added to WallPanel project and just need to port it over to the alarm panel. I will add this to the feature list as well.

Thanks!

Another suggestion: If sliding is no good, maybe a long press on the background to show/hide the extra info and icons?

I got the new version this morning and tested the mqtt notifications but still no luck. Whatever I try will do nothing.
App is working and getting the alarm messages. Can someone share with me the correct syntax to use? I followed the ones provided as example in the app but they do not work for me.

I have the tested the latest version and the notifications are working as expected. I tested with the following information using Home Assistant:

{"topic":"alarmpanel/command", "payload":"{'notification':'Hello!'}"}

The results are a notification visible in the pulldown menu of the application:

1 Like

Thank you. This one is working. However I’m trying to use the speak command to send vocal notifications.
Following the example in the application:

{“topic”:“alarmpanel/command”, “payload”:“{‘speak’:‘Hello!’}”}

does not output anything.

It works as well, if it’s not then either your device doesn’t support Google TTS or you need to restart the device or application. If you think you’ve discovered an issue then please use the project page to report it, However this is something I already tested this morning along with your first reported issue, so it’s working.

Should I see a record in the app log when trying the “speak” command?

Hum… this is strange: I just tested on an old tablet (android 5) and everything worked on the first try with the exact same app settings. I need to do more tests to understand why the android 7 tablet is doing funky stuff. I got a few app crash during my tests.

If not was received and properly formatted. I see them in my logs.

I was able to make it work on both tablets but just for a while.
If the table goes in standby/sleep mode then the app will stop accepting any mqtt command and will crash filling up the log with “disarmed” message


after a restart, app will work fine until next sleep/standby.
Tested on a cheap 7" android 5 tablet and a Samsung Galaxy Tab A, android 7.1.1.

If it’s not accepting MQTT messages then how are the logs filling up? You should be using shallow sleep with Android Daydream. I can’t figure out your current setup but it sounds as if your WiFi is being cutoff and the app going into deep sleep. I would also wonder why you MQTT broker is continually sending out the same message over and over. You should look at the traffic and see what’s causing it.

I tested again on my older Samsung and its working as designed. I receive just one MQTT message for “disarm” and one for “speak”, my system is not flooded with repeated messages. I didn’t build the system to handle being flooded by the MQTT broker. I think this is something to do with your setup. I am running the built-in Hass.io Mosquitto broker on the Home Assistant version 0.82.1. So I think you need to figure out why your broker is flooding the clients because this could be an issue with any clients connected to the broker.

The only thing I could do is to stop logging events or make some system to purge the logs, but I am reluctant to do so because when the system does work properly, this shouldn’t be an issue. Though long term, purging the local database may be an requirement as systems run for long intervals (weeks, months). Right now their is only a manual method for purging the local database.

There are tools you can install to watch your MQTT traffic from your HA server to see if its really flooding, or perhaps its something throwing the application into an infinite loop which I haven’t experienced.

I don’t know the issue. What I know for now:

  • my current setup is Python HA 0.82.1 with Mosquitto. My control tablet is running HA Dashboard with Lan Announcer (for TTS notification) is working well
  • I don’t see any flooding in home/alarm topic when monitoring with MQTT.fx
  • the flooding in app only happens when the app crashes.

I’m not at home right, I will try to reproduce the issue tonight.