Get Z-Wave sensors to work with Home Assistant

This commit is contained in:
Paulus Schoutsen
2015-02-22 17:36:28 -08:00
parent 7f7a1f2740
commit a013ccf806
8 changed files with 314 additions and 43 deletions
+28
View File
@@ -0,0 +1,28 @@
# Sets up and builds python open zwave to be used with Home Assistant
# Dependencies that need to be installed:
# apt-get install cython3 libudev-dev python-sphinx python3-setuptools mercurial
# pip3 install cython
# If current pwd is scripts, go 1 up.
if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
cd ..
# We need to install louie here or else python-openzwave install
# will download louie from PIP and that one is not compatible with Python 3
git clone https://github.com/balloob/louie.git
cd louie
python setup.py install
cd ..
hg clone https://code.google.com/r/balloob-python-openzwave/
cd balloob-python-openzwave
./update.sh
# Fix an issue with openzwave
sed -i '253s/.*//' openzwave/cpp/src/value_classes/ValueID.h
./compile.sh
./install.sh
+3 -4
View File
@@ -1,3 +1,5 @@
# Build and run Home Assinstant in Docker
# Optional: pass in a timezone as first argument
# If not given will attempt to mount /etc/localtime
@@ -8,8 +10,6 @@ fi
docker build -t home-assistant-dev .
# TODO set device via command line, remove /bin/bash
if [ $# -gt 0 ]
then
docker run \
@@ -18,8 +18,7 @@ then
-e "TZ=$1" \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev \
/bin/bash
-t -i home-assistant-dev
else
docker run \
+18
View File
@@ -0,0 +1,18 @@
# Open a docker that can be used to debug/dev python-openzwave
# Pass in a command line argument to skip build
# If current pwd is scripts, go 1 up.
if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
if [ $# -gt 0 ]
then
docker build -t home-assistant-dev .
fi
docker run \
--device=/dev/ttyUSB0:/zwaveusbstick:rwm \
-v `pwd`:/usr/src/app \
-t -i home-assistant-dev \
/bin/bash