Using a Particle Photon to monitor the use of our little free library. A magnetic contact sensor on the door triggers the Photon to send updated via MQTT to a Home Assistant service. Photos of Setup
The libs are imported via git submodules, after checking populate them via:
git submodule init
git submodule update
Copy credentials.h.SAMPLE
to credentials.h
and update the constants for your environment. Initial flash and testing
should set MQTT_TESTING
to true to avoid polluting Home Assistant with incorrect sensors.
Use the Particle CLI particle compile photon
or
Particle Workbench.