Telldus core (#201)

* Added telldus-core daemon module

Proof of concept to compile and install telldus-core as an addon. Needs more fixes to be able to communicate with python script in hassio docker.

* Revert "Added telldus-core daemon module"

This reverts commit 79c8e35b8379bed41bcf5e47923b2946525d2a2a.

* Added telldus-core add-on, proof of concept

Add-on will compile and install telldus-core as an add-on.

Tested to work with hardware.
Need more fixes in order for communication with homeassistant container to work.

* Updated with tellstick.conf check after installation

Secure that we have at least a basic tellstick.conf file. This will also allow user to migrate existing tellstick.conf file in to config without risking to have it overwritten.

* Altered exec to use --nodaemon

Using --nodaemon keeps the docker, daemon and add-on active, running just telldusd ends the docker unexpectedly.

* Updated build method to match the one in hass.io docker

Now using bjornes fork of telldus homeassistant-alpine as the source and thus sharing the same source as being used in the homeassistant docker.

* Update Dockerfile

* Compile telldus master branch rather than fork

Instead of using forked static code, apply small fixes to enable compilation on alpine.

* Removed search - replace of userid in tellstick.conf

Moved in to dockerfile

* Update run.sh

* Update Dockerfile

* Update config.json

* Update Dockerfile

* Rename telldus_core/Dockerfile to tellstick/Dockerfile

* Rename telldus_core/run.sh to tellstick/run.sh

* Rename telldus_core/config.json to tellstick/config.json

* Update config.json

* Update Dockerfile

* Update Dockerfile

* Update config.json

* Update run.sh

* Update run.sh

* Update config.json

* Update run.sh

* fix lint

* Update run.sh

* Update run.sh

* Update config.json

* Update Dockerfile

* Update Dockerfile

* fix lint

* Update Dockerfile

* Update run.sh

Altered some details for successful parsing of options into tellstick.conf.

* Update run.sh

* Update config.json

* Update config.json

Added example device to support the users getting started with configuration..
This commit is contained in:
endor-force
2017-11-24 21:58:28 +01:00
committed by Pascal Vizeli
parent 543a592afc
commit aa02ebf3b9
3 changed files with 130 additions and 0 deletions

27
tellstick/Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
# Install Telldus library for TellStick (using same approach as in hassio docker installation)
RUN apk add --no-cache \
confuse libftdi1 libstdc++ jq socat \
&& apk add --no-cache --virtual .build-dependencies \
cmake build-base gcc doxygen confuse-dev argp-standalone libftdi1-dev git \
&& ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h \
&& mkdir -p /usr/src \
&& cd /usr/src \
&& git clone -b master --depth 1 https://github.com/telldus/telldus \
&& cd telldus/telldus-core \
&& sed -i "/\<sys\/socket.h\>/a \#include \<sys\/select.h\>" common/Socket_unix.cpp \
&& cmake . -DBUILD_LIBTELLDUS-CORE=ON -DBUILD_TDADMIN=OFF -DBUILD_TDTOOL=ON -DGENERATE_MAN=OFF -DFORCE_COMPILE_FROM_TRUNK=ON -DFTDI_LIBRARY=/usr/lib/libftdi1.so \
&& make \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/telldus
# Copy data for add-on
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]