ELK M1 Interface

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 :grin:, 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.

Ah, okay. Firmware on the panel is 5.3.10, which appears to be latest. M1XEP is 2.0.42, which also appears to be latest. My panel is several years old, but just installed it. I had to get past the issue with TLS problems from a couple of years ago. But the updates worked there. Secure port is there and the default 2601. I had to go in and enable the non-secure port.

M1XEP claims it can support 16 characters, so I have a standard apg generated 16 character password which is ASCII letters and numbers. Username and password were copy and paste from the config.

AMX beacon is off.

The keypad had the right time on it. I did not have NTP setup on the M1XEP. I just did that and synced the time. That didn’t fix the secure connection.

When I hit the port with openssl, I get back TLSv1.2. I don’t get any ciphers or certs, which I find odd. But I’m used to poking at more traditional things like HTTP and LDAP with openssl.

Trying with M1ToGo with secure settings, I can get in with that username and password.

In addition to trying to test the elk library by itself outside of HASS, you can try setting HASS to a more verbose logging setting and wade through the resulting noise … https://www.home-assistant.io/components/logger/

Also, just to eliminate some bug in the library with too long passwords, try using a shorter password as a test (since you said you’re using one right at the limit). I doubt this solves it, but it’s an easy thing to try…

hello,

new to this thread. and home assistant and elk for that matter. :slight_smile: Does anyone have examples of ELK in HA placed into display panels? right now, the home page is kind of over whelming with information. this is a gigantic thread.

Hello, since the new version of Hassio was released making folks use Lovelace, my Arm Home and Arm Away gui no longer works. The status updates, but entering the code and clicking the buttons does not. Anyone know why?

I had an issue as well, but just updated to 0.87 and it works just fine again. Might wanna try to upgrade.

I just upgraded to try it out, still no luck. Are you using an Elk?

yup. do all other functions work? what your lovelace config look like for the alarm panel?

Yes. The other functions work. Hmm…