diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-04 22:31:09 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-04 22:31:09 +0200 |
commit | 3faffa986bc20144ab34cda92190244807b3cdd3 (patch) | |
tree | 58ce5a333574e76f30b22a22a397192582abc510 /init.lua | |
parent | e8ebebbc0b0f5cbe1914fdf6e5582b70cd56d4e6 (diff) |
JSON: encode co2_ppm as number, not string
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -63,7 +63,7 @@ function uart_callback(data) return end - local json_str = string.format('{"rssi_dbm":%d,"co2_ppm":"%d","temperature_celsius":%d}', wifi.sta.getrssi(), mh_z19.co2, mh_z19.temp) + local json_str = string.format('{"rssi_dbm":%d,"co2_ppm":%d,"temperature_celsius":%d}', wifi.sta.getrssi(), mh_z19.co2, mh_z19.temp) local influx_str = string.format("co2_ppm=%d,temperature_celsius=%d,abc_ticks=%d,abc_count=%d", mh_z19.co2, mh_z19.temp, mh_z19.abc_ticks, mh_z19.abc_count) if not publishing_mqtt then |