Difference between revisions of "Software: Overview"

From HiveTool
Jump to: navigation, search
Line 1: Line 1:
'''[[load hivetool on the Pi|How to load hivetool on the Pi]] provides detailed installation instructions.''' This project uses [http://en.wikipedia.org/wiki/Free_and_open-source_software Free and Open Source Software (FOSS)]. The operating system is [http://en.wikipedia.org/wiki/GNU/Linux Linux] although everything should run under Microsoft Windows. The code is available at [https://github.com/hivetools GitHub].
+
For detailed installation instructions, see '''[[load hivetool on the Pi|How to load hivetool on the Pi]].''' This project uses [http://en.wikipedia.org/wiki/Free_and_open-source_software Free and Open Source Software (FOSS)]. The operating system is [http://en.wikipedia.org/wiki/GNU/Linux Linux] although everything should run under Microsoft Windows. The code is available at [https://github.com/hivetools GitHub].
  
There are several ways hivetool can be used:
+
Hivetool can be used as a:
 
# [http://en.wikipedia.org/wiki/Data_logger Data logger] that provides data acquisition and storage.
 
# [http://en.wikipedia.org/wiki/Data_logger Data logger] that provides data acquisition and storage.
# Bioserver that displays, streams and analyzes the data in addition to data acquisition and storage.
+
# Bioserver that displays, streams, analyzes and visualizes 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), the perl module GD::Graph, and perhaps a media server such as [http://en.wikipedia.org/wiki/Icecast Icecast] http://www.icecast.org/  or [http://en.wikipedia.org/wiki/FFmpeg FFserver] http://www.ffmpeg.org/ffserver.html to stream audio and video.
 
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), the perl module GD::Graph, and perhaps a media server such as [http://en.wikipedia.org/wiki/Icecast Icecast] http://www.icecast.org/  or [http://en.wikipedia.org/wiki/FFmpeg FFserver] http://www.ffmpeg.org/ffserver.html to stream audio and video.
  
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]. 
 
  
 
== Data Logger ==
 
== Data Logger ==
Line 18: Line 17:
 
#Lubuntu (lightweight Ubuntu)  
 
#Lubuntu (lightweight Ubuntu)  
 
#Slackware 13.0
 
#Slackware 13.0
 
'''[[load hivetool on the Pi|How to load hivetool on the Pi]] provides detailed instructions.'''
 
  
 
=== 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. On ver 0.5 and later, the text file hive.conf is used to store the sensor configuration options and calibration parameters.
  
 
====Scale====
 
====Scale====
Line 47: Line 44:
 
=== 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.  Storing the data in a local SQL database on the hive computer is supported.
  
 
== Bioserver ==
 
== Bioserver ==
 
[[File:Software flow diagram1b.png|thumb|600px|Software Flow Diagram - Bioserver]]
 
[[File:Software flow diagram1b.png|thumb|600px|Software Flow Diagram - Bioserver]]
 
Just as a mail server servers up email and a web server dishes out web pages, a biological data server, or bioserver, serves biological data that it has monitored, analyzed and visualized.
 
Just as a mail server servers up email and a web server dishes out web pages, a biological data server, or bioserver, serves biological data that it has monitored, analyzed and visualized.
 +
 +
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]. 
 +
  
 
=== Graphing the Data ===
 
=== Graphing the Data ===

Revision as of 23:38, 7 November 2014

For detailed installation instructions, see How to load hivetool on the Pi. This project uses Free and Open Source Software (FOSS). The operating system is Linux although everything should run under Microsoft Windows. The code is available at GitHub.

Hivetool can be used as a:

  1. Data logger that provides data acquisition and storage.
  2. Bioserver that displays, streams, analyzes and visualizes 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), the perl module GD::Graph, and perhaps a media server such as Icecast http://www.icecast.org/ or FFserver http://www.ffmpeg.org/ffserver.html to stream audio and video.


Data Logger

Software Flow Diagram - Data logger core
Software Flow Diagram - Key

Linux Distributions

Linux distros that have been tested are:

  1. Debian Wheezy (Pi)
  2. Lubuntu (lightweight Ubuntu)
  3. Slackware 13.0

Reading the Sensors

Every 5 minutes cron kicks off the bash script hive.sh that reads the sensors. On ver 0.5 and later, the text file hive.conf is used to store the sensor configuration options and calibration parameters.

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. Storing the data in a local SQL database on the hive computer is supported.

Bioserver

Software Flow Diagram - Bioserver

Just as a mail server servers up email and a web server dishes out web pages, a biological data server, or bioserver, serves biological data that it has monitored, analyzed and visualized.

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.


Graphing the Data

GD::Graph

The Perl module GD::Graph is used to plot the data.

Displaying the Data

Apache Web Server

Audio

IceCast

ffserver

Video