MQTT Alarm Control Panel for Raspberry Pi and Android

I setup Camera and Motion, and on the Fire 7 under display I set it to sleep after 2 minutes. After 2 minutes, screen goes off, and when I do motion in front of camera, it does not come back on. I have to hit the button on the Fire 7, slide up to unlock and then it’s back.

So that seems like a problem. I did find a way, if powered, to make it stay awake.

https://vidabox.com/blog/2017/02/11/hidden-always-on-setting-for-amazon-fire-tablets/

Then you can turn on the screensaver in this app and that works.

It runs fast and for $50, it’s a great option.

If we could get a way to change the default alarm sound from the app that would be great. If you set an alarm you can choose a sound, but you can’t change the default, so it would have to be added to the app somehow.

Also, the Fire has no click sounds. So a way to enable click sounds on the button clicks in the app would be good.

Also to be able to see the squares change color as you click them, to know you clicked them, would be helpful.

And last not sure if possible to auto unlock on the Fire with the motion code. This works on my Nexus 5x, just not the Fire. If always plugged in and the Stay Awake option works, not as big a deal.

It connects with MQTT, runs fast, works, and looks good though! Can’t beat the price

I will look for built in sounds option tonight

I think your keyboard sounds are turned off. Here are instructions for the keyboard (haptic feedback) settings on the Fire tablet: https://www.amazon.com/gp/help/customer/display.html?nodeId=201556190. Look under “Keyboard Sound” section. It would be very strange indeed for a device not to provide some sound or vibrate feedback for the keyboard.

There is already a prevent sleep option within the application to prevent sleep. However, your tablet should have a “Daydream” feature. This prevents sleep, or provides low sleep, power savings, but can be awaken with the motion detection feature of the application. I use this feature instead of the built-in screen saver to save the tablet screen. My screensaver feature will still burn your screen if left on for long periods, Daydream is dynamic and can be on all the time. Here is more information: Daydream screensaver | XDA Forums

I tried that and it makes sounds on keyboard in web browser, just not your keys in your app

Uncheck the “System Sounds” under Notifications in the application settings, this will use a built-in sound for the entry alert (when the dialog to disarm is shown). That should help.

Looks like to get daydream to work I’ll need to root the device, so I will look into that. What if one screensaver option was to set brightness to 0, if you did that, screen is off, no burn in, when you sense motion, put brightness back to what it was, might solve burn in issue and make it easier to use app on Fire tablets without having to root

That requires a lot more work and special permissions to access the system. Look for other apps that have Daydream features, but seriously Amazon, you disabled the built-in screensaver? If I made my own dynamic screensaver, that would be better, but again, dimming the screen makes for extra “dangerous” permissions that I don’t want to add.

Yeah, they did lots of control on screensaver, they sell a version for $30 that uses it to send ads.

I can’t seem to find a good screensaver. So I’m thinking about installing the play store on the Fire tablet, that opens options up about downloading Tasker and other things that can do screensavers or dimming. I did test with Fully Kiosk browser, it can do all the things on this tablet, so if you want to use it for HADashboard, just use Fully Kiosk and turn on “Stay Awake” in developer tools. It can do a screensaver, dim or turn off the screen, etc…

I’m considering installing Android Studio and doing a fork of this project to add turn off screen options, found code here.

Rather than just fork it, do a pull-request and I will merge the changes. I actually have another application that does this already, called WallPanel. The code is already there to dim the screen and ask for the additional permissions. Here is the GitHub project page: https://github.com/thanksmister/wallpanel-android. This is similar to fully kiosk browser, but has the same code and features as alarm panel, but only shows a dashboard (webpage). If I wasn’t up to my neck in other projects, I would add this feature.

I’ll try this weekend… I was a developer for years and now stuck in management, sounds fun, half the reason I switched to home assistant to get into more stuff

Many thanks @thanksmister for this. Really excellent work done, working flawlessly on my old Android tablet. A couple of minor issues that I am not sure if they are possible to fix already:

  1. Can we remove the “armed home” mode? I don’t use it and current Hass UI has an option to disable it and only show “arm away”.

  2. Can I select 24h clock mode? The clock on the top right shows as am/pm. Actually, IMHO it would be much better to be able to select language/region in the app itself.

Again, thanks for all the work put into it!

No, there is no way to remove an alarm mode. The application will follow whatever date/time format you have set for your Android device. It may require a restart of the application to take effect if you change it while open.

1 Like

Thanks for the quick answer!
I just checked and it seems the app does change language with the default one however the 24h clock format is not? No matter how I set it up in Android settings the app always shows am/pm.

About disabling the alarm_home mode, I might try to include it myself in the code if I can overcome my rust ycoding skills… :slight_smile:

There is no setting to change 24 hour clock within the application. Please check your device settings under date/time and make sure you have 24 hour clock active. My device is in 24 hour clock and the application reflects this as well.

Yes, that is what I do. I have 24h in general settings. The Android clock is 24h. However the app is am/pm :thinking:

Here are three screenshots showing the general setting in 24h, the general android clock also in 24h, but the app in 12h mode.

I am thinking now that it might be a problem with my tablet? It is a Samsung Galaxy tab A. Maybe the Samsung TouchWiz is messing up the general config?

I am not sure, I have a Samsung S5 and it works. Maybe try restarting the device?

Restarting did not help. It indeed works on my Nexus 6p phone so I am out of ideas. I might try to recompile the app myself to see if it helps??

In any case thanks for your help!!!

You could try resetting the application storage in your device settings. But besides that, I am also out of ideas. Compiling the application won’t make any difference. I am using a standard way to format time based on the device Locale and 24 hour clock settings. The only thing you could do is force a 24 hour format in the code.