The current master commit of ha-elkm1 may have some issues. You’ll probably want to switch to commit cd8ce9d0315d3ca1b4e35d0196f5c589acd24a18 if you run into weirdness. I’m in the middle of doing a lot of code cleanup which in the process may have introduced some new bugs I’m ironing out, I’m not sure off hand whether what I’ve pushed to Github is already broken or not (I’m a few commits ahead in my local copy vs what is on Github).
As for setup… copy all the files to the (home assistant root)/homeassistant/components/
directory, including paths (i.e. light/elkm1.py
becomes (home assistant root)/homeassistant/components/light/elkm1.py
Once HASS is restarted, it should in theory grab the correct PyElk version that matches the version of ha-elkm1 you copied into the HASS components.
You’ll need to actually configure it though.
At minimum:
elkm1:
host: socket://1.2.3.4:2101
Where host can be either a TCP IP:port (as above) or a serial port (i.e. host: /dev/ttyUSB0
) if using a direct serial port connection instead of using M1-XEP / C1M1. Currently only supports “unsecure” port which is 2101 (if you’ve put it on another port some how, that’s fine, just specify it, but it doesn’t implement the “secure” communications mode)
You can further set optional settings to limit what devices get included/excluded, i.e.:
elkm1:
host: socket://1.2.3.4:2101
area:
exclude: 5-8
zone:
exclude: 35-98, 105-183
output:
include: 1-10
x10:
include: a1-a16
task:
include: 1-4
This would exclude areas 5-8 (including 1-4 by default), exclude zones 35-98 and 105-183 (including everything else in the default 1-208 range), include only outputs 1-10 (because 11-208 are not specified as included, they are excluded), include only x10 devices a1-16 (excluding b1-p16), and include only tasks 1-4 (excluding the rest).
you can specify both include and exclude for a given option, the logic is to start with the include list (if not specified, it defaults to all items of that type), then exclude those excluded (defaults to no exclusions). Additional types of ‘thermostat’ and ‘keypad’ should also work, they’re just not in the example. Areas coincide with the “alarm panel” control in HASS, one per detected (and included) area.
The whole point of all this inclusion/exclusion nonsense is to try and reduce the number of devices that get created in HASS (otherwise you might have for example, 208 outputs, and corresponding toggle switches in the HASS GUI in the default view, for example), as well as reduce the startup time by trying to skip as many unnecessary things as possible (though most of the time is spent waiting on the Elk to respond to requests for information during startup).