Auto AC... because the AC in my building isn't designed very well.
The AC unit in my apartment keeps the blower running even if the set temperature is reached, it only turns off the AC compressor when the set temperature is reached. This has the effect of warming up the apartment by blowing non-cooled air along with evaporating all the humidity the AC took out of the air and adding it back to the apartment.
Not the greatest level of control:
Why not just use a smart outlet to control the AC, there are plenty of thermostat apps that work with smart outlets?
Unfortunately the AC units run on a 20 AMP plug and there are no 20 AMP smart outlets. I could do something similar with a relay controlled by a Pi but in case or error, I'd rather deal with the AC being on for too long or not at all versus a possible electrical fire.
Using two Pi Zero's, one as a temp sensor and one as a servo controller, the AC can be fully turned on and off based on more precise temperature readings. This also prevents the blower from running when the AC isn't on and cooling the apartment. Since there are two AC units in my apartment, multiple temperature sensors and controllers will be linked togheter to intellegently cool the apartment.
Future plans are to add a GUI front end to control the networked units and scheduling.
- Pi Zero W
- SparkFun Servo pHAT for Raspberry Pi
- DHT22/AM2302 Digital Temperature Humidity Sensor Module
- D Shaft Coupling
- Servo
This project uses Ansible to push out necessary dependencies and configuring the services.
- Clone repo
- In repo root, run
docker build -t aac_container .
The following variables will need to be set:
ansible_user:
- pi login name (pi default ispi
)ansible_password:
- pi password (pi default israspberry
)ansible_become_pass:
- pi password (pi default israspberry
)
Files where variables reside:
inventory\group_vars\all.yml
Setting the variables in plaintext works but is obviously insecure. You can use ansible-vault encrypt_string to keep your secrets encrypted. Do not press enter after your password, press ctrl-d twice.
bash$ ./sre ansible-vault encrypt_string --ask-vault-pass
New Vault password:
Confirm New Vault password:
Reading plaintext input from stdin. (ctrl-d to end input)
yourpassword!vault |
$ANSIBLE_VAULT;1.1;AES256
35373765373164393437356235323037663263393032623961303333373263346437653832363938
3433386662356666643232646361633763336435633366610a616534623063643832316563353134
34313565383338313763656163623432663862303766643037373839383466383930356436373439
6231643335633036660a373933373937613834333537643939323963303661353466646566613439
3064
Encryption successful
The resulting variable will be set like so:
ansible_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
35373765373164393437356235323037663263393032623961303333373263346437653832363938
3433386662356666643232646361633763336435633366610a616534623063643832316563353134
34313565383338313763656163623432663862303766643037373839383466383930356436373439
6231643335633036660a373933373937613834333537643939323963303661353466646566613439
3064
ansible_become_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
35373765373164393437356235323037663263393032623961303333373263346437653832363938
3433386662356666643232646361633763336435633366610a616534623063643832316563353134
34313565383338313763656163623432663862303766643037373839383466383930356436373439
6231643335633036660a373933373937613834333537643939323963303661353466646566613439
3064