post your script (replace private codes)
I have setup the HASS custom alarm using homekit, and ios. Does anyone know why the alarm states do not match between the HASS, Homekit, and Homekit notifications.
The modes in HASS are âhomeâ,âawayâ, and âperimeterâ, the buttons in the homekit-home assistant entity are, âhomeâ, âawayâ, and ânightâ. âŚand then the -notifications- I get from homekit are âstayâ, âawayâ, and ânightâ.
I was trying to clean up the name mismatches, by looking through the files. I did find how to change the names for HASS (files in the .homeassistant directory and files in the /usr/local/lib/python3.7/site-packages/homeassistant directory.) I did some global name changes of the HASS mode buttons and variable names, which worked, but even after doing this, they did not change the mode names in homekit, or in the homekit notications-- they remained the same. I am clearly not finding where those mode names are stored.
( I did think maybe the old names are caches somewhere, and if I cleared those out, maybe it might work- so I deleted all the .pyc files, and the db file. but that didnât help)
Does someone know how that works?
Darrin
Hi, I have been using this alarms and works flawlessly. But now I have an issue. Iâve installed the android app: âmqtt alarm panelâ by thanksmister and configured it. Everything works except the disarm. I can Arma home or away from the app and it works fine, if I arm or disarm from hassio it immediately updates in hassio. But if I try disarming from the app, nothing happens. Itâs the only thing that is not working. Any thoughts??
Are you passing the disarm code ?
Im NOT sure what you mean by passing The code. But i have set the code in the app yes. Do i need to do anything else? I have defined the same code in the app as i have in the alarm.yaml
When doing it from a script you have to pass the disarm code to the alarm control panel. Like this:
alarm_disarm:
sequence:
service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.house
data:
code: !secret alarm_code
Not sure how to pass this via mqtt. Check the docs at github?
Theres a solution , which is setting override to true in alarm.yaml so it accepts mqtt without a code
@johnplanetz that was it! Thanks for the suggestion. All I had to do was this, just like you said:
## [CUSTOM SENSOR STATUSES]
## These settings allow devices which are not natively supported by this panel to be used.
## This is to be used when the state of the device is not recognised by the panel. Examples are provided below
custom_supported_statuses_on:
- '22'
custom_supported_statuses_off:
- '23'
And the alarm now triggers when I open the door - well at least in the panel, it was instant, my actual siren didnât go off but thatâs another matter.
Edit: I just had to heal the node, itâs been unplugged for a while⌠The siren does turn on when the door opens. Awesome!
Ok, now that I have the basic functions workingâŚ
Is there a way to make the system execute an external script if the alarm is triggered?
I use a VoIP service that offers a Perl script to send texts⌠So I guess you see where this is going, I would like that script to be executed in order to get a text if the alarm is activated.
Edit: I still need to do some digging but this seems to be what I was looking forâŚ
Yes, you call the script from the alarm triggered automation:
- id: alarm_triggered
alias: '[Alarm] Triggered'
trigger:
platform: state
entity_id: alarm_control_panel.house
to: triggered
action:
Then possibly a shell command to call your perl script.
Thank you @tom_l. I edited my original post before seeing your answer, I think I am almost there
Problem solved!
In case anyone needs this, here is what I did:
- In configuration.yaml:
shell_command:
sendsms: perl /home/homeassistant/.homeassistant/sendsms.pl --msg="alarm triggered!"
- In automations.yaml:
- id: alarm_triggered
alias: '[Alarm] Triggered'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'triggered'
action:
- service: switch.turn_on
entity_id: switch.switch
- service: notify.pushbullet
data:
message: 'ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attribut$
target: email/*****@gmail.com'
- service: shell_command.sendsms
Nice. If you want to make your shell command send any message passed to it rather than hard coding it, have a look at this for inspiration, Centralized handling for text to speech (TTS)
I have a sensor in delayed section under armed_away. However when the alarm is armed and this is activated the alarm goes not Warning state, not pending. The sensor change from locked to unlocked.
Put the sensor in the Override group. Delayed gives you time before disarming but still triggers. Override is ignored during arming.
but I want it to trigger the pending timer
Pending time is the time between activating the alarm and it arming.I think you mean the delay time.
The sensor can be in both groups. If it is in the Override group it will be ignored during the pending time when arming. If it is in the delayed group it will trigger the alarm after an entry delay.
If you really meant you want the pending time to be activated by the sensor your will have to make an automation that arms the alarm when the sensor is triggered.
this is confusing the code says:
##[OPTIONAL] Sensors in this group start the clock (pending_time) when tripped before the alarm is triggered
delayed:
so the sensor is in there, as I read it should start the countdown before the alarm is triggered, but it gives a warning.
I have this sensor that gives locked/unlocked status on my front door. This sensor needs to have the possibility to change after the alarm countdown has started without triggering alarm. However when the alarm is already armed this sensor must start the countdown before alarm is triggered.
Hi Folks,
Iâve updated the branch dev with the new UI to include user specific codes and have squashed a few bugs. Iâll respond to the some of the comments above over the course of the next couple of days. Iâve got more bugs to sort then will merge with the master branch.
https://github.com/gazoscalvertos/Hass-Custom-Alarm/tree/newUI