Are you using the old separately installed custom component or are you using the new version that is integrated with HASS? If the latter, what version of HASS are you on?
Integrated, 0.81.1. Couldn’t do it before either before switching to the new integrated platform. I should mention the elk interface otherwise seems to work, I get zone data.
Odd.
Does any error get locked in the HASS error log?
Do you know what version of Elk firmware you’re running (and if using a M1-XEP/C1M1, the firmware version for that) ?
No errors in HASS log. Elk firmware 5.2.8. M1XEP 2.0.42.
I’m testing by going to HASS service page -
Service: “alarm_control_panel.alarm_arm_away”
Service data:
{
“entity_id”: “alarm_control_panel.area001”, “code”:“1234”
}
Does it also not work when using the alarm control panel UI widget in HASS to enter a code and then arm it?
Update:
alarm_control_panel.alarm_arm_home doesn’t work, but alarm_control_panel.alarm_arm_away DOES work.
alarm_control_panel.elkm1_alarm_arm_home_instant works too.
For some reason, I don’t have an elk arming widget.
edit: able to force a elk widget by adding a separate group. I can arm home and disarm via the widget.
on my system the entity for arm home is “alarm_control_panel.area001” not
I tested this tonight on our system (running 82.1).
Everything armed via service calls except for the bypass mode. That didn’t do anything, though probably because it’s not implemented.
So I’m not sure why you’re having problems with arming via service calls. Maybe something to do with having upgraded from older version to new, something is weird? Make sure that old versions of the Elk python library or custom component aren’t floating around somewhere?
I’ve updated to .84 - which has the fix for the counters reading unknown. Am I correct in presuming that the M1 doesn’t broadcast the changes in counters and that their values are only read when HA restarts?
Huh, you’re right the Elk doesn’t send an update automatically like it does for most things. That’s annoying (and removes a lot of potential functionality).
We could in theory read them every X interval, or expose a service to read them and allow for automations to trigger reading them… but the Elk won’t broadcast the changes continuously as they happen.
A service to read them would be ideal , I’m guessing that way you could pick and choose which counters to read and at what interval, eg I might only need to check counter 1 every hour, but counter 2 every minute.and counter 3 only when it’s daylight.
I’m using hass.io with the elk configuration below. The Lovelace alarm-panel card correctly shows the armed state, but I can not get it to arm or disarm. I’ve created new users in elk with various combinations of access and passwords. Does this work for anyone? What am I missing?
Thanks, Richard
Here is some error information
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 287, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/alarm_control_panel/elkm1.py", line 179, in async_alarm_disarm
self._element.disarm(int(code))
ValueError: invalid literal for int() with base 10: ''
Not passing an entity ID to a service to target all entities is deprecated. Use instead: entity_id: “all”
Lovelace
entity: alarm_control_panel.area_001
states:
- arm_home
- arm_away
- arm_night
type: alarm-panel
configuration.yaml
elkm1: host: elk://rjuhass.duckdns.org:2101 zone: include: [1-80] output: include: [24-46] counter: enabled: false plc: enabled: false setting: enabled: true task: enabled: false thermostat: enabled: false
Does the lovelace alarm card have a place to enter your alarm code before clicking on arm/disarm ?
It does, although I couldn’t make it work. However this works great:
This is working great with the latest version of home assistant, .86. When I updated my HA, it automatically applied the lovelace card. One thing I was wondering that could be added however, is that the icon at the top right change state based on if the alarm is in a “ready to arm” state or not. It shows a green shield, as though everything is fine, regardless of whether the system is ready to arm or not (my system cannot be armed if a zone is violated).
Can this feature be added, or is there perhaps an issue with my system that is preventing that from showing ready to arm status on the card? Actual arming statuses show up just fine, ie disarmed, armed home, armed away.
Thanks
I’m having difficulty. Just installed and set everything up. I think I have it configured correctly, but am not getting a good error. Latest firmware on everything. hass.io 0.86.3. I only need a few zones and one keypad.
elkm1:
host: elks://192.168.2.27
username: !secret elk_user
password: !secret elk_pass
temperature_unit: F
area:
enabled: false
counter:
enabled: false
keypad:
include: [1]
output:
include: [1-2]
setting:
enabled: false
task:
enabled: false
thermostat:
enabled: false
plc:
enabled: false
zone:
include: [1-16]
Error is constantly being thrown:
ElkM1 disconnected
8:14 PM util/async_.py (WARNING)
That’s it. Not entirely sure how to debug from here, as I’m not getting a stack trace.
Shouldn’t that be “elk:” and not “elks:”?
While elks:// is valid when using secure connection to the panel, I would start using the elk:// first. Get that working then move to secure. I suspect that the user/password is not correct or that the panel is not properly setup for secure communication. So, try the elk:// first, get the running, then tackle the elks://
Setting it as insecure is working. Using the exact same username and password as over secure. Would that disconnect error happen if there were a TLS mismatch?
I’ll have to see if I can get the library to just work directly instead of through Home Assistant. I have enough other Linux systems in the house to test with. Might help me with debugging.
Thanks.
To clarify, username and password are not used when using elk://.
The question is now why is secure not working. Is it enabled on the Elk panel? Are the username and password correct? Are you using the latest version of Elk software on the panel? I’ve no idea which if any of those questions are relevant… poking for more info at this point.
It could be a TLS mismatch, there were some TLS version changes about 2 or so years ago where Windows 10 would not work with Elk. Those have been long resolved and I’m not even sure that they are relevant here.