Sorry all bit of a delay with the pull request due to trying to add a service to the alarm platform rather than just the Envisalink component. Have tidied this up now and hoping it might get incorporated soon.
Hi all - v0.33 released today includes some new Envisalink functionality
Attributes now include
last_armed_by_user: 40
last_disarmed_by_user: 40
(this will be a breaking change for those currently referencing last_changed_by_user … sorry @ih8gates)
It includes @sriram’s fixes which now show state pending when alarm is in exit delay rather than the state not changing until arming complete. It is no longer necessary to enter the code to arm/disarm from the UI; but if you’re doing any automations to arm or disarm you can specify a code to use (i.e. if you want to use a specific user code)
Lastly a new service ‘envisalink_alarm_keypress’ means you can send a keypress to the partition for DSC alarms. I’m using this to control a relay for the garage door, and control this with the following switch configuration. Caution you might want to check the Envisalink docs before trying to do anything in programming mode through this, apparently there are conditions which can cause you to get stuck in there and have to restart the device to resolve.
- platform: template
switches:
garage_door:
friendly_name: 'Garage door'
entity_id: binary_sensor.garage_door
value_template: "{{ is_state('binary_sensor.garage_door', 'on') }}"
turn_on:
- service: alarm_control_panel.envisalink_alarm_keypress
data:
entity_id: 'alarm_control_panel.home_alarm'
keypress: '*71'
- delay: 00:00:30
turn_off:
- service: alarm_control_panel.envisalink_alarm_keypress
data:
entity_id: 'alarm_control_panel.home_alarm'
keypress: '*71'
- delay: 00:00:30
Would someone like to mark this feature request as completed by the way? Not sure how to!
Don’t think we can- it’s just an open forum. I don’t believe there was an actual issue raised on github for this that can be closed.
I can change the title of the thread to add [update: implemented in Envisalink Alarm component] or similar. Or is that too heavy-handed?
No worries I just saw some posts in feature requests have a tick showing they’re done
is this treat still open I am trying to find out how I can assign in HA who arm or disarm the alarm. The kids or I
Are you asking about how to change the codes or how to respond when the lock is unlocked?
If you’re asking about changing the codes, there’s not yet an interface in HASS for that. Someone’s working on it, though.
If you’re asking about responding when a lock is unlocked, here’s the code that I use. It works with the current Envisalink component without any customization. Note that the part where it checks “Scott, Wife, etc” depends on your actual alarm panel. The alarm codes are in the order they are configured in my DSC. I showed how to handle things if you have blank code positions by leaving blanks in the list before “guest”.
- alias: Alarm Disarmed
trigger:
- platform: state
entity_id: sensor.home_alarm_keypad
state: 'Disarmed'
action:
- service: notify.scott_notifier
data:
title: "Alarm"
data:
priority: 0
data_template:
message: >
{% if states.sensor.home_alarm_keypad.attributes.last_disarmed_by_user %}{{ ["Scott","Wife","Son","Daughter","","","Guest"][states.sensor.home_alarm_keypad.attributes.last_disarmed_by_user - 1] }}{% else %}Someone{% endif %} disarmed the alarm
is there a way to put back the asking for code to arm or disarm…before I use to have to enter my alarm code to arm or disarm but now its just arm or disarm when you press anyone of those two
Does the Envisalink component support multiple alarm panels such as in the example below? If so, what is the distinction between hosts when scripting or automating?
### Envisalink Alarm System ###
- host: 10.5.5.20
panel_type: DSC
user_name: user
password: user
code: '1234'
port: 4025
evl_version: 4
keepalive_interval: 60
zonedump_interval: 30
panic_type: Police
- host: 10.5.5.30
panel_type: DSC
user_name: user
password: user
code: '1234'
port: 4025
evl_version: 3
keepalive_interval: 60
zonedump_interval: 30
panic_type: Police
Hi zMI2-
Yes that should be fine. So the names of entities really aren’t driven based upon that host information there, but rather the partition/zone names you configure. So within each of those entries, i’d expect to see a partition/zone array, with each one having a friendly name.
For example, under host 1, if you configure a partition named “host 1 partition”, the component will create a sensor and alarm_control_panel entity based upon that.
Make sense?
What you can do is- in your configuration.yaml entry for envisalink, just have the “code” property be an empty string. In that case it will require it to be entered by the UI.
code: ‘’
I tried leave the code: blank but I got an error in HA 2/ I did code: “” but when the try to arm the alarm the disarm was grey out so I could not enter my code. 3. I did code: " this freeze HA until I remove it and restart HA service.
panel_type: DSC
user_name: admin
password: xxxx
code:
evl_version: 3
leaving the code: empty cause an error in HA
how to enter more than one code to in the envisalink setup like you have here [“Scott”,“Wife”,“Son”,“Daughter”]
envisalink:
host: 192.168.0.103
panel_type: DSC
user_name: admin
password: user
code: “1234”,“1234” ???
That array maps to the numbers that are stored in my DSN alarm panel. My code is in slot 1 (or does it start with zero?), my wife’s is in the next and so on. last_disarmed_by_user will contain the index of the last person to disarm the alarm.
You’ll only ever have one code value in the envisalink component.
with your example [“Scott”,“Wife”,“Son”,“Daughter”] if I add it like like you have it in mines, it will only say “Scott disarmed the alarm” just like you said because scott is listed 1st… and if I disarm it with another user. user 11, 12 or 13 code it will then say “Disarmed the alarm” … I had to word it like this because all it was saying Someone disarm the alram…\
{% if states.sensor.home_alarm_keypad.attributes.last_disarmed_by_user %}{{ [“Bobby”,“Saraiyh”,“Jenniveen”,“Guest”][states.sensor.home_alarm_keypad.attributes.last_disarmed_by_user - 40] }}{% else %}‘Someone’{% endif %} disarmed the alarm
If you skipped slots in the setup of your alarm, you’ll need to insert blanks in the array, ala
[“Scott”,“”,“”,“”,“Wife”,“Son”,“”,“”,“Daughter”]
Your subtraction works as long as nobody’s in those first 40 slots.
so does the 1st code start from 1
?
In my system, yes. The number that’s going to come back is the position in your alarm setup - just account for it in the array. To be clear - it’s in your alarm panel, not something in HASS.
I am readying 40 is the 1st then user 2 is 02
Select the two digit users code to program (the system has space for 32 users, so for user # 2, enter 0, 2).