Lolin (Wemos) D1 mini (ESP8266) environment control station.
Supports the following functionality:
- temperature and humidity monitoring
- light monitoring
- NTP time sync
- multiple power relay control
- automated actions based on the temperature and humidity
- automated actions based on schedules
- Prometheus compatible metrics
- REST API endpoints for the remote monitoring and control of the station
Table of contents
IDE: VSCode + PlatformIO IDE extension
Dependency libs are listed in the platformio.ini
- Wemos D1 mini or compatible clone (not recommended, genuine device is always better)
- HTU21D temp/humidity sensor
- Songle 230V relay switch
- Omron 230V 2 channel solid state relay
- LDR sensor
- 12V water pump (optional)
Drawn by hand schematic is here. It'll be eventually replaced by something more professional in the future.
Deployment: kubectl apply -f client/grower-ui.yaml
To get web client URL run: echo "http://$(kubectl get ingress grower-ui -ojsonpath='{.spec.rules[0].host}')"
Deploy web client container to the host defined in the .circleci/ci.env:
make client-deploy
Version of the client's Docker image will be by default taken from include/version.h. To override the version:
make APP_VERSION=x.y.z client-deploy
Prometheus metrics are available at the /metrics
endpoint
Example Grafana dashboard: resources/grafana_dashboard.json
Test the web client by building and running its Docker image locally:
make client-test
In case of successfull test container will be stopped and removed automatically
Build web client Docker image and run container locally without tests and automatic cleanup:
# After running 'make' web client will be available at http://localhost:8080
make client-run
To stop and remove local web client container:
make client-rm
- Set release version in the include/version.h, commit and push to
master
, unless version bump was already delivered as a part of your changeset - Run
make release
, this will tag the latestmaster
with the release version and push to the upstream and then trigger CI jobs with compilation and web client Docker image release