“description”: “Send the alarm the command for arm home”,
“fields”: {
“code”: {
“description”: “An optional code to arm home the alarm control panel with”,
“example”: 1234
},
“entity_id”: {
“description”: “Name of alarm control panel to arm home”,
“example”: “alarm_control_panel.downstairs”
}
}
}
You still haven’t posted your config. Be sure you’ve got “code” properly set. It doesn’t need to be a working code, but it does need to be the correct format (4 numbers likely).
This JSON you post here isn’t what you’d send. It’s just instructions. You need to send something like:
{'entity_id':'alarm_control_panel.home_alarm','code':'1111'}
Paste it into the service data when trying to disarm.
And make sure you’ve got the correct entity_id. Your exact entity_id will be determined by your partition name (so mine is “home alarm” which yields an entity of alarm_control_panel.home_alarm. Looks like yours is named the same. Check your states tab to find your exact ID, though.
envisalink:
host: 192.168.2.11
panel_type: DSC
user_name: admin
password: jenni45
code: ‘6914’
evl_version: 3
keepalive_interval: 60
zonedump_interval: 30
zones:
1:
name: ‘Front Door’
type: ‘opening’
you mean this ??
sorry I am just getting into this and know scrips or where they go is new to me. Something like this"{‘entity_id’:‘alarm_control_panel.home_alarm’,‘code’:‘1111’}" I don’t know where to find it.
Remove the quotes.
Remove the quotes from the password?
Thanks Remove the quotes did the trick
Sounds like you’re on the way to getting things to work. I’m betting that the password for you alarm is not “jenni45”. That might be your issue. Try leaving that password definition out completely. Here’s my envisalink setup. This is exactly what I have, the code is just a format, not the actual alarm code.
envisalink:
host: 192.168.1.103
panel_type: DSC
user_name: user
password: user
code: '1234'
port: 4025
evl_version: 3
keepalive_interval: 60
zonedump_interval: 30
zones:
1:
name: 'Fire Alarm'
type: 'motion'
2:
name: 'Front Door'
type: 'opening'
3:
name: 'Back Door and Crawl Space'
type: 'opening'
4:
name: 'Livingroom and Kitchen Windows'
type: 'opening'
5:
name: 'Garage Door'
type: 'opening'
6:
name: 'Dining Room and Office Windows'
type: 'opening'
7:
name: 'Sound Sensor'
type: 'motion'
8:
name: 'Livingroom Motion'
type: 'motion'
partitions:
1:
name: 'Home Alarm'
Your right is not my real “jenni45” I just add that it to show how my lay out was… @The_Dude_Himself said to removed the quotes and that did the trick.
I can arm and dis arm now from within HA
any example of automation like if alarm is not arm at 10pm to arm it as “arm stay”
From the private msg I just sent. Reposted here in case it’ll help others:
This would arm the alarm at 10pm. There shouldn’t be a problem sending an arm command to an alarm that’s already armed. You might need to change the action service based on your exact setup.
Automation:
- alias: Arm alarm at 10pm
trigger:
- platform: time
after: '22:00:00'
action:
- service: alarm_control_panel.alarm_arm_home
Here’s some code that notifies me when the alarm is armed
- alias: Alarm Armed Away
trigger:
- platform: state
entity_id: sensor.home_alarm_keypad
state: 'Arm Away'
action:
- service: notify.scott_notifier
data:
message: "Alarm Armed Away"
title: "Alarm"
And when it’s disarmed:
- 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_changed_by_user %}{{ ["Scott","Wife","Son","Daughter"][states.sensor.home_alarm_keypad.attributes.last_changed_by_user - 1] }}{% else %}Someone{% endif %} disarmed the alarm
You’ll need to adjust that message array/list to match the code setup in your system. In the config for my DSC, my code is first, them my wife, son, daughter. You may need something like
message: >
{% if states.sensor.home_alarm_keypad.attributes.last_changed_by_user %}{{ ["Scott","wife","","","","","son","daughter"][states.sensor.home_alarm_keypad.attributes.last_changed_by_user - 1] }}{% else %}Someone{% endif %} disarmed the alarm
If you’re not the first 4 codes.
What’s the best way to get the version of dsc_client that has the “last_disarmed_by” attributes? My version got overwritten when I upgraded to .31 this morning.
What if you run
pip install pyenvisalink --upgrade
? Right now the latest version is 1.9, which I think there’s still a pending pull request to have hass actually use that.
That did upgrade me to 1.9 (newer than the version with HASS). But it’s not new enough to include the 700/750 handling. I pasted this in from your post #245 in this thread.
With this update, I’m having the same problem that @Roystervi ran into. I can’t arm or disarm from the HASS interface. The buttons stay greyed out. My config is posted earlier in this thread. I tried with and without quotes around “code”.
(That’d be used on the services dev tool.)
See here for a fix: https://github.com/srirams/home-assistant/commit/2f8deb70cb5f3621a69b6b9acb72f8e29123650c (only for DSC)
v1.9 of pyenvisalink should give you the user who last armed/disarmed right out of the box…
I thought I had my pull request ready to tidy it all up but looks like the new services need moving out of the alarm_control_panel base object and into Envisalink specifically, will try and get time today.
I didn’t get any attributes concerning disarms until I pasted-in the code as mentioned. Here’s what I had:
"ac_present": false,
"alarm": false,
"alarm_fire_zone": false,
"alarm_in_memory": false,
"alpha": "Not Ready",
"armed_away": false,
"armed_bypass": false,
"armed_stay": false,
"armed_zero_entry_delay": false,
"bat_trouble": false,
"beep": false,
"chime": false,
"entry_delay": false,
"exit_delay": false,
"fire": false,
"friendly_name": "Home Alarm Keypad",
"icon": "mdi:alarm",
"ready": false,
"trouble": false
(a door was open, so status is “not ready”)
Aside: what’s up with “ac_present” being false.
error: could not create ‘/usr/local/lib/python2.7/dist-packages/pyenvisalink’: Permission denied
The AC Present is another one of those events that I recently added support for. But also we only update it when the DSC tells us to, so i suspect we may have stale data there.
You know- i think the issue behind the “last events” here is because HASS downloads it’s own copies of the libraries (which is why it can still install even if you don’t launch as root).
So even though you used pip to install 1.9 (presumably as root), HASS may not be using this version.
Anyway- I think right now we have a lot of pending changes in the pipeline, and that’s causing confusion. Anything I can do jnimmo to help get your changes accepted?
Did you switch users first? You may need to be the HASS user:
sudo su -s /bin/bash hass