diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f80eb7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Local WiFi credentials (see Fetch_rain/secrets.h.example) +secrets.h diff --git a/Fetch_rain/secrets.h.example b/Fetch_rain/secrets.h.example new file mode 100644 index 0000000..7df191a --- /dev/null +++ b/Fetch_rain/secrets.h.example @@ -0,0 +1,11 @@ +// Copy this file to secrets.h and fill in your own credentials. +// secrets.h is listed in .gitignore and must never be committed. +#pragma once + +const char* WIFI_SSID = "your-wifi-name"; +const char* WIFI_PASSWORD = "your-wifi-password"; + +// ThingHTTP API keys, one per scheduled channel (today/tmrw/aftmrw). +const char* THINGHTTP_KEY_TODAY = "your-thinghttp-api-key"; +const char* THINGHTTP_KEY_TMRW = "your-thinghttp-api-key"; +const char* THINGHTTP_KEY_AFTMRW = "your-thinghttp-api-key"; diff --git a/README.md b/README.md index 35f7b7c..742dbb8 100644 --- a/README.md +++ b/README.md @@ -1 +1,21 @@ https://youtu.be/7n7HcTeeHdM + +## Configuration + +The WiFi credentials are **not** stored in the repository. The sketch +`Fetch_rain/Fetch_rain.ino` includes a non-versioned header `secrets.h` +that defines `WIFI_SSID` and `WIFI_PASSWORD`: + +```bash +cp Fetch_rain/secrets.h.example Fetch_rain/secrets.h +# edit Fetch_rain/secrets.h with your own network name and password +``` + +`secrets.h` is listed in `.gitignore`, so it is never committed. The +sketch does not compile without it. If the old password was ever +pushed, change it on the router as well as in `secrets.h`. + +`secrets.h` also defines the three ThingHTTP API keys used by the daily +scheduled channels (`THINGHTTP_KEY_TODAY`, `THINGHTTP_KEY_TMRW`, +`THINGHTTP_KEY_AFTMRW`). They used to be hard-coded in the sketch; the old +values were committed, so they must be regenerated in ThingHTTP.