========
A Raspberry Pi weather station and air quality monitor.
The AirPi was conceived and produced by Alyssa Dayan and Tom Hartley.
For installation and usage instructions, see the files in the docs folder.
Scroll down for information on previous software versions.
This Version - Haydn Williams
The following development has been carried out by Haydn Williams:
09/02/2015
- [NEW] Automated install script - just run:
curl -s https://raw.githubusercontent.com/haydnw/AirPi/development2/install.sh | sudo shIf you're worried about security, replacesudo shwithmoreto view the entire script in all its glory first.
31/12/2014:
- [FIX] HTTP output plugin now works correctly with bootstart. N.B. Full path
for
wwwPathmust be set explicitly incfg/outputs.cfgin such cases. If not, AirPi assumes/home/pi/AirPi/www. - Updates to
settings.cfgfor case of parameter names, and LED explanations.
30/12/2014:
- [NEW] Show warning if cannot sample quickly enough (i.e. sampling frequency is too short / fast).
- [NEW] Output plugins now include milliseconds in time.
- [FIX] Samples now counted correctly (increment per actual sample, not per check).
- [FIX] Output the time a few milliseconds closer to the actual sample time.
27/12/2014:
- [NEW] Added Python templates to
docsfolder. - Updated docs.
- Revised readme.
25/12/2014:
- [NEW] Added datasheets to repository.
- Clarified names for BMP085 and DHT-22 sensors.
- Added first draft of instructions on how to use the software.
16/12/2014:
- [FIX] airpibootstart script now working again. N.B. Assumes installation is
in
/home/pi/AirPi- seeboot/README.mdfor details.
07/12/2014:
- [NEW] Added
verargument toairpictl.sh, to display version and upgrade information. - [FIX] Fixed error in lambda function for CO calibration (not used at present).
30/11/2014:
- Improved 'help' feature for list of sensors, and for Xively, Dweet and HTTP output plugins.
- [FIX] Resolved an issue with Relative_Humidity not working (DHT22).
23/11/2014:
- Added first basic 'help' to give required Xively channel names.
- Controlled by
helpparameter incfg/settings.cfg.
- Controlled by
16/11/2014:
- Added 'plot' output, to graph a single output metric on screen.
- Added basic RRD output (for more advanced support try https://git.cccmz.de/julric/airpi).
17/10/2014:
- Added JSON output.
06/10/2014:
- Added ability to do 'dummy runs' for a predefined period before a run starts properly, to ensure all sensors are
up and running, and won't just report back zeroes.
- Controlled by
dummydurationparameter incfg/settings.cfg- set to0for no dummy runs. Recommended is15.
- Controlled by
03/10/2014:
- Added ability to stop a run after X samples.
- Controlled by
stopafterparameter incfg/settings.cfg- set to0to run indefinitely.
- Controlled by
- Added warning if GPS socket not detected when GPS sensor enabled.
26/09/2014:
- Added dweet output.
26/08/2014:
- Added ability to output average data (e.g. read every 1 min for 10 mins, then output the average for the 10 mins).
- Controlled by
averageFreqparameter incfg/settings.cfg- set to at least twice sampleFreq to enable averaging.
- Controlled by
21/08/2014:
- Code tidying:
- Moved the check whether calibration is required into a super function called from each output subclass now.
- Made multiple changes to all
.pyfiles in line with Pylint recommendations as per PEP 8 style guide. - Renamed 'data' to 'params' in output subclasses, to reflect their true nature and reduce confusion with data produced by sensors.
- Massive refactoring of
airpi.pyby extracting methods to facilitate code reuse and simplificaiton.
12/08/2014:
- Added
airpictl.shscript to control sampling in different modes.- Run
./airpictl.shto see options and usage. - Includes 'background' and 'unattended', so you can SSH into your Pi, start it, then quit.
- Run
- Moved all config files to
cfgdirectory. - Moved all log files (and redirected output from
airpictl.sh) tologdirectory.
26/07/2014:
- Added ability to record metadata such as Raspberry Pi serial no. and operator name at start of run.
- Controlled by
metadatareqdparameters incfg/outputs.cfg- set toTrueto output metadata.
- Controlled by
21/07/2014:
- Added ability to start automatically at boot for headless operation (does not require any user interaction).
- Controlled by
bootstartparameter incfg/settings.cfg. - See the
bootdirectory for more info.
- Controlled by
18/07/2014:
- Abort and inform user if no output modules are enabled.
- Added 'Notifications' module which allow messages to be sent when errors occur. Includes email, SMS and tweet.
- Controlled by
cfgs/notifications.cfg.
- Controlled by
- Renamed 'data' array to 'parameters' to better reflect its content, and avoid confusion with actual data.
15/07/2014:
- Added the following new options to
cfg/settings.cfg:- Greater control of LED behaviour.
- Can disable error messages printed to screen.
- Can print to screen in CSV format.
- Standard print-to-screen format tidied up and made more digestable.
- Output modules requiring internet access will not be loaded if there is no connection available.
14/07/2014:
- Added ThingSpeak output.
- Rounded Xively output to 2dp.
- Can kill the process a bit more nicely using Ctrl+C.
- Can automatically name CSV files and HTTP titles using date and hostname.
- Controlled by use of
<date>and<hostname>incfg/outputs.cfg
- Controlled by use of
outputDirparameter is now required for csvoutput, to avoid writing to/rootwhen loading at boot.- Needs to be in
[CSVOutput]section ofcfg/outputs.cfg.
- Needs to be in
This development branch of the AirPi code adds several features and bugfixes that I've developed as part of my AirPi project.
It additionally incorporates changes by Jon Hogg (jncl), which include code cleanups, error logging, and GPS sensor support.
New features:
- Support for UVI-01 sensor
- Can disable LEDs
- Raingauge support
- Support for TGS-2600 Air Quality sensor
- CSV logging
- Built in HTTP server to display results nicely
- Looks pretty using Twitter Bootstrap
- RSS feed
- Nice graphs using Flot
- Can load in CSV history for long period graphs
- HTTP/1.0 or HTTP/1.1
- Sensor calibration, not just raw values
- GPS sensor support (untested by me, so may not be compatible with the HTTP or CSV code)
Bugfixes:
- Pressure sensor calibration (jaceydowell)
- Could not change mslp setting in pressure sensor
- Don't just ignore failed readings (record 0 instead)
- High CPU usage
- Hopefully fixed an issue with readings hanging on DHT22
This is the original code for the project located at http://airpi.es
Currently it is split into airpi.py, as well as multiple sensor and
multiple output plugins. airpi.py collects data from each of the input
plugins specified in sensors.cfg, and then passes the data provided by
them to each output defined in outputs.cfg. The code for each sensor
plugin is contained in the sensors folder and the code for each output
plugin in the outputs folder.
Some of the files are based off code for the Raspberry Pi written by Adafruit: https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code
For original installation instructions, see http://airpi.es/kit.php
For ease of use when working with scripts, you may want to add the AirPi
folder to your $PATH.