Difference between revisions of "Software: Overview"
Line 2: | Line 2: | ||
There are several ways hivetool can be used: | There are several ways hivetool can be used: | ||
− | # [http://en.wikipedia.org/wiki/Data_logger | + | # [http://en.wikipedia.org/wiki/Data_logger Data logger] that provides data acquisition and storage. |
− | # Bioserver that displays and analyzes the data in addition to data acquisition and storage. | + | # Bioserver that displays, streams and analyzes the data in addition to data acquisition and storage. |
Both of these options can be run with or without access to the internet. The bioserver requires additional software and configuration of a webserver (usually apache), some perl graphic modules | Both of these options can be run with or without access to the internet. The bioserver requires additional software and configuration of a webserver (usually apache), some perl graphic modules | ||
Line 9: | Line 9: | ||
The [http://search.cpan.org/dist/GDGraph/Graph.pm Perl module] [http://gdgraph.com/ GD::Graph] is used to plot the data. The graphs and data are displayed with a web server, usually Apache. More detailed installation instructions are on the [http://hivetool.net/forum/1 Forums]. The code will be available at [https://github.com/hivetools GitHub]. | The [http://search.cpan.org/dist/GDGraph/Graph.pm Perl module] [http://gdgraph.com/ GD::Graph] is used to plot the data. The graphs and data are displayed with a web server, usually Apache. More detailed installation instructions are on the [http://hivetool.net/forum/1 Forums]. The code will be available at [https://github.com/hivetools GitHub]. | ||
− | == Linux Distributions == | + | == Data Logger == |
+ | === Linux Distributions === | ||
Linux distros that have been tested are: | Linux distros that have been tested are: | ||
#Debian Wheezy (Pi) | #Debian Wheezy (Pi) | ||
Line 17: | Line 18: | ||
For detailed instructions, see How to [[load linux on the Pi]]. | For detailed instructions, see How to [[load linux on the Pi]]. | ||
− | == Reading the Sensors == | + | === Reading the Sensors === |
Every 5 minutes [[cron]] kicks off the bash script [[hive.sh]] that reads the sensors. | Every 5 minutes [[cron]] kicks off the bash script [[hive.sh]] that reads the sensors. | ||
− | ===Scale=== | + | ====Scale==== |
For tips on serial communication with the scale see [[Tips:Scale]] | For tips on serial communication with the scale see [[Tips:Scale]] | ||
Line 37: | Line 38: | ||
</pre> | </pre> | ||
− | === Temperature Sensors === | + | ==== Temperature Sensors ==== |
TEMPered reads the RDing TEMPerHUM USB thermometer/hygrometer. Source code is at | TEMPered reads the RDing TEMPerHUM USB thermometer/hygrometer. Source code is at | ||
github.com/edorfaus/TEMPered [http://hivetool.net/node/59 Detailed instructions for installing TEMPered on the Pi.] | github.com/edorfaus/TEMPered [http://hivetool.net/node/59 Detailed instructions for installing TEMPered on the Pi.] | ||
− | == Logging the Data == | + | === Logging the Data === |
After hive.sh reads the sensors, the data is appended to a flat text log file [[hive.log]] and written in xml format to the temporary file [[hive.xml]]. [[cURL]] is used to send the xml file to a hosted web server where a perl script extracts the xml encoded data and inserts a row into the database. | After hive.sh reads the sensors, the data is appended to a flat text log file [[hive.log]] and written in xml format to the temporary file [[hive.xml]]. [[cURL]] is used to send the xml file to a hosted web server where a perl script extracts the xml encoded data and inserts a row into the database. | ||
− | == Graphing the Data == | + | == Bioserver == |
− | === [[GD::Graph]] === | + | |
+ | === Graphing the Data === | ||
+ | ==== [[GD::Graph]] ==== | ||
The [http://search.cpan.org/dist/GDGraph/Graph.pm Perl module] [http://gdgraph.com/ GD::Graph] is used to plot the data. | The [http://search.cpan.org/dist/GDGraph/Graph.pm Perl module] [http://gdgraph.com/ GD::Graph] is used to plot the data. | ||
− | == Displaying the Data == | + | === Displaying the Data === |
− | === [[Apache Web Server]] === | + | ==== [[Apache Web Server]] ==== |
− | == [[Audio]] == | + | === [[Audio]] === |
− | === IceCast === | + | ==== IceCast ==== |
− | === ffserver === | + | ==== ffserver ==== |
Revision as of 04:07, 29 December 2013
This project uses Free and Open Source Software (FOSS). The operating system is Linux although everything should run under Microsoft Windows.
There are several ways hivetool can be used:
- Data logger that provides data acquisition and storage.
- Bioserver that displays, streams and analyzes the data in addition to data acquisition and storage.
Both of these options can be run with or without access to the internet. The bioserver requires additional software and configuration of a webserver (usually apache), some perl graphic modules
The Perl module GD::Graph is used to plot the data. The graphs and data are displayed with a web server, usually Apache. More detailed installation instructions are on the Forums. The code will be available at GitHub.
Contents
Data Logger
Linux Distributions
Linux distros that have been tested are:
- Debian Wheezy (Pi)
- Lubuntu (lightweight Ubuntu)
- Slackware 13.0
For detailed instructions, see How to load linux on the Pi.
Reading the Sensors
Every 5 minutes cron kicks off the bash script hive.sh that reads the sensors.
Scale
For tips on serial communication with the scale see Tips:Scale Talking to the scale is straight forward. Usually send a short character string to the scale and listen for a reply. For the Adam Equipment:
echo "N\r\n" > /dev/ttyS0 read -t 1 SCALE < /dev/ttyS0
To use the Cisco Linksys WRT160NL wireless router to talk to the My Weigh HD300 scale, first detach a process that sleeps for a second and sends a carriage return. Then read the data. The detached bit sleeps for a second, allowing the read to get latched onto the serial port, and then sends the command, which promptly returns data.
'sleep 1;echo -e "\r" > /dev/ttyUSB0' & read -t 3 SCALE /dev/ttyUSB0.
Temperature Sensors
TEMPered reads the RDing TEMPerHUM USB thermometer/hygrometer. Source code is at github.com/edorfaus/TEMPered Detailed instructions for installing TEMPered on the Pi.
Logging the Data
After hive.sh reads the sensors, the data is appended to a flat text log file hive.log and written in xml format to the temporary file hive.xml. cURL is used to send the xml file to a hosted web server where a perl script extracts the xml encoded data and inserts a row into the database.
Bioserver
Graphing the Data
GD::Graph
The Perl module GD::Graph is used to plot the data.