Skip to content

zengenti/envirozen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envirozen

Environmental monitoring and control of a room

Temperature Control for Server Room

This project was initiated using an Arduino to regulate the server room's temperature. It employs two 1.5Kw fans to introduce external ambient air into the room whenever the temperature falls below the (MAX3) threshold. This process creates a positive pressure inside the room, expelling warmer air through specialized vents. The primary objective is to conserve energy on cooler days by leveraging the ambient air, reducing the reliance on air conditioning units when they're not necessary.

As of October 2023 this will developed into Python for deployment onto a more powerful Rasberry Pi

Started: October 2022
Reason: Before the cost of electricity started to rise
Author: Nic Kilby

Component List

Raspberry Pi 4 or better for the central controller

Enviro Indoor (Pico W Aboard) – Enviro Indoor + Accessory Kit x number of areas to monitor

Weatherproof Cover/Enclosure for Outdoor Sensors

Fan 1.5Kw x 2

TUNE-S-600x600-M1 Mechanical damper with M1 Actuator

Flow of Logic

Deploy Enviro Indoor

Backup up the original main.py first. Using a program such as Thonny copy main.py and sensor_readings.py from sensors folder on to the root partition. Edit main.py update values for

Parameter
ssid your_network_name
password your_password
location label_for_identification

Restart the Pico W and navigate to http://ipaddres/metrics

Deploy of Raspberry Pi4

For the controller we are going to use Ubuntu 22.04 Server. Follow the instructions at this tutorial. Install NTP

sudo apt install ntp
sudo vim /etc/ntp.conf
sudo systemctl restart ntp 

We will use snaps to install the Prometheus server on the Raspberry Pi.

When installed with snap prometheus.yml will be located at var/snap/prometheus/current

Copy prometheus.yml and update with correct targets

sudo snap restart prometheus.prometheus
snap services

Grafana will be installed locally with the normal node exporter dashboard plus a custom dashboard from the sensors.

By default Prometheus will be http://ipaddres:9090 By default Grafana will be By default Grafana will be http://ipaddres:3000

Deployment of Envirozen

Copy envirozen/envirozen/controller

pip install -r requirements.txt

Update config.py with values for Prometheus server and set Metric thresholds for the room. Create envirozen.service in etc/systemd/system using file as a template.

sudo systemctl daemon-reload
sudo systemctl restart envirozen

Web interface is http://envirozen.zengenti.io:5000

Envirozen.py does the following:

  • Starts the Flask Web Server
  • Evaluates Promethues metrics
  • Reads a Status file to determine the operation mode
  • Checks the conditions for actions
  • Runs in a loop defined in config.py

About

Environmental monitoring and control of a room

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published