MQTT Alarm Control Panel for Raspberry Pi and Android

It could be that you don’t have the correct username or password set. If you used those in your MQTT setup, the need to be the same in the application. Otherwise, they should be blank. I am running on a Nexus 5x without any issue with the latest release from Google Play. If all else fails, uninstall and reinstall the application, maybe some setting is stuck with your current setting.

Nope, you don’t have to have the same code as HA. Can you provide your configuration for the MQTT Manual Alarm Panel in the yaml file? That might give me some clues as too what is happening with your setup. It doesn’t really make sense that you can set the alarm to home or away but not disarm it. The dialog should always appear, are you getting the dialog when you try to go to the settings screen? Also check that you have v1.3.6 installed, this should be on the About screen in the settings. If you don’t have an About screen, then you are not running the latest version.

Not familiar with the 1+3T, but there should be no other requirements other than being on the same network and having network access for using the application. I don’t have the same hardware, so I can’t reproduce the issue. Does your Nexus 6P have the lastest update as well?

No, the 6P has the apk I downloaded from your github. I’m going to load the one from the play store onto that device and see if I run into the same issue. Will let you know shortly.

Yeah make sure both have v0.3.8 running. You can check by going to settings and swipe to the last screen, it has the version number. I have put out a lot of updates in the past few days so check the version number. Thanks!

I tested it just now on the 6P before the upgrade and it was working, once I updated it with the Play Store version 0.3.8 I ended up with the same error as in the 1+3T…

Yeah, I don’t have that error with the latest release. Can you tell me a bit more about your setup in HA. Are you using a username/password for your MQTT broker? Are you using SSL or a different port for your setup? You might also want to restart your MQTT instance or HA and test it. I am using different methods for generating client Id’s that could be affecting things.

My configuration is:
alarm_control_panel:

  • platform: manual_mqtt
    state_topic: home/alarm
    command_topic: home/alarm/set
    pending_time: 5
    trigger_time: 5

running 1.3.6
I’m getting the dialog when i go to settings screen

I uninstall 0.3.8 and installed 0.3.7 and it works perfectly.
I’m using the cloud MQTT broker and it does have a user id and password, no SSL and the HA port is the default. I did reboot my instant of HA which is running on a PI3 however, 0.3.8 behaves the same way.

I have

alarm_control_panel:

  • platform: manual_mqtt
    state_topic: home/alarm
    command_topic: home/alarm/set

Your pending time needs to be higher it’s set to 5 seconds. The pending time is the time to show the dialog to disable the alarm. It’s so short that the dialog probably doesn’t have time to even be displayed. The trigger time also should be the length of time you want to have your alarm siren or alarm screen shown before the alarm resets itself. I think you should just remove these lines or set them higher. I have 60 for pending and 1800 for trigger for example. Hope that helps.

I think I know what the issue is. I get the message but really it’s just complaining between auto reconnects to tht MQTT servers. You should still be able to set the alarm mode right? Hopefully you can just ignore it until I have time to investigate and make a patch.

It’s a problem with connection timeout and reconnect. I will have to probably suppress the error message as I think it’s still reconnecting despite the error message.

I am seeing a crash for you in the alarm settings. I will take a look at this as well but please update the pending and trigger times in your configuration yaml.

As your message was coming across I installed again 0.3.8 again and then rebooted my 6P, unfortunately, the problem didn’t go away. Not sure if suppressing the error will work, even after I dismiss the error I’m unable to set the alarm. Will be updating the additional line next to see if that solves it.

Hi,
I changed the pending time to 60 and trigger time as you suggested, still not getting the dialog box.
when I press the arm home or arm away yellow/red lock icon it’s jus flickering and nothing happens.

Did you change it in your yaml file and also in your alarm settings, they should match. Pending is most important, it should probably be no less than 30 or 60 seconds.

I will have to take a look and see if I can find the issue. Thanks for letting me know.

Both match 60 and 60 yaml /alarm settings.
Thank you for your help.

I am using different logic for handling cloud MQTT connections if you are using http/https you need to enter the prefix (http/https) with your broker address. So something like http://192.168.1.1 instead of just 192.168.1.1 as you would for ssl or tcp for local MQTT brokers.

// allow for cloud based MQTT brokers
if (broker.contains(“http://”) || broker.contains(“https://”)) {
serverUri = broker + “:” + String.valueOf(port);
} else {
if (tlsConnection) {
serverUri = “ssl://” + broker + “:” + String.valueOf(port);
} else {
serverUri = “tcp://” + broker + “:” + String.valueOf(port);
}
}