MQTT Alarm Control Panel for Raspberry Pi and Android

Sorry, I had an old version installed via the play store. I updated and I will test a couple of days but until now I had no problems.

I use Automate from Llamalab and send a http POST to home assistant. I like to use MQTT but I can’t find a plugin that works with Android 4.4.

Erik

I have been using this library with the Control panel, but you’d have to build your own application. https://github.com/eclipse/paho.mqtt.android

Hey, is there any way to get the alarm to sound and bypass the countdown? What I’m trying to do is to activate the alarm sound if an ios action is triggered. For example, if I know nobody is home and the alarm is triggered, I want to be able to bypass the countdown and just have the alarm sound by pressing a button on my phone…any ideas?

The panel isn’t the alarm system. You should have a separately controlled siren and sensors attached to your home automation platform, like Home Assistant. If you are using Home Assistant then you would just trigger the alarm service with the “triggered” payload and your siren should activate as well as put the alarm control panel into alarm triggered mode. Home Assistant controls the alarm system, the alarm control panel is just the interface for the MQTT alarm control panel: https://home-assistant.io/components/alarm_control_panel.manual_mqtt/

1 Like

Thanks. I thought the tablet would make a sound after 60 seconds.

Thank you for this great solution. I am using the Android version and I couldn’t figure out how to use Instagram pictures as a screen saver. I wrote the name of the Instagram account that I want to get the pictures (public account but all I can get is a black screen when I clicked the “Zzz” button.

Unfortunately Instagram changed the way we access public images. I am adding Imgur as a new photo screen saver in an upcoming release. For now, just stick with the clock screensaver. Thanks!!

1 Like

I have your app installed on an S7 and a Fire tablet and working well, the one thing that I have noticed is the password for the HA screen is not “remembered” and must be entered each time. Is there any fix for this? I use a long complex password and it isn’t easy to enter on the touch screen each time. Other than that a great app and interface for the alarm aspects of HA… 5 Stars!!!

This is an issue that I am aware of but the application uses Chrome for Android and it doesn’t remember passwords. There is nothing I can do at this time to address it. I can’t capture your password and cookies don’t seem to get set in chrome for Android due to security reasons.

I have been using your app for android on a pad for a while in conjunction with HA. You have done a great job on the app. I am having a problem with the MQTT Notifications and TTS by Google combination. It works great except every time HA sends a notification; the pad speaks the text multiple times vs just the one time that it should. I was hoping you had run across this before and could give me some advise how to rectify the problem. Thanks.

@thanksmister I have created a custom alarm panel for use within HA YET another take on an alarm system. A lot of people wanted MQTT integration with some wanting to use your app to integrate directly with the panel.

I have added the necessary code and it all works, so people can actually use my panel instead of the manual mqtt one with your app.

I wanted to suggest an enhancement if possible, would you be able to add an option which allows your app to pass over the code in the payload (‘DISARM [CODE]’) to be verified by HA?

This would add an extra layer of security and also allow the code to be synced across multiple tablets. My panel also allows for a panic code which deactivates the alarm but triggers a silent alarm allow one to trigger automatons.

@gazoscalvertos I understand what you are asking but I have a question. What component in hass is going to be reading the (‘DISARM [CODE]’) to verify it? Is this the MQTT Manual Control Panel? Is this your custom alarm control panel?

@rebelnme I have tested the latest version with TTS, but I could seem to reproduce the issue. Could it be that you are sending multiple MQTT notifications? I tested by using a the MQTT service in HASS to broadcast a message. Go to http://hassio.local:8123/dev-service in HASS and select MQTT Publish from the dropdown and then send something like this {"topic":"home/notification", "payload":"Hello"}. I don’t hear any hiccup or double messages. Test it that way and let me know, also be sure you are running the latest version from Google Play or Github if side loaded.

It will be my custom alarm control panel specifically https://github.com/gazoscalvertos/Hass-Custom-Alarm/blob/master/custom_components/alarm_control_panel/bwalarm.py

The MQTT Manual Control Panel disarms the alarm without any code being passed over.

If this could be included as an option within your app that would be fantastic.

@gazoscalvertos I think that is a good idea. I like really like what you are doing with your custom component and would be glad to help. I didn’t investigate this yet, but does your custom component integrate with HA Dashboard?

1 Like

I haven’t yet looked at HADash to be honest, using the iFrame widget would allow the page to be displayed on HADash.

Was there any additional features you were looking to tie into it?

@gazoscalvertos The only thing I am looking into for my application is to know current sensor states so the alarm panel can alert the user if the door is open before setting the alarm. I have a quick follow up question for you about the alarm code being sent on the payload. Have you tested this already, have you published something like DISARM [1234] to HASS’s MQTT service and successfully picked it up in your component? The HASS MQTT control panel currently picks up the command I am publishing with the payload DISARM, are you capturing those as well from external MQTT calls and handling them in your component?

@gazoscalvertos I guess it would be nice if when I published ARM_HOME or ARM_AWAY, the component would return something different back if the user has indicated they can’t arm the alarm with a sensor open.

It shouldn’t arm the system but send back some type of notification instead or status other than armed_away, armed_home, pending, triggered that I could react to by giving notification. Perhaps the payload could be the reason why the alarm couldn’t be armed.

I was going to do this within the alarm panel, but it makes more sense if the alarm component would return the a different alarm state, like {“sensor_open”:“main door sensor”}. Maybe send back the friendly name of the sensor that is open, or an array of open sensors. I know your component does something like this, not sure if it prevents the arming of the system if a door is open.

@thanksmister

Have you tested this already, have you published something like DISARM [1234] to HASS’s MQTT service and successfully picked it up in your component

Not yet, I will add this feature over the next couple of days as I will make it an optional feature. I.e. if mqtt_override_code is set to false in alarm.yaml then the component will require the DISARM payload to include the code else it will simply disarm.

The HASS MQTT control panel currently picks up the command I am publishing with the payload DISARM, are you capturing those as well from external MQTT calls and handling them in your component?

Yes, currently capturing these and they do work, there is no need for the additional MQTT manual control panel

I know your component does something like this, not sure if it prevents the arming of the system if a door is open

The system gives a friendly message warning the user a device is open and they can then choose to override it and arm the alarm. I can certainly publish something along the lines of {“sensor_open”:“[hallway motion sensor], [main door sensor]”} i.e. the status and the array without the system being armed. I could also capture say ARM_HOME_OVERRIDE which would arm regardless of open sensors so that you could also present a friendly warning to the user with the option to override.

1 Like

I’ve built this panel and it works like a charm!

I’m wondering which speaker you’re using for the TTS functionality with it? Are you using those speakers that are powered via the USB port of a raspberry and plug into the 3,5mm jack for audio? Also, Is there a way to expose the Rpi camera feed to home assistant?