ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼🥀🏡🌳
MIT License
606 stars 141 forks source link

# moisture over 100 procent IndexError: index out of range #144

Closed fhb closed 3 years ago

fhb commented 3 years ago

Hi, i just installed Mosquito and the miflora daemon, then added username and password for the mqtt daemon and three square Bluetooth temperature/humidity sensors. For every single one of them I get the following error:

openhabian@openhab:/opt/miflora-mqtt-daemon $ python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py

Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon

[2021-06-06 21:08:04] Connecting to MQTT broker ...
[2021-06-06 21:08:04] MQTT connection established

Adding sensor to device list and testing connection ...
Name:          "3DPrinterEnclosure"
Traceback (most recent call last):
  File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 206, in <module>
    flora_poller.fill_cache()
  File "/usr/local/lib/python3.7/dist-packages/miflora/miflora_poller.py", line 119, in fill_cache
    self._check_data()
  File "/usr/local/lib/python3.7/dist-packages/miflora/miflora_poller.py", line 204, in _check_data
    if self._cache[7] > 100:  # moisture over 100 procent
IndexError: index out of range
fhb commented 3 years ago

Overlooked that the sensors are not supported and the daemon is limited to only one type of sensor. Sorry.