<sensor_name> = (<function>),<new_unit_name> <function> is defined with 'x' representing the original, raw value. So something along the following lines should work for you:
Temperature-DHT = (x-2),Corrected deg. C Temperature-BMP = (x-2),Corrected deg. C Obviously you can tailor this to make each sensor exactly match the more accurate lab equipment. Bear in mind that the accuracy of the DHT-22 is ±0.2℃ so this might vary slightly over repeated runs but I'll leave that for you to experiment with.
Edit: I should have pointed out that this is in cfg/outputs.cfg as you postulated, and make sure you've got "calibration = on" for each output plugin where you want this function to be applied.
Edit 2: You can get the sensor names by running the software with "help = yes" in cfg/settings.cfg
Hi Hayden - I'm still having trouble getting the "headless" bootstart mode to work. I've placed the script in the init.d directory and have registered with the command specified in the instructions but upon boot up I get the following error:
[FAIL] startpar: service(s) returned failure: airpibootstart ... failed!
no other errors occur during startup
is there a log file or a way to troubleshoot this? Any recommendations?
(I am running the newest version of your code and the startup script)
thanks for any insights
Last Edit: Dec 12, 2014 18:21:53 GMT -5 by pierceit
Hi Hayden - i dinked around with the airpibootstart script a bit a found two errors in it, which after being corrected allowed the script to kick off and execute during boot up:
As mentioned in my post above, I had to change this line: CFG_DIR=cfgs as follows: CFG_DIR=cfg
I also had to change this line: echo "[AirPi] Alternatively you could use"./airpictl.sh stop" as follows: echo "[AirPi] Alternatively you could use ./airpictl.sh stop"
once i did this, then removed the previous copy from init.d and removed the startup service I then copied the newly edited file with the changes above into init.d and registered it as a startup service. Thereafter i can see that it fires up now at boot up - sweet!
HOWEVER Now that airpi.py is being fired at bootup there are few errors being thrown from airpi.py and so the sensor reading never starts.
Sorry for the delay sorting this one. I've sorted the two typos you pointed out, and have fixed the other bug noted in your screenshot. Note that airpibootstart assumes that the AirPi software is installed in /home/pi/AirPi - if it's not then you'll need to change the path in the set_cfg_paths() function in airpi.py
This version has just been committed to GitHub, so let me know how you get on.
Haydn - Thanks for the update, you're a rock star! The script fires on boot up like a champ now.
I was able to simply type this to get the update:
git pull https://github.com/haydnw/AirPi.git
One issue however: It appears that when the script runs at bootup, that something isn't kicking off the HTTP server. When I attempt to go to port 8080 to view the web page i get this message on my web browser:
quoth the raven, 40
and on the RaspberryPi console screen i see a 404 error scroll by amidst the sensor readings.
Last Edit: Dec 16, 2014 23:07:45 GMT -5 by pierceit
I'm not sure about the HTTP server - I'll need to have a look in a few days when I get home and back to my RPi. The HTTP functionality was added by Fred Sonnenwald, not me, so it may require some digging for me to work it out!
Latest update includes the introduction of some proper documentation. There is now a 'docs' folder which contains updated installation instructions, and full usage instructions / explanation. There are also template Python files if you want to create your own sensors, output plugins or notification plugins. In addition, datasheets for all of the standard sensors are also included.
I'll have a look at the HTTP bootstart issue shortly.
OK, I've identified the problem with the HTTP output plugin running using the "bootstart" feature, and a fix has just been committed. Note the following from the updated documentation relating to the `wwwPath` parameter in the `HTTP` section of `cfg/outputs.cfg`:
wwwPath is the folder where web server files can be found. The default is `www`, which works fine for most applications. If you are using the HTTP plugin with the AirPi "bootstart" feature then you must declare wwwPath as a full explicit path (e.g. /home/myname/AirPi/www). If you do not, AirPi will assume that the full explicit path is /home/pi/AirPi/www
Bottom line is that I won't be adding any new features for a while now, but will instead be focussing on characterising the sensors to try and get some understanding of how feasible it is to get decent quantitative data which can be reliably converted to other units (e.g. ppm). Bug fixes will still happen though.
Is there an easy way to convert the Celsius to Fahrenheit and also to adjust the temp readings for the heat that the RaspberryPi itself is giving off? If we use google to convert the Celsius readings from the two chips (BMP and DHT) our temp readings from the unit are constantly reading about 17 degrees F too high. (I'm assuming again this is the added heat from the RaspberryPi itself interfering with the sensors)