[light.tradfri] async support with resource observation. (#7815)

* [light.tradfri] Initial support for observe

* Update for pytradfri 2.0

* Fix imports

* Fix missing call

* Don't yield from add devices

* Fix imports

* Minor fixes to async code.

* Imports, formatting

* Docker updates, some minor async code changes.

* Lint

* Lint

* Update pytradfri

* Minor updates for release version

* Build fixes

* Retry observation if failed

* Revert

* Additional logging, fix returns

* Fix rename

* Bump version

* Bump version

* Support transitions

* Lint

* Fix transitions

* Update Dockerfile

* Set temp first

* Observation error handling

* Lint

* Lint

* Lint

* Merge upstream changes

* Fix bugs

* Fix bugs

* Fix bugs

* Lint

* Add sensor

* Add sensor

* Move sensor attrs

* Filter devices better

* Lint

* Address comments

* Pin aiocoap

* Fix bug if no devices

* Requirements
This commit is contained in:
Lewis Juggins authored and Paulus Schoutsen committed 2017-10-05 09:05:38 -07:00
1 parent 89042439b8
commit 8db4641455
9 files changed
+336 -91

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_COAP no
#ENV INSTALL_SSOCR no
VOLUME /config
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# Installs a modified coap client with support for dtls for use with IKEA Tradfri
# Stop on errors
set -e
python3 -m pip install cython
cd /usr/src/app/
mkdir -p build && cd build
git clone --depth 1 https://git.fslab.de/jkonra2m/tinydtls
cd tinydtls
autoreconf
./configure --with-ecc --without-debug
cd cython
python3 setup.py install
cd ../..
git clone --depth 1 https://github.com/chrysn/aiocoap/
cd aiocoap
git reset --hard 0df6a1e44582de99ae944b6a7536d08e2a612e8f
python3 -m pip install .
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh
# Installs a modified coap client with support for dtls for use with IKEA Tradfri
# Stop on errors
set -e
apt-get install -y --no-install-recommends git autoconf automake libtool
cd /usr/src/app/
mkdir -p build && cd build
git clone --depth 1 --recursive -b dtls https://github.com/home-assistant/libcoap.git
cd libcoap
./autogen.sh
./configure --disable-documentation --disable-shared --without-debug CFLAGS="-D COAP_DEBUG_FD=stderr"
make
make install
+3 -3
View File
@@ -9,7 +9,7 @@ INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
INSTALL_FFMPEG="${INSTALL_FFMPEG:-yes}"
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
INSTALL_PHANTOMJS="${INSTALL_PHANTOMJS:-yes}"
INSTALL_COAP_CLIENT="${INSTALL_COAP_CLIENT:-yes}"
INSTALL_COAP="${INSTALL_COAP:-yes}"
INSTALL_SSOCR="${INSTALL_SSOCR:-yes}"
# Required debian packages for running hass or components
@@ -59,8 +59,8 @@ if [ "$INSTALL_PHANTOMJS" == "yes" ]; then
virtualization/Docker/scripts/phantomjs
fi
if [ "$INSTALL_COAP_CLIENT" == "yes" ]; then
virtualization/Docker/scripts/coap_client
if [ "$INSTALL_COAP" == "yes" ]; then
virtualization/Docker/scripts/aiocoap
fi
if [ "$INSTALL_SSOCR" == "yes" ]; then