MQTT Alarm Control Panel for Raspberry Pi and Android

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?

@warbringer The TTS uses the 3.5mm jack for audio. I have USB powered speakers that hook to the jack. I am not sure there is a simple way to get the Rpi camera feed back to Home Assistant without some major work. The camera isn’t continuously running for one thing, it’s just capturing a photo.

@gazoscalvertos My only suggestion at this point would be to update the HASS MQTT component with some of these custom changes we are discussing. This way you have more eyes and input for the changes. Having the HASS alarm control panel accept a code through MQTT as well as notify users if the sensor they wanted closed is open when they want to arm the system are nice features to have.

1 Like

Do you have a link for the speakers you bought? I’m currently looking at something like this. Would that work?

I was hoping that there would be an “easy” integration with the android IP webcam given that this platform runs on Android Things but I know far to little about it to say anything meaningful here. Thanks for your work so far and is there anywhere I can donate?

Any speaker that has a 3.5mm audio cable would work. I use this one from Amazon, https://www.amazon.com/AYL-Guarantee-Rechargeable-Expandable-Smartphones/dp/B007OYAVLI/ref=lp_8188092011_1_2?srs=8188092011&ie=UTF8&qid=1515938918&sr=8-2. As for streaming video you have to build a streaming video Android application. I am only capturing images, it would be a totally different type of application.

If you only wanted to stream video from the Pi camera, you could just use python and the default Raspberry Pi OS instead of Android Things. There is already free software to do what you want for RPi. Search Google for RPi streaming video. I have used this one to successfully stream video to Home Assistant from a RPi3 http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome.

1 Like

After I updated the Android application, I found that my screen turns off automatically when it is inactive. It used to prevent that with its screen saver. But now it seems it does not work. How can I solve this issue?