ELK M1 Interface

Is there a way to refresh the counters? It seems the counters are updated only when the integration starts in Home Assistant.
Thanks!

No. Good feature request though. If you want to, raise an issue on GitHub against the library. https://github.com/gwww/elkm1

I’m trying to display the outside temperature on my keypads, but everything i put on line1 or line2 is treated as text. Anybody able to get this to work?

data:
  entity_id: alarm_control_panel.house
  line1: '{{ states(''sensor.weatherbit_temperature'') }}'
service: elkm1.alarm_display_message

Try quoting your template like this:

data:
  entity_id: alarm_control_panel.house
  line1: '{{ states("sensor.weatherbit_temperature") }}'
service: elkm1.alarm_display_message

That is, a double-quote character rather than two single quotes.

Hmmm… well, that’s not the (only) problem. Template expansion isn’t happening when its called like that. Perhaps use data_template rather than data when making the service call. So like this:

data_template:
  entity_id: alarm_control_panel.house
  line1: '{{ states("sensor.weatherbit_temperature") }}'
service: elkm1.alarm_display_message

…based on https://www.home-assistant.io/docs/scripts/service-calls/ which I had to consult. I don’t see an obvious way to easily try this using the developer “services” tool, but it’s worth a shot.

Thanks. That did the trick. I’m just starting to switch my house over to home assistant and I still in the drinking from the fire hose phase.

I’m experiencing a new bug related to the changed_by_id attribute of alarm_control_panel.area001. It is showing the wrong ID and name. Both keypads are showing different last_user (1 and 2) while alarm_control_panel.area001.changed_by_id is showing 3.

I’ve reported the issue via https://github.com/home-assistant/core/issues/38299.

@jshank Can you send me logs and detailed instructions on the steps you take to make this happen? If you wish, you can send me a direct message to keep your logs off the forum.

I just noticed something strange, and I’m wondering if it’s unique to my setup or if it is expected behavior with how HA functions. When I put a group of Elk M1 PIRs into a HA group, the status shows as unknown. See the following example. Is this expected? Can HA only evaluate groups of binary sensors that are explicitly on/off?

basement_motions:
  name: Basement Motions
  entities:
    - sensor.bar_pir
    - sensor.basement_pir
    - sensor.basement_stairs_pir
    - sensor.storage_pir
    - sensor.workshop_pir

I don’t use groups so only guessing… What is the status of each of the PIRs? Is one unknown?

Every one of the PIRs are Normal. Group state doesnt change even when one goes to Violated

This is consistent with what I see. Mostly I’ve got switches and lights in groups, which can be “on” or “off”. I have a group with sensors where the group state shows “unknown”.

If you want to aggregate the state of all the Elk zones, probably some games with a template sensor entity is in order.

The template sensor approach makes sense as a workaround. At this point, I’m not sure if it’s how HA handles groups of sensors, or something specific to the elk sensors. My groups of locks, binary sensors and covers (blinds) all work and report as I’d expect, but like you’ve stated, they’re all essentially on/off states.

Group states probably only support sensors with 2 states. The zone sensors have 4 possible states.

    NORMAL = 0
    TROUBLED = 1
    VIOLATED = 2
    BYPASSED = 3

I’m collecting features to tune up the Elk integration soon. I’ve gathered the highlights from this thread. If you have other features, would like to comment on features, etc please do so here: https://github.com/gwww/elkm1/issues. Even if you just put a thumbs up on the ones that matter most to you.

I’d like to knock off some of the long standing smaller ones.

2 Likes

Thanks for maintaining this. I voted for documenting trouble states. Cheers.

Hey @gwww - I’ll setup some debug logging and let you know if I can capture it. It’s extremely intermittent now.

Great! Thanks.

I have a theory. Actually a bit more than that. The new code that was added to parse log messages to get the last change status is buggy. It will pull our the 3 digit number from ANY TYPE of log and treat it as the user number. For some logs the 3 digit number in the log is a zone number, a keypress, etc. That’s a clear fix. What I don’t know is what is happening with your system. It could be that bug or it could be something else.

When I look at my log I would never see this bug as all that’s in my log are arm/disarm logs (except for the rare other log, like when my battery died). So if you have lots of logs that might explain this.

Trying to get this integration working on the latest HA running on VirtualBox 6.1 on Fedora 32. Communication to the module is via serial but I can’t seem to establish comms to the module.

  • I believe I have the right port (/dev/ttyS0)

  • The user is part of dialout group

  • I have used the same port in the HA integration dialogue popup (no auto discovery but used the ‘+’ on the bottom right to look for Elk-M1

  • I know that the Elk-M1 module works as I’m migrating from Control4 and it works on Control4

Is anyone else running HA on a VM and is using Elk-M1?

I’m not too knowledgeable on this, however, what I understand is that a serial port inside a VM must be mapped to the physical serial port on the host OS… perhaps explore topics in that area? Other than that you could try playing around with pyserial by starting a python command interpreter inside (and maybe try outside) of the VM. Here are a couple of things you could try: https://pyserial.readthedocs.io/en/latest/shortintro.html

Two commits have been merged. First is a bug fix. Second is update to the docs. I’ll let you read the pull requests for details…

https://github.com/home-assistant/core/pull/41378 (merged)
https://github.com/home-assistant/home-assistant.io/pull/14707 (to be merged)

I’m working towards adding a couple more services based on the thumbs up on the issues on the ElkM1 lib.

1 Like