BTA mirror temperature network daemon
==================

Gather information from temperature sensors and send it over ethernet by network request.

## Protocol

Request format over http:

hostname:4444/Tx
where x is 0 for upper sensors, 1 for lower and 2 for T measured by main controller.
hostname:4444/Tmean returns mean temperature

Answer format: "ID X Y T t", where

- ID is numerical sensor identificator (1st digit is controller number, 2nd digit - sensors' pair number and 3rd digit - number of sensor in pair)
- X and Y are cartesian coordinates relative to mirror center (decimeters),
- T is measured temperature (degrees Celsium),
- t is UNIX-time of last measurement.

Also you can connect to server by regular INET socket through the same port. Send T0, T1, T2 or Tmean to get data.
After data sending server close socket.

To look graph over gnuplot utility collect gnuplot javascript files in subdirectory js of web-server
images storing directory, copy there script 'plot' and run service as

    netdaemon -g -s /path/to/web /path/to/log

Every 15 minutes it will calculate average values of thermal data and plot three graphs:
T0.html with top temperatures and T1.html with bottom.

## Signals 

SIGUSR1 - reread temperatures adjustment file

SIGUSR2 - dump to logfile all current temperature values and turn sensors off until next reading
