diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-19 09:27:24 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-19 09:27:24 +0200 |
commit | 4e76691169f98e34cab41a95c97a681f551a6c79 (patch) | |
tree | f461aaf593eef3048cd5c707bf6e5e4916802f65 /README.md | |
parent | 7d37e1488badeeab557b14eaf32f157ceaa00795 (diff) |
Support InfluxDB-only operationmain
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -55,25 +55,19 @@ end ## Application Example -**init.lua** is an example application with HomeAssistant integration. It uses -oversampling to smoothen readings, and only reports the average of every group -of ten readings. To use it, you need to create a **config.lua** file with WiFI -and MQTT settings: +**init.lua** is an example application with optional HomeAssistant and InfluxDB integration. +It uses oversampling to smoothen readings, and only reports the average of every group of ten readings. +To use it, you need to create a **config.lua** file with WiFI and MQTT/InfluxDB settings: ```lua station_cfg = {ssid = "...", pwd = "..."} mqtt_host = "..." -``` - -Optionally, it can also publish readings to InfluxDB. -To do so, configure URL and attribute: - -```lua influx_url = "..." influx_attr = "..." ``` -Readings will be published as `vindriktning[influx_attr] pm2_5_ugm3=%d.%01d`. +Both `mqtt_host` and `influx_url` are optional, though it does not make much sense to specify neither. +InfluxDB readings will be published as `vindriktning[influx_attr] pm2_5_ugm3=%d.%01d`. So, unless `influx_attr = ''`, it must start with a comma, e.g. `influx_attr = ',device=' .. device_id`. ## Resources |