-
Notifications
You must be signed in to change notification settings - Fork 3
/
secrets.lua.example
18 lines (14 loc) · 1.5 KB
/
secrets.lua.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- Brew Bot Example Configuration
-- Copy this file, rename it to secrets.lua, and fill in your settings below.
-- Your Wifi SSID and Password
ssid = "my_super_ap"
ssid_password = "secret wifi password"
-- Your InfluxDB server and credentials
influxdb_post_url = "http://myinfluxdbserver:8086/write?db=my_database"
influxdb_auth_header = "Authorization: Basic XXXYYYZZZ==\r\n" -- Get this from running `curl -v -u myusername:password http://myserver`
-- InfluxDB queries
influxdb_14day_get_url = "http://myinfluxdbserver:8086/query?db=iot_sensors&q=SELECT%20percentile%28value%2C%2095%29%20FROM%20co2_concentration%20WHERE%20time%20%3E%20now%28%29%20-%2014d%20GROUP%20BY%20time%284h%29%20fill%280%29%20LIMIT%2016"
influxdb_7day_get_url = "http://myinfluxdbserver:8086/query?db=iot_sensors&q=SELECT%20percentile%28value%2C%2095%29%20FROM%20co2_concentration%20WHERE%20time%20%3E%20now%28%29%20-%207d%20GROUP%20BY%20time%28105m%29%20fill%280%29%20LIMIT%2016"
influxdb_24hour_get_url = "http://myinfluxdbserver:8086/query?db=iot_sensors&q=SELECT%20percentile%28value%2C%2095%29%20FROM%20co2_concentration%20WHERE%20time%20%3E%20now%28%29%20-%2024h%20GROUP%20BY%20time%2815m%29%20fill%280%29%20LIMIT%2016"
-- To get the GET URL string, use somethng like this: (check the headers printed by CURL)
-- curl -G "http://myinfluxdbserver:8086/query?pretty=true" --data-urlencode "db=my_db" --data-urlencode "q=SELECT percentile(value, 95) FROM co2_concentration WHERE time > now() - 7d GROUP BY time(4h) fill(0)" -u myusername:mypassword -v