summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-01-07 14:24:47 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-07 14:24:47 +0100
commit3c8a52e9df6bbd08c1d66064ffdb2b51d883b2a2 (patch)
tree2dc56bb412bc8ddfab8b3096dec21bd8356c8614
parentb34c6af392d9864dafd96fcb29da741da8959278 (diff)
README: Add configuration section
-rw-r--r--README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/README.md b/README.md
index bbd353c..8393c84 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,44 @@ There is also OpenSCAD source code for 3D-printing a case – however, as I reli
* Power Supply: AliExpress TP4056 charge controller + BMS board; 2.5V cutoff
* Battery: Regular 18650 LiIon cell; LiPo also works
+## Configuration
+
+WiFi and InfluxDB configuration is read from `src/config.lua`.
+You will need the following entries.
+
+### WiFi
+
+The application takes a list of WiFi networks and tries to connect to them in
+order, waiting a few minutes between connection attempts. Configure them
+like so:
+
+```lua
+station_cfgs[1] = {ssid = "home network", pwd = "swordfish"}
+station_cfgs[2] = {ssid = "37C3-open" }
+```
+
+### InfluxDB
+
+These settings are optional. Specify a URL and attributes in order to enable
+InfluxDB publishing. For instance, if measurements should be stored as
+`mh_z19,location=lounge` in the `sensors` database on
+`http://influxdb.example.org`, the configuration is as follows.
+
+```lua
+influx_url = 'http://influxdb.example.org/write?db=sensors'
+influx_attr = ',location=lounge'
+```
+
+You can also use the `esp8266_XXXXXX` device id here, like so:
+
+```lua
+influx_url = 'http://influxdb.example.org/write?db=sensors'
+influx_attr = ',location=' .. device_id
+```
+
+Optionally, you can set `influx_header` to an HTTP header that is passed as
+part of the POST request to InfluxDB.
+
## Images
![](https://finalrewind.org/projects/mobile-co2-monitor/media/preview.jpg)