Devops tools to monitor polytunnel

Devops tools to monitor polytunnel

Robert Oroszi
github.com/oroce
@oroce

Who am i

  • currently doing node and devops
  • previously done frontend too
  • ...worked on a dental practice management software and fall in love with hardware

...back to polytunnel

polytunnel part

  • growing cucumber
  • in polytunnel
  • about 1000 square meter (m2)
  • with heating option

Cucumber

devops part

  • monitoring CPU temperature
  • getting alerted by unusual metrics (something is down, temperature is too high etc)
  • historical and realtime visualization
  • (also you develop stuff and deploy as well)

how what about to

  • monitor temperature in polytunnel
  • getting alerted if temperature drops below 10 degrees
  • making decision making process better by historical and realtime visualization

how to get started

software part is easy, what about the hardware

  • measure temperature
  • measure humidity
  • send data to a remote server

Raspberry pi

what about the sensor?

my first thought was arduino, but

  • you have to buy the temperature, humidity sensor separately
  • you have to write code to make it work
  • need to find out how to transfer data from arduino to Raspberry pi

Sensortag

Sensortag

  • multiple sensors (humidity, temperature, pressure, gyroscope, accelerometer, magnetometer)
  • uses Bluetooth 4
  • it works out of the box

Current architecture

Current architecture

  1. Raspberry PI reads sensor data
  2. RPI sends data to a remote server
  3. Server stores in db

The remote side

The remote side

  • influxdb
  • grafana
  • Riemann
    actually it's not riemann but the node.js port: godot

The future

The future

  • better battery life (currently ~2 weeks)
  • multiple sensors
  • move away from wifi, use cable
  • alerting

Future architecture

Alerting

  • humidity is too high:
    
    IF humidity > 90 for 2 hours THEN notify
    						
  • heating is broken:
    
    IF external_temperature < 10 AND temperature < 15 for 30 minutes THEN notify
    						

Alerting

  • plug into pagerduty
  • detect low battery level
  • detect broken sensor
  • detect internet connection problems

Final thoughts

Open source is amazing, you can build anything you want. I've used open source softwares to build this. What I had to is just put together the lego bricks

Thank you people for making these awesome open source stuffs. YOU ARE AWESOME

Of course this is open source as well: https://github.com/oroce/sensortag-with-godot

Questions?