I have managed to integrate my Kevo deadbolts into Hass using pykevoplus by cseelye. The only requirement is a Kevo deadbolt and a Kevo Plus bridge. The instructions below assume you are running Hass in a virtual environment on a RPi3. YMMV.
1. Install pykevoplus
$ sudo su -s /bin/bash hass
$ source /srv/hass/hass_venv/bin/activate
$ pip3 install pykevoplus
$ mkdir /home/hass/.homeassistant/kevo
$ cd /home/hass/.homeassistant/kevo
2. Get your Lock-IDs
$ python
>>> from pykevoplus import Kevo
>>> locks = Kevo.GetLocks("***USERNAME***", "***PASSWORD***")
>>> for lock in locks:
... print repr(lock)
...
Output
KevoLock(name=Front Door, id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, state=Locked)
3. Create the following files in /home/hass/.homeassistant/kevo
status-front.py
#!/usr/bin/python2.7.9
from pykevoplus import KevoLock
lock = KevoLock.FromLockID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "***USERNAME***", "***PASSWORD***")
print lock.GetBoltState()
lock-front.py
#!/usr/bin/python2.7.9
from pykevoplus import KevoLock
lock = KevoLock.FromLockID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "***USERNAME***", "***PASSWORD***")
lock.Lock()
print lock.GetBoltState()
unlock-front.py
#!/usr/bin/python2.7.9
from pykevoplus import KevoLock
lock = KevoLock.FromLockID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "***USERNAME***", "***PASSWORD***")
lock.Unlock()
print lock.GetBoltState()
4. Fix permissions
$ chmod 755 -R ./
5. Add the switch to your configuration.yaml
- platform: command_line
switches:
door_front:
command_on: "python /home/hass/.homeassistant/kevo/lock-front.py"
command_off: "python /home/hass/.homeassistant/kevo/unlock-front.py"
command_state: "python /home/hass/.homeassistant/kevo/status-front.py"
value_template: '{{ value == "Locked" }}'