[tradfri] Update pytradfri, simplify dependencies. (#9875)
* Update pytradfri * Process dep links * Process dep links * Process dep links * Install all deps * Update requirements * Exclude aiocoap * Install cython * Remove cython * Exclude DTLSSocket * Add cythonpull/9969/head
parent
9722125234
commit
d9f5398c56
|
@ -11,10 +11,8 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
|
|||
#ENV INSTALL_FFMPEG no
|
||||
#ENV INSTALL_LIBCEC no
|
||||
#ENV INSTALL_PHANTOMJS no
|
||||
#ENV INSTALL_COAP no
|
||||
#ENV INSTALL_SSOCR no
|
||||
|
||||
|
||||
VOLUME /config
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
|
@ -26,10 +24,10 @@ RUN virtualization/Docker/setup_docker_prereqs
|
|||
|
||||
# Install hass component dependencies
|
||||
COPY requirements_all.txt requirements_all.txt
|
||||
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
|
||||
# Uninstall enum34 because some dependencies install it but breaks Python 3.4+.
|
||||
# See PR #8103 for more info.
|
||||
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
|
||||
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet
|
||||
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet cython
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
|
|
@ -40,7 +40,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||
|
||||
devices_command = gateway.get_devices()
|
||||
devices_commands = yield from api(devices_command)
|
||||
devices = yield from api(*devices_commands)
|
||||
devices = yield from api(devices_commands)
|
||||
lights = [dev for dev in devices if dev.has_light_control]
|
||||
if lights:
|
||||
async_add_devices(TradfriLight(light, api) for light in lights)
|
||||
|
@ -49,7 +49,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||
if allow_tradfri_groups:
|
||||
groups_command = gateway.get_groups()
|
||||
groups_commands = yield from api(groups_command)
|
||||
groups = yield from api(*groups_commands)
|
||||
groups = yield from api(groups_commands)
|
||||
if groups:
|
||||
async_add_devices(TradfriGroup(group, api) for group in groups)
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||
|
||||
devices_command = gateway.get_devices()
|
||||
devices_commands = yield from api(devices_command)
|
||||
all_devices = yield from api(*devices_commands)
|
||||
all_devices = yield from api(devices_commands)
|
||||
devices = [dev for dev in all_devices if not dev.has_light_control]
|
||||
async_add_devices(TradfriDevice(device, api) for device in devices)
|
||||
|
||||
|
|
|
@ -16,7 +16,11 @@ from homeassistant.helpers import discovery
|
|||
from homeassistant.const import CONF_HOST, CONF_API_KEY
|
||||
from homeassistant.components.discovery import SERVICE_IKEA_TRADFRI
|
||||
|
||||
REQUIREMENTS = ['pytradfri==2.2.2']
|
||||
REQUIREMENTS = ['pytradfri==3.0',
|
||||
'DTLSSocket==0.1.3',
|
||||
'https://github.com/chrysn/aiocoap/archive/'
|
||||
'3286f48f0b949901c8b5c04c0719dc54ab63d431.zip'
|
||||
'#aiocoap==0.3']
|
||||
|
||||
DOMAIN = 'tradfri'
|
||||
CONFIG_FILE = 'tradfri.conf'
|
||||
|
|
|
@ -18,6 +18,9 @@ certifi>=2017.4.17
|
|||
# homeassistant.components.bbb_gpio
|
||||
# Adafruit_BBIO==1.0.0
|
||||
|
||||
# homeassistant.components.tradfri
|
||||
# DTLSSocket==0.1.3
|
||||
|
||||
# homeassistant.components.doorbird
|
||||
DoorBirdPy==0.0.4
|
||||
|
||||
|
@ -324,6 +327,9 @@ http://github.com/tgaugry/suds-passworddigest-py3/archive/86fc50e39b4d2b89974819
|
|||
# homeassistant.components.media_player.braviatv
|
||||
https://github.com/aparraga/braviarc/archive/0.3.7.zip#braviarc==0.3.7
|
||||
|
||||
# homeassistant.components.tradfri
|
||||
# https://github.com/chrysn/aiocoap/archive/3286f48f0b949901c8b5c04c0719dc54ab63d431.zip#aiocoap==0.3
|
||||
|
||||
# homeassistant.components.media_player.spotify
|
||||
https://github.com/happyleavesaoc/spotipy/archive/544614f4b1d508201d363e84e871f86c90aa26b2.zip#spotipy==2.4.4
|
||||
|
||||
|
@ -843,7 +849,7 @@ pythonegardia==1.0.22
|
|||
pytrackr==0.0.5
|
||||
|
||||
# homeassistant.components.tradfri
|
||||
pytradfri==2.2.2
|
||||
pytradfri==3.0
|
||||
|
||||
# homeassistant.components.device_tracker.unifi
|
||||
pyunifi==2.13
|
||||
|
|
|
@ -30,7 +30,9 @@ COMMENT_REQUIREMENTS = (
|
|||
'smbus-cffi',
|
||||
'envirophat',
|
||||
'i2csense',
|
||||
'credstash'
|
||||
'credstash',
|
||||
'aiocoap', # Temp, will be removed when Python 3.4 is no longer supported.
|
||||
'DTLSSocket' # Requires cython.
|
||||
)
|
||||
|
||||
TEST_REQUIREMENTS = (
|
||||
|
|
|
@ -26,10 +26,10 @@ RUN virtualization/Docker/setup_docker_prereqs
|
|||
# Install hass component dependencies
|
||||
COPY requirements_all.txt requirements_all.txt
|
||||
|
||||
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
|
||||
# Uninstall enum34 because some dependencies install it but breaks Python 3.4+.
|
||||
# See PR #8103 for more info.
|
||||
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
|
||||
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet
|
||||
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet cython
|
||||
|
||||
# BEGIN: Development additions
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#!/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 https://github.com/chrysn/aiocoap
|
||||
cd aiocoap
|
||||
git reset --hard 3286f48f0b949901c8b5c04c0719dc54ab63d431
|
||||
python3 -m pip install .
|
|
@ -9,7 +9,6 @@ INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
|
|||
INSTALL_FFMPEG="${INSTALL_FFMPEG:-yes}"
|
||||
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
|
||||
INSTALL_PHANTOMJS="${INSTALL_PHANTOMJS:-yes}"
|
||||
INSTALL_COAP="${INSTALL_COAP:-yes}"
|
||||
INSTALL_SSOCR="${INSTALL_SSOCR:-yes}"
|
||||
|
||||
# Required debian packages for running hass or components
|
||||
|
@ -59,10 +58,6 @@ if [ "$INSTALL_PHANTOMJS" == "yes" ]; then
|
|||
virtualization/Docker/scripts/phantomjs
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_COAP" == "yes" ]; then
|
||||
virtualization/Docker/scripts/aiocoap
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_SSOCR" == "yes" ]; then
|
||||
virtualization/Docker/scripts/ssocr
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue