This script reads the statistics collected by the Loxone Miniserver and writes them to an InfluxDB instance.
- Python 3 with the following additional modules:
- Argcomplete (optional) :
pip3 install argcomplete
- InfluxDB-Python:
pip3 install influxdb
- Requests:
pip3 install requests
- terminaltables (optional):
pip3 install terminaltables
- Argcomplete (optional) :
- Loxone Miniserver
- InfluxDB
As this script can't guess which stats to import into which measurement and which tags to add as well as your shouldn't use default credentials, this script requires a small configuration file.
Just copy config.sample.json to config.json
and edit it to match your requirements.
The influxdb
and miniserver
configuration should be self explaining: It configures the connection to the InfluxDB and your Loxone Miniserver.
In the stats_map
you have to map each UUID of the statistics to a measurement and (optional) tags.
As you might not know the UUIDs of the stats, you can list all available statistics including their UUID and name. To do that just execute python3 import.py --list
.
Without any arguments, the script will start to import the statistics configured in the configuration file: Just execute python3 import.py