All Projects → tpudlik → RaspAC

tpudlik / RaspAC

Licence: MIT license
Web-enabled AC remote

Programming Languages

python
139335 projects - #7 most used programming language
CSS
56736 projects
HTML
75241 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to RaspAC

arduino-sht
Repository for Sensirion humidity and temperature sensor support on Arduino
Stars: ✭ 43 (+53.57%)
Mutual labels:  temperature-sensor
AHT10
This is an Arduino library for Aosong ASAIR AHT10, AHT15 Digital Humidity & Temperature Sensor
Stars: ✭ 32 (+14.29%)
Mutual labels:  temperature-sensor
arduino-esp8266-mh-z19-serial
CO2, humidity and temperature sensor on ESP8266
Stars: ✭ 57 (+103.57%)
Mutual labels:  temperature-sensor
MAX31855
Arduino library for 14-bit MAX31855 K-thermocouple to digital converter
Stars: ✭ 20 (-28.57%)
Mutual labels:  temperature-sensor
AirDataComputer
Air Data Computer
Stars: ✭ 29 (+3.57%)
Mutual labels:  temperature-sensor
mlx90632-library
MLX90632 library for the Melexis 90632 Infra Red temperature sensor.
Stars: ✭ 34 (+21.43%)
Mutual labels:  temperature-sensor
esp32-ds18b20
ESP32-compatible C library for Maxim Integrated DS18B20 Programmable Resolution 1-Wire Digital Thermometer.
Stars: ✭ 61 (+117.86%)
Mutual labels:  temperature-sensor
raspy-temperature-bot
This is a telegram bot hosted by a Raspberry Pi equipped with a temperature and humidity sensor. The bot is capable of sending plots and readings.
Stars: ✭ 31 (+10.71%)
Mutual labels:  temperature-sensor
esp8266 homekit temp
Small project to send data from a temperature sensor connected to an esp8266 to a HomeKit server, running on a Raspberry Pi.
Stars: ✭ 38 (+35.71%)
Mutual labels:  temperature-sensor
SwiftySHT20
⚡ A Swift library for the I2C SHT20 Humidity and Temperature Sensor.
Stars: ✭ 19 (-32.14%)
Mutual labels:  temperature-sensor
avr-ds18b20
AVR library for controlling DS18B20 temperature sensors
Stars: ✭ 52 (+85.71%)
Mutual labels:  temperature-sensor
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (+89.29%)
Mutual labels:  temperature-sensor
SensorsAndAi
SensorAndAi is an android application which will give you the complete information about all the sensors and some basic information about artificial intelligence.This application will tell you about the use and implementation of the sensor and artificial intelligence.This app will show you how sensor and artificial intelligence is used in any an…
Stars: ✭ 29 (+3.57%)
Mutual labels:  temperature-sensor
Si7021 Breakout
A breakout board for the Si7021 Temperature and Humidity sensor.
Stars: ✭ 24 (-14.29%)
Mutual labels:  temperature-sensor
ds18b20
Golang get temperature from ds18b20 sensor connected to a Raspberry PI (GPIO w1 pin).
Stars: ✭ 62 (+121.43%)
Mutual labels:  temperature-sensor
FPGAmp
720p FPGA Media Player (RISC-V + Motion JPEG + SD + HDMI on an Artix 7)
Stars: ✭ 190 (+578.57%)
Mutual labels:  ir-codes

RaspAC

An internet-enabled air conditioner remote running on the Raspberry Pi.

How does it work?

On the software side, an Apache web server running on the Pi serves a Flask app. This app makes calls to LIRC, the Linux Infrared Remote Control library, to replay previously recorded IR codes. The Pi is connected to a couple high- brightness IR diodes which transmit the codes to the air conditioner.

You can play with a mockup of the app here. It will accept the username Guest and password Guest.

How to put it together?

Hardware

I used the setup described by Alex Bain, but I added a temperature and humidity sensor with the data pin connected to pin 4. See this tutorial for a circuit schematic.

Software

The software part of this project consists of three pieces: the website that lets you communicate with the Raspberry Pi, the temperature sensor code, and the LIRC, which controls the IR diodes connected to the Pi. The installation instructions below assume you're starting from a clean Raspbian installation.

Installing and configuring LIRC

Follow the instructions here for installing and configuring LIRC. Note, though, that you will probably be unable to record the IR codes for your AC using the irrecord command line tool provided with LIRC. The structure of IR codes used by ACs is different from that used by TVs, for which irrecord was designed to work with. Rather than telling the AC what button was pressed (e.g., "Increase target temperature by 2 degrees", or "Switch unit on"), the code contains a complete description of the new state (e.g., "The fan strength is 3, the temperature target is 76, the operating mode is cooling, ..."). This structure is not compatible with irrecord.

Fortunately, LIRC provides another command line tool, mode2, which will directly record any sequence of IR pulses and spaces. You can use it to save the pulse trains produced by pressing buttons on the remote, and manually stitch together a LIRC configuration file, lirc.conf. Note that it's in general not enough to record the effect of pressing each button, since the signal encodes the full state of the AC. You will probably want to record the code associated with each temperature, or even every temperature/mode combination if your AC supports both heating and cooling modes. The lirc.conf file I created for my LG AC is provided as an example.

For more information on recording IR codes for ACs using LIRC, see here.

Setting up the temperature sensor

I used C code for the DHT provided by Adafruit. After compiling Adafruit_DHT.c using the Makefile, change its ownership so that it can be ran without sudo:

sudo chown root:root Adafruit_DHT
sudo chmod +s Adafruit_DHT

Copy the compiled executable to the folder containing tsensor.py. Edit the parameters in tconfig.py, then run tsensor.py in the background. The temperature and humidity sensor will be periodically queried, and the results will be recorded in a database.

You will probably want to restart tsensor.py every time the Pi is turned on. I found it most convenient to have a cron job spin it up on every reboot.

Setting up the web app

Step by step instructions are forthcoming!

For general information on deploying Flask apps on an Apache webserver, see the tutorial.

Helpful references

The idea of using the Raspberry Pi as an internet-enabled IR remote is not new, though most people use them to control TVs rather than ACs. I found Alex Bain's description of his Open Source Universal Remote particularly helpful. Recording the IR codes is discussed by Peter Li in his AC control project.

Licensing

The parts of this software that I have written are covered by the MIT license. This excludes the following files:

  • leaves.css
  • app.yaml, appengine_config.py, requirements.txt and vendor.py, which I borrowed from the Google App Engine Flask template. These are covered by the Apache license.
  • Adafruit_DHT.c (BSD license).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].