/smart-air-conditioner

Automate an air conditioner to keep the room temperate in a certain interval without being turned on all the time.

Primary LanguagePython

Homemade smart air conditioner

Automate an air conditioner to keep the room temperate in a certain interval without being turned on all the time.

The setup: the setup Temperature graph when it's turned on: grafana

Hardware

  • Raspberry Pi 4 Model B 4GB (1GB would be enough)
  • ds18b20 temperature sensor (I had this laying around)
  • vs1838b infrared receiver (same)
  • infrared led (which I took from an Aliexpress rgb led strip remote controller)
  • transistor, wires, etc.

Software

  • Raspbian GNU/Linux 10 (bloatware, couldn't make it work on Arch)
  • LIRC (for infrared communication)
  • Python (for the app)
  • Flask and Jinja templating (for the UI)
  • InfluxDB (for the historical data)
  • Grafana (for the temperature chart)
  • Docker (for InfluxDB and Grafana, because it's nearly impossible to install apps on bare-metal Debian these days)
  • tmux (for running the app without soystemd)

Sources I used

Disclaimer

It's a hobby project, I didn't bother with using python properly, putting the HOST/PORT in env vars, making the UI pretty, or using normal passwords in my local network. It's for practical purposes, made in ~1 day, not in three months, and it's not for production.