hass-core/scripts/dev_docker
Paulus Schoutsen 9c61c281ca Working zwave!
Open docker, go to /usr/src/balloob-python-openzwave/examples, run
python3 api_demo.py --device=/zwaveusbstick --log=Debug
2015-02-28 20:27:42 -08:00

32 lines
674 B
Text
Executable file

# Optional: pass in a timezone as first argument
# If not given will attempt to mount /etc/localtime
# If current pwd is scripts, go 1 up.
if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
docker build -t home-assistant-dev .
# TODO set device via command line, remove /bin/bash
if [ $# -gt 0 ]
then
docker run \
--net=host \
--device=/dev/ttyUSB0:/zwaveusbstick:rwm \
-e "TZ=$1" \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev \
/bin/bash
else
docker run \
--net=host \
-v /etc/localtime:/etc/localtime:ro \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev
fi