Mention connection issues in README
This commit is contained in:
parent
8569dd498a
commit
d2a4a9f886
10
README.md
10
README.md
|
@ -72,7 +72,15 @@ A first test run is as easy as:
|
||||||
python3 miflora-mqtt-daemon.py
|
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.
|
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:
|
The extensive output can be reduced to error messages:
|
||||||
|
|
||||||
```shell
|
```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).
|
**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
|
```shell
|
||||||
sudo cp /opt/miflora-mqtt-daemon/template.service /etc/systemd/system/miflora.service
|
sudo cp /opt/miflora-mqtt-daemon/template.service /etc/systemd/system/miflora.service
|
||||||
|
|
|
@ -98,7 +98,7 @@ for [name, mac] in config['Sensors'].items():
|
||||||
flora = dict()
|
flora = dict()
|
||||||
print('Adding sensor to device list and testing connection ...')
|
print('Adding sensor to device list and testing connection ...')
|
||||||
print('Name: "{}"'.format(name))
|
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 = MiFloraPoller(mac=mac, cache_timeout=miflora_cache_timeout, retries=9)
|
||||||
flora['poller'] = flora_poller
|
flora['poller'] = flora_poller
|
||||||
flora['mac'] = flora_poller._mac
|
flora['mac'] = flora_poller._mac
|
||||||
|
@ -121,7 +121,7 @@ for [name, mac] in config['Sensors'].items():
|
||||||
|
|
||||||
# Discovery Announcement
|
# Discovery Announcement
|
||||||
if reporting_mode == 'mqtt-json':
|
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()
|
flores_info = dict()
|
||||||
for [flora_name, flora] in flores.items():
|
for [flora_name, flora] in flores.items():
|
||||||
flora_info = {key: value for key, value in flora.items() if key not in ['poller']}
|
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
|
sleep(0.5) # some slack for the publish roundtrip and callback function
|
||||||
print()
|
print()
|
||||||
elif reporting_mode == 'mqtt-homie':
|
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('{}/{}/$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('{}/{}/$online'.format(base_topic, device_id), 'true', 1, True)
|
||||||
mqtt_client.publish('{}/{}/$name'.format(base_topic, device_id), device_id, 1, True)
|
mqtt_client.publish('{}/{}/$name'.format(base_topic, device_id), device_id, 1, True)
|
||||||
|
|
Loading…
Reference in New Issue