# Overview Script to automate control of an home reverse cycle aircon system based on custom logic and temperature measurements. This was originally written for an [AdvantageAir](https://www.advantageair.com.au/) system. It just calls an external script to interface with the aircon, so should be easily adaptable to other systems. # Requirements - [pymyair](https://github.com/smallsam/pymyair) # Features - Log temperature measurements to a CSV file or InfluxDB - Control zone temperature by opening/closing its vents - Control zone temperature by opening/closing vents in adjacent zones - Automatically adjust aircon settings based on define temperature thresholds - Turn zones on/off based on ARP table entires for specific MAC addresses - Define temperature rules based on weekday and/or time # Usage root@gridbug:~# scripts/aircon.sh -h usage: scripts/aircon.sh [options] Modifies aircon based on configured parameters in /root/.airconrc. -h Show this text. -c Cron mode. Only show output if actions were taken. -i x.x.x.x Specify IP address for aircon (default is 10.99.99.1) -I db Log all zone temperatures to given influxdb database, then exit (see -o). -A db Log actions to given influxdb database. -f file Specify an alternate config file. -k file If file exists, never change aircon settings (default: /root/.aircon_noaction). -l num Set number of too hot/cold zones at which to taking action. -L Log all zone temperatures to CSV file, then exit (see -o). -o file Specify CSV output file. Default: /root/acstats.csv -m Generate a config file based on current aircon setup. -p Profiler mode. -w List which zone owners' devices are available then exit. -t num Specify degrees below min temperature before taking action. -T num Specify degrees above max temperature before taking action. -y Actually run commands/db inserts. By default, commands are just displayed. root@gridbug:~# cat .airconrc options -t 0.5 modelock heat constant Family owner Study robsphone owner Rob&Beth robsphone bethsphone owner Brendan brendansphone owner Media lgtv_wifi @Thu-Fri;0830-1630 force Nursery close # Childcare hours @1830-0630 temp Nursery 17-19 @0600-2359 temp Family 18-21 temp Media 18-22 temp Rob&Beth 18-22 @Mon-Fri;0830-1730 temp Study 18-22 # Rob working @Sat-Sun ignore Study # Not working 2000-0700 temp Ben/Sewing 18-22 @Mon-Fri;0830-1730 temp Ben/Sewing 17-22 # Brendan working adj Brendan Family adj Media Brendan adj Rob&Beth Family adj Study Family person Rob robsphone person Beth bethsphone person Brendan brendansphone ![aircon.sh in action](https://cube.nethack.net/images/aircon_control.png "aircon.sh in action")