YET another take on an alarm system

Supported states:

#//-------------------STATES TO CHECK------------------------------
STATE_TRUE = ‘true’
STATE_UNLOCKED = ‘unlocked’
STATE_OPEN = ‘open’
STATE_DETECTED = ‘detected’
STATE_MOTION = ‘motion’

STATE_FALSE = ‘false’
STATE_LOCKED = ‘locked’
STATE_CLOSED = ‘closed’
STATE_UNDETECTED = ‘undetected’
STATE_NO_MOTION = ‘no_motion’
STATE_STANDBY = ‘standby’

I’m at a loss with your MQTT as I have also tried with mosquitto and it works on my setup. I’m not using MQTT for anything else on HA though so maybe there is a clash somewhere, seems odd however that you can see the messages going out. Are both the MQTT server and HA on the same box/same IP? Is your MQTT server mosquitto or HA built in?

Aaa woops looks like a bug. Remove the ‘standby’ custom state as its actually in the supported list.

I’ll check the panel code and fix duplicates

Nope MQTT is on its own Virtual machine on my Hypervisor

As I say I’m using it for a few other bits in HA and its working fine and the messages are going in and out.

Another potential bug

I removed standby from the custom triggers as you suggested. However my Motion sensor now no longer shows up as an open sensor when its in standby mode. It still triggers the alarm but the open sensor has now gone unless I add “standby” back in as a custom trigger

I fixed the MQTT issue…

Your notes at the end of the topic, even though you put a hash as if to say to HA not to read it as you would to include notes in your code, it doesn’t accept it at the end of a command by the looks of it. Its treating your notes as part of the topic so in actual fact its listening on all of that text after /home/alarm/set

Once I removed it and re issued the ARM command it works now :slight_smile: might wanna remove that bit from your instructions so no one else falls into that trap

2 Likes

Hi again,

I wanted to put a direct link to the alarm panel to the Android homescreen (via Chrome’s “Add to homescreen”) so that it becomes more easily accessible. However, HASS is preventing this for some reason and always redirecting to the slow loading home screen. I finally figured out why this is happening and found a fix for this:

It is a dirty workaround but the effect is great :slight_smile:

Cheers
Jochen

2 Likes

still having issues with ‘0476’ as my code. im running it through my secret. yaml could that be the issue? (tried it with the single quotes as you mentioned above).

i too found this issue with hassio not allowing it as a home short cut. i will try your suggested method. thanks

edit: just tried this (https:xxx.duckdns.org/kiosk/alarm) but it didn’t work for me. @Jo-me any tricks im missing?

Could you test it without using secret.yaml?

1 Like

Is there a keypad I can use this with? Particularly a zwave keypad?

Does anyone use Kustom on android?

It’s absolutely class. I have a a few custom commands linked to the live wallpaper. I’ll upload a video at some point

I haven’t tried any personally but I’m assuming the code is programmed into the zwave device itself and sends out a status of ‘set’/‘unset’ on the zwave network.

This component should support it out the box as you could use automations to arm/disarm when a certain status is seen

just tested it and yes it works fine in alarm.yaml (‘0476’). but doesn’t work with secret.yaml
I have, (code: !secret alarm_code) in alarm.yaml & (alarm_code: ‘0476’) in my secret.yaml??? strange

mmmm not sure why but i just tried setting it back to a secret and boom it works. must have been something with my code, although i checked it a zillion times ;-). thanks again for this awesome feature. cheers Steve

1 Like

:slight_smile: That’s not what I meant. Read on to the end of the thread. Its the part about modifying an “init.py” of the frontend.

You can’t have code start with zero (0), When i changed the starting to another number it working fine.

As long as you surround the code with hyphens it should work ie code: ‘0000’

1 Like

Ah, ok. Thanks!

Hey, I am the developer of the Android MQTT Alarm Control Panel. The HASS MQTT Alarm Control Component doesn’t accept a code at this time, there is no mechanism for passing the code to HASS over MQTT that would work. That means anyone with access to your MQTT service could disable the alarm without entering the alarm code.

I suggested to @gazoscalvertos that he add a feature to the HASS MQTT Alarm Control Panel to accept a code since he has this working in his custom component. Once the feature is in HASS, I can update the Android application to pass along the code.

However, you can secure your MQTT server with a username/password and use this in the settings of the Android Application if you are worried about security. I don’t expose my MQTT server or HASS to the outside world, so it all works from behind my router/firewall.

1 Like

From the MQTT Manual Control Panel component documentation :

code (Optional): If defined, specifies a code to enable or disable the alarm in the frontend. This code is not required for MQTT interactions.

We should make it so the HASS component either requires the code or makes the code optional for the MQTT interaction. Once that support is added to HASS, any MQTT client can now send the code.