diff --git a/README.md b/README.md index 49c516d..95358c6 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,15 @@ A first test run is as easy as: python3 miflora-mqtt-daemon.py ``` +**⚠️️ Attention: +Please ensure a good communication link to all Mi Floras. +The daemon will currently retry connection to a non-responsive sensor for longer time periodes, which will limit the overall usefulness of the application. +To evaluate connection reliability execute the programm in from the command line at least once and pay attention to reported communication problems. +This problem will be solved in a future version of miflora-mqtt-daemon.** + With a correct configuration the result should look similar to the the screencap above. +Pay attention to communication errors due to distance related weak BLE connections. + The extensive output can be reduced to error messages: ```shell @@ -86,7 +94,7 @@ This can be done either by using the internal daemon or cron. **Attention:** Daemon mode must be enabled in the configuration file (default). -1. Systemd service - on systemd powered systems the recommended option +1. Systemd service - on systemd powered systems the **recommended** option ```shell sudo cp /opt/miflora-mqtt-daemon/template.service /etc/systemd/system/miflora.service diff --git a/miflora-mqtt-daemon.py b/miflora-mqtt-daemon.py index 5cdf040..118052c 100755 --- a/miflora-mqtt-daemon.py +++ b/miflora-mqtt-daemon.py @@ -98,7 +98,7 @@ for [name, mac] in config['Sensors'].items(): flora = dict() print('Adding sensor to device list and testing connection ...') print('Name: "{}"'.format(name)) - sd_notifier.notify('STATUS=Attempting initial connection to MiFlora sensor "{}" ({})'.format(name, mac)) + sd_notifier.notify('STATUS=Attempting initial connection to Mi Flora sensor "{}" ({})'.format(name, mac)) flora_poller = MiFloraPoller(mac=mac, cache_timeout=miflora_cache_timeout, retries=9) flora['poller'] = flora_poller flora['mac'] = flora_poller._mac @@ -121,7 +121,7 @@ for [name, mac] in config['Sensors'].items(): # Discovery Announcement if reporting_mode == 'mqtt-json': - print('Announcing MiFlora devices to MQTT broker for auto-discovery ...') + print('Announcing Mi Flora devices to MQTT broker for auto-discovery ...') flores_info = dict() for [flora_name, flora] in flores.items(): flora_info = {key: value for key, value in flora.items() if key not in ['poller']} @@ -131,7 +131,7 @@ if reporting_mode == 'mqtt-json': sleep(0.5) # some slack for the publish roundtrip and callback function print() elif reporting_mode == 'mqtt-homie': - print('Announcing MiFlora devices to MQTT broker for auto-discovery ...') + print('Announcing Mi Flora devices to MQTT broker for auto-discovery ...') mqtt_client.publish('{}/{}/$homie'.format(base_topic, device_id), '2.1.0-alpha', 1, True) mqtt_client.publish('{}/{}/$online'.format(base_topic, device_id), 'true', 1, True) mqtt_client.publish('{}/{}/$name'.format(base_topic, device_id), device_id, 1, True)