ELK M1 Interface

Yep, and update the config etc (see the documentation in HASS proper). Seems for the moment may need to specify temperature_unit too (see above post from gwww)

I applied this and still get the error, however now it complains about “counter”, if I add a config for counter it will then complain about the next missing optional config. I have not yet tried adding ALL config options.

@hagak - I was having the same errors as you, but I resolved them by adding every possible value to my configuration. here’s my config:

elkm1:
  host: !secret url_elk
  temperature_unit: F
  area:
    exclude: [2-8]
  zone:
    exclude: [17-24, 27-208]
  output:
    exclude: [1-8, 11-208]
  counter:
    exclude: [2-64]
  keypad:
    include: [1-5]
  task:
    enabled: false
  thermostat:
    enabled: false
  plc:
    enabled: false
  setting:
    enabled: false

@gwww I noticed on my keypads that don’t support temperature, it’s reporting back as -40, is this expected? Should I raise a bug?

index: 1
area: 1
temperature: -40
last_user_time: 2018-10-27T11:47:47.759957+00:00
last_user: 0
code: 
last_user_name: 
unit_of_measurement: °F
friendly_name: Garage Keypad
icon: mdi:thermometer-lines

Fixed on my repo. All the rework on the the config to put into hass overlooked a couple of defaults.

I’d appreciate if a few people could try it out.

The keypad does report -40 (as do mine). The code checks for -40 and reports the keypad state as none. Not sure why for you its reporting -40. Mine report none state. Anyone else seeing this?

I’m just looking at your comment again. So, the device_state_attributes will show -40, as I believe is correct. It is the temperature as the ElkM1 reported it. The state on the other hand should report as None, which may show as a “-” in the UI.

So, from what you show in the message is expected. That doesn’t mean it’s the best thing to do. Better ideas accepted.

So I removed the elk references from my custom_components folder and confirmed the correct format is in the configuration.yaml, but in the dev-info panel it gives an error about expecting the temperature_units to be defined as C or F:

Invalid config for [elkm1]: invalid temperature unit (expected C or F) for dictionary value @ data[‘elkm1’][‘temperature_unit’]. Got None. (See /config/configuration.yaml, line 94). Please check the docs at https://home-assistant.io/components/elkm1/

I added the line into my config as such:

elkm1:
  host: !secret elk_host
  temperature_unit: F
  area:
    exclude: [2-8]
  counter:
    enabled: false
  output:
    exclude: [4-208]
  keypad:
    exclude: [3-15]
  setting:
    enabled: true
  task:
    exclude: [3-32]
  zone:
    exclude: [17-208]
  thermostat:
    enabled: false
  plc:
    exclude: [a2, a6, a10-p16]

and now when I click “Check Config” on the Configuration > General page it gives me an error:

\Invalid config for [elkm1]: value is not allowed for dictionary value @ data[‘elkm1’][‘temperature_unit’]. Got ‘F’. (See /config/configuration.yaml, line 94). Please check the docs at https://home-assistant.io/components/elkm1/

I cut and paste the config you provided. Works for me. I don’t have any ideas yet…

Do you have a log? Are there errors?

You said you tried “check config” - have you also tried simply restarting HASS with that config?

I did try restarting, and then the error about value not allowed showed up in the dev-info log. I then removed the line altogether, restarted again, and got the error it was missing, but performing “Check Config” then showed the opposite error about expecting F. Added the line and restarted yet again, now seems to be working.

I think maybe it still had remnants of the custom config because all my entities were still showing in lovelace even though I had yet to rewrite the entities minus the elkm1 (light.elkm1_light_001). All seems working now, thank you for all the hard work you guys have put into this and I’m glad it has payed off and finally been integrated.

ok, that makes sense. the state in my case actually shows up as unknown, which i think is probably fine… Was more just curious about the attribute than anything. Thx for looking into it!

Anyway to not include the Temperature on the Keypads via a configuration? I still would like a sensor that shows last user

Do you have a specific proposal? One that the the ElkM1 devs and the hass devs would accept? I happy to listen.

Seperate sensors for keypad from temperature?

I think from some comments I saw recently from HASS devs about the recent device registry stuff (one device can have multiple entities) that there might be a HASS approved method of handling multiple entities/states (i.e. sensors) on a single device, but I haven’t looked into how it’s supposed to work yet in detail. From a glance at the docs I think it’s only supported when loading entity via “config entry” but I don’t think that means configuration.yaml but something else. I haven’t read into it deeply. If we can use it for this, it would solve the extra sensors for Omnistat thermostats too once we get that implemented.

What a wonderful site it is to see my Home ELK M1G to be available on my HASSio system. I may have over looked this, and I appoligize if I have, but how can I connect to a M1G without the XEP? Is there an option for using another device such as a Wemos D1 or RPi?

There is support for serial. For the host use serial:///dev/tty (where you put in the appropriate serial port for /dev/tty.

I don’t use serial port myself, so I have not done much testing. Let us know how it goes.

@hagak What is the problem that you are trying to solve? Keypad has last user as an attribute. Automations can be driven from that. A custom lovelace card such as this one https://github.com/ciotlosm/custom-lovelace/tree/master/entity-attributes-card could display last user name.