diff --git a/Dockerfile-rpi b/Dockerfile-rpi new file mode 100644 index 0000000..102cf06 --- /dev/null +++ b/Dockerfile-rpi @@ -0,0 +1,11 @@ +FROM alpine-python:latest + +ENV LIBRARY_PATH=/lib:/usr/lib + +ADD src/requirements.txt / +RUN pip install --upgrade pip && pip install -r /requirements.txt + +WORKDIR /app +COPY src /app + +CMD ["python3", "-u", "/app/main.py"] diff --git a/docker-compose.yaml b/docker-compose.yaml index ff75178..6c55f82 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,6 @@ aqara: build: . - dockerfile: Dockerfile-i386 + dockerfile: Dockerfile-rpi container_name: aqara volumes: - "./config:/app/config" diff --git a/src/xiaomihub.py b/src/xiaomihub.py index 8a72e9c..2745a8b 100644 --- a/src/xiaomihub.py +++ b/src/xiaomihub.py @@ -79,7 +79,7 @@ class XiaomiHub: _LOGGER.info('Found {0} devices'.format(len(sids))) - sensors = ['sensor_ht'] + sensors = ['sensor_ht', 'sensor_wleak.aq1'] binary_sensors = ['magnet', 'motion', 'switch', '86sw1', '86sw2', 'cube'] switches = ['plug', 'ctrl_neutral1', 'ctrl_neutral2'] @@ -104,6 +104,8 @@ class XiaomiHub: device_type = 'binary_sensor' elif model in switches: device_type = 'switch' + else: + device_type = 'sensor' #not really matters if device_type == None: _LOGGER.error('Unsupported devices : {0}'.format(model))