Skip to content

vi7/arduino-grower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

IoT environment control station

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

Requirements

IDE and Libraries

IDE: VSCode + PlatformIO IDE extension

Dependency libs are listed in the platformio.ini

Hardware

Hardware configuration

Drawn by hand schematic is here. It'll be eventually replaced by something more professional in the future.

Sofware configuration

Web client

Kubernetes / K8S

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}')"

[Obsolete] Deploy via Docker Compose

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

Monitoring

Prometheus metrics are available at the /metrics endpoint

Example Grafana dashboard: resources/grafana_dashboard.json

Development

Web client

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

Release process

  1. 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
  2. Run make release, this will tag the latest master with the release version and push to the upstream and then trigger CI jobs with compilation and web client Docker image release