Closed Giel538 closed 4 years ago
According to the Instruction (https://github.com/ThomDietrich/miflora-mqtt-daemon#usage-with-docker) your path is wrong.
The config.ini
inside the container is located in /config
.
So you line should look like this, I guess.
- /data/miflora2mqtt/config.ini:/config/config.ini
Thanks @CWempe. @Giel538 hope it works now. Would you like to provide your docker-compose.yml and please feel free to suggest a change to the README to remove this issue for others.
This is my docker file now:
version: '3.6'
services:
portainer:
image: ruimarinho/miflora-mqtt
container_name: "miflora-mqtt"
restart: "always"
network_mode: host
volumes:
- /etc/localtime:/etc/localtime:ro
- /data/miflora2mqtt/config.ini:/config/config.ini
environment:
- TZ=Europe/Amsterdam
Still the same problem :(
Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon
[2020-02-18 20:12:34] No sensors found in configuration file "config.ini
Did you try without the underscore?
Flower1 = C4:7C:8D:6A:74:7F
Flower2 = C4:7C:8D:6A:74:23
Flower3 = C4:7C:8D:6B:1A:70
Just a guess... π€·ββ
I tried now, but still not working.
I also changed my docker volume line to:
So it is pointing to the directory config insted of config.ini directly.
Is there anyway to find out of it is a problem in the missing file or a wrong configured config.ini?
I would try to start the container witout the file or with a wrong path. So you know if you get another error like "config file not found" instead of "No sensors found".
And you could replace your file with the example to see if you get something like "cannot connect to sensor".
Just a little troubleshooting. π€
Agree with @CWempe doing a bit of troubleshooting should bring you a long way. Let us know when you can rule out things.
That said, I checked the source code and there is indeed no explicit check to make sure the file exists. That is definitely something to improve! PR welcome.
Besides that: Seems like way back I decided to fall back to the config.ini.dist
file when the user one wasn't found. This doesn't seem utterly meaningful now and we should change this behavior with the PR.
If i deleted my local config folder it will be recreated. I place the config.ini file inside here. I also tried to delete everything except my 3 flower sensor. I tried with only flower. Nothing works.
I removed the volume line and added this to my docker file:
environment:
- MIFLORA_MQTT_HOSTNAME=192.168.1.188
- MIFLORA_SENSORS_0_Schefflera@Kitchen=C4:7C:8D:6B:1A:70
But still the same error.
Hey, were you able to identify the cause of this error? Let us know and I'll work on a mitigation or improvement of the documentation ;)
Hi.
I'm trying to run the mqtt-daemon in docker.
Everything installed fine but when i run the docker i keep getting this error:
[2020-02-14 15:08:27] No sensors found in configuration file "config.ini"
In my docker compose file i have this line:
So the config is stored in opt/miflora-mqtt-daemon/config.ini. When i copy this file back from the docker to my local hard drive i see the right config.ini In this file i have this:
Do you have any idea what i can try?