Open AnderssonPeter opened 6 years ago
Hey, I am not using docker on the RPi but please provide a Dockerfile if you build one. Shouldn't be too hard. I imagine a base image plus a set of RUN
instructions for what is already documented here: https://github.com/ThomDietrich/miflora-mqtt-daemon#installation
For Docker it is somehow disturbing that the app file (.py) and config.ini reside in the same directory. I made a change to allow for an additional config directory command line argument. Then, this could be stored in a permanent volume, whereas the code and its dependencies would be inside the container.
One I find out how to create a PR, I will do so.
Lars
Sounds reasonable. Let's make it a configurable config file argument though. Please send a PR our way ;)
Did so along with a fix for #39. This is my first PR ever and I am very excited ;-)
Please advice if this stuff works for you.
Lars
The Dockerfile works great on a RPi 3 (ARMv8), but not for a RPi 0 (ARMv6). Here's the error
Step 3/10 : RUN mkdir -p /usr/src/app
---> Running in bc5f5ed8eedf
ERROR: Service 'miflora-mqtt-daemon' failed to build: The command '/bin/sh -c mkdir -p /usr/src/app' returned a non-zero code: 139
I switched the image to FROM resin/raspberry-pi-python:3.6.1
and the Python call to CMD [ "python", "./miflora-mqtt-daemon.py", "--config_dir", "/config" ]
and it spins up.
@LarsAC would you like to create a tested PR for this change by @iicky
@iicky thanks!
Can do, will add a second Dockerfile for rpi.
Lars
Please consider PR #59, for arm32v6 (RPI 1, 2, 3 and Zero), arm32v7 (RPI 1, 2, 3) and arm64v8 (pine64) support.
Ray
:+1: can we also get this into the hassio addons repository? its possible to scrape miflora sensors from hass directly, but the units & names in the miflora component do not align with the units/names created with this daemon. I'd prefer to just use this tool everywhere and turn off the miflora component completely.
Any chance you could create a docker container for raspberry pi 3?