IoT light sensor app. Light state is sent to a rest endpoint which saves it to Google Cloud Monitoring.
I use this to monitor the light at my mom's house so I know if she's ok.
The app consists of 2 parts located in src/:
- esp8266_monitor. This is the sender built on ESP8266.
- http_iot_streamer. HTTP REST web service storing the data in Google Cloud Monitoring.
- Copy
config.h.exampletoconfig.hand edit all values marked withCHANGEME. - https://github.com/plerup/makeEspArduino
make
make flash
- Service account named
svc-http-iot-streamer. - Copy
.env.yaml.exampleto.env.yamland edit the corresponding values. File is located insrc/http_iot_streamer/.
./scripts/deploy.sh
This will send a test payload to the deployed service:
./scripts/test.sh