2542 |
03 Jul 14 |
olle |
== Component name == |
2542 |
03 Jul 14 |
olle |
2 |
|
3874 |
25 Apr 16 |
nicklas |
Name: LabEnv |
2542 |
03 Jul 14 |
olle |
Type: BASE extension |
2542 |
03 Jul 14 |
olle |
Full name: Lab Environment Extension |
2542 |
03 Jul 14 |
olle |
6 |
|
2317 |
04 Apr 14 |
olle |
== Requirements == |
2317 |
04 Apr 14 |
olle |
8 |
|
5513 |
19 Jun 19 |
nicklas |
1. BASE 3.15 or later. |
5513 |
19 Jun 19 |
nicklas |
2. Java 11 or later. |
5513 |
19 Jun 19 |
nicklas |
11 |
|
2317 |
04 Apr 14 |
olle |
== Introduction == |
2317 |
04 Apr 14 |
olle |
13 |
|
2317 |
04 Apr 14 |
olle |
This package is an extension package to BASE that allows storage of |
2317 |
04 Apr 14 |
olle |
regular measurements of lab environment data through ThermoWorks |
2317 |
04 Apr 14 |
olle |
Thermo Recoder TR-702W sensors placed in the labs, and inspection |
2317 |
04 Apr 14 |
olle |
of the stored values. |
2317 |
04 Apr 14 |
olle |
18 |
|
2317 |
04 Apr 14 |
olle |
* The homepage for this extension: |
2317 |
04 Apr 14 |
olle |
http://baseplugins.thep.lu.se/wiki/net.sf.basedb.labenv |
2317 |
04 Apr 14 |
olle |
21 |
|
2317 |
04 Apr 14 |
olle |
== Installation == |
2317 |
04 Apr 14 |
olle |
23 |
|
3022 |
09 Dec 14 |
nicklas |
When updating see notes below! |
3022 |
09 Dec 14 |
nicklas |
25 |
|
2317 |
04 Apr 14 |
olle |
1. Download the `labenv-*.tar.gz` file. |
2317 |
04 Apr 14 |
olle |
2. Unpack the downloaded file to a directory of your choice. |
3022 |
09 Dec 14 |
nicklas |
3. Copy the `labenv-config.xml` file to `WEB-INF/classes` directory. |
3022 |
09 Dec 14 |
nicklas |
4. The default `labenv-config.xml` file does not contain any useful |
2542 |
03 Jul 14 |
olle |
configuration values, but has to be edited with information |
2542 |
03 Jul 14 |
olle |
on the lab sensors. |
2542 |
03 Jul 14 |
olle |
a. Configuration of database for lab environment data and settings |
3022 |
09 Dec 14 |
nicklas |
common for all lab sensors. If no values are given for |
2542 |
03 Jul 14 |
olle |
"timeoutinseconds", "storageintervalinseconds", and |
3022 |
09 Dec 14 |
nicklas |
"numberofmeasurementsperstoredvalue", default values |
2542 |
03 Jul 14 |
olle |
5, 300, and 5, will be used, respectively. This corresponds to |
2542 |
03 Jul 14 |
olle |
measurements each minute and storage of the average values every |
2542 |
03 Jul 14 |
olle |
5th minute. If alarm notification via e-mail is desired, information |
2542 |
03 Jul 14 |
olle |
about what e-mail server to use must be entered for "smtphost". |
2542 |
03 Jul 14 |
olle |
Attribute "fromaddress" is the e-mail address shown in the |
2542 |
03 Jul 14 |
olle |
"From"-field for the mail; normally this is of the type |
2542 |
03 Jul 14 |
olle |
"noreply@*" here, e.g. "noreply@thep.lu.se". Attribute "fromname" |
2542 |
03 Jul 14 |
olle |
is the name part of the "From"-field for the mail, e.g. something |
2542 |
03 Jul 14 |
olle |
generic like "Lab Environment BASE extension", or something more |
2542 |
03 Jul 14 |
olle |
specific for your BASE server or lab. |
2542 |
03 Jul 14 |
olle |
b. Measurement data will be stored in the database for the sensor |
2542 |
03 Jul 14 |
olle |
number defined in the configuration file. This lab sensor number |
2542 |
03 Jul 14 |
olle |
is therefore not just a trivial index number for internal use in |
2542 |
03 Jul 14 |
olle |
the XML configuration file. When sensors are added for new |
2542 |
03 Jul 14 |
olle |
locations, they should normally be configured with a new unique |
2542 |
03 Jul 14 |
olle |
number. If no "startdate" is given for a sensor, it will be ignored. |
2542 |
03 Jul 14 |
olle |
c. Alarm configuration for a lab sensor is optional. One or more |
2542 |
03 Jul 14 |
olle |
alarm configurations can be entered for each sensor. Each alarm |
2542 |
03 Jul 14 |
olle |
configuration contains start and end time in "HHmm" format, |
2542 |
03 Jul 14 |
olle |
a weekday filter with one of the values "all", "mondaytofriday", |
2542 |
03 Jul 14 |
olle |
"saturdaytosunday", "workdays", or "nonworkdays" (last two entries |
2542 |
03 Jul 14 |
olle |
are currently adapted to the automatic climate control at labs |
2542 |
03 Jul 14 |
olle |
in Medicon Village, Lund University, Sweden), minimum and maximum |
2542 |
03 Jul 14 |
olle |
allowed values for temperature and humidity, and a user list |
2542 |
03 Jul 14 |
olle |
of alarm administrators. For each alarm administrator is entered |
2542 |
03 Jul 14 |
olle |
the BASE log-in name ("id"), and an optional e-mail address for |
2542 |
03 Jul 14 |
olle |
alarm notification. |
2345 |
09 Apr 14 |
olle |
6. Copy the 'labenv.jar' file to your BASE plug-ins directory. |
2542 |
03 Jul 14 |
olle |
Look in your 'base.config' file if you don't know where this is. |
2345 |
09 Apr 14 |
olle |
7. Go to 'Administrate->Plug-ins & Extensions->Overview' page. |
2345 |
09 Apr 14 |
olle |
8. Run the installation wizard and select to install 'labenv.jar'. |
2345 |
09 Apr 14 |
olle |
9. The LabEnv Server should now be running, and collect data from the |
2317 |
04 Apr 14 |
olle |
configured sensors regularly, and store the average values in the |
2317 |
04 Apr 14 |
olle |
local database. The BASE `Extensions` menu should now have a new |
2317 |
04 Apr 14 |
olle |
cascade menu entry `Lab Environment`, with child menu items for |
2317 |
04 Apr 14 |
olle |
different functionality of the extension, such as retrieving |
2317 |
04 Apr 14 |
olle |
configuration data from the sensors, or inspecting the data stored |
2317 |
04 Apr 14 |
olle |
in the database. |
2345 |
09 Apr 14 |
olle |
10. If the BASE server running the LabEnv extension is placed at a |
2317 |
04 Apr 14 |
olle |
location different from that of the labs, where the sensors are |
2317 |
04 Apr 14 |
olle |
installed, firewalls must be configured to allow the BASE server |
2317 |
04 Apr 14 |
olle |
to access the internal web servers of the sensors, for lab |
2317 |
04 Apr 14 |
olle |
environment data to be collected (port 80 has to be opened). |
2345 |
09 Apr 14 |
olle |
11. Done. |
2317 |
04 Apr 14 |
olle |
80 |
|
3022 |
09 Dec 14 |
nicklas |
== Update notes == |
3022 |
09 Dec 14 |
nicklas |
82 |
|
3022 |
09 Dec 14 |
nicklas |
Since LabEnv 1.3 SQLite is no longer used for storing measurements. Instead, |
3022 |
09 Dec 14 |
nicklas |
LabEnv uses the same database that BASE uses. Existing data is automatically |
3366 |
04 Jun 15 |
nicklas |
migrated to the BASE database in LabEnv 1.3, but this feature has been removed |
3366 |
04 Jun 15 |
nicklas |
in LabEnv 1.4. |
3022 |
09 Dec 14 |
nicklas |
87 |
|
3366 |
04 Jun 15 |
nicklas |
NOTE! If you are running LabEnv 1.2 or earlier and want to upgrade to LabEnv 1.4 |
3366 |
04 Jun 15 |
nicklas |
or later, you should first update to LabEnv 1.3 if you want to keep the old data. |
3366 |
04 Jun 15 |
nicklas |
90 |
|
3366 |
04 Jun 15 |
nicklas |
To avoid mistakes by migrating the same SQLite database more than once a number |
3366 |
04 Jun 15 |
nicklas |
of precautions have been taken: |
3366 |
04 Jun 15 |
nicklas |
93 |
|
3022 |
09 Dec 14 |
nicklas |
* Measurements that fall within 5 minutes of an existing measurement are |
3022 |
09 Dec 14 |
nicklas |
ignored. |
3022 |
09 Dec 14 |
nicklas |
* If the migration is successful the SQLite database file will be removed. |
3022 |
09 Dec 14 |
nicklas |
97 |
|
3022 |
09 Dec 14 |
nicklas |
98 |
|
2317 |
04 Apr 14 |
olle |
== Known issues == |
2317 |
04 Apr 14 |
olle |
100 |
|
2317 |
04 Apr 14 |
olle |
* No known issues. |
2542 |
03 Jul 14 |
olle |
102 |
|
2317 |
04 Apr 14 |
olle |
== Tips and tricks == |
2317 |
04 Apr 14 |
olle |
104 |
|
2317 |
04 Apr 14 |
olle |
* It is recommended to configure the extension to make a number |
2317 |
04 Apr 14 |
olle |
of measurements per stored value, as this will reduce the |
2317 |
04 Apr 14 |
olle |
instrument noise in the stored data (the average value will be |
2317 |
04 Apr 14 |
olle |
stored), and reduce the size of the database. |
2317 |
04 Apr 14 |
olle |
* If a lab sensor is out of work for a longer time period (whether |
2317 |
04 Apr 14 |
olle |
due to problem with the sensor or the network connection), |
2317 |
04 Apr 14 |
olle |
you can configure the LabEnv extension to skip this sensor, |
2317 |
04 Apr 14 |
olle |
when acquiring data. This is done by setting the start date for |
2317 |
04 Apr 14 |
olle |
the sensor in question to a blank value in the configuration file |
2317 |
04 Apr 14 |
olle |
`labenv-config.xml`, and restarting the extension. |
2317 |
04 Apr 14 |
olle |
* If a malfunctioning sensor for an important location needs to be |
2317 |
04 Apr 14 |
olle |
temporarily exchanged for a working sensor internally configured |
2317 |
04 Apr 14 |
olle |
for a another, less important, location, and there is no time to |
2317 |
04 Apr 14 |
olle |
re-configure the latter sensor internally, the lab environment |
2317 |
04 Apr 14 |
olle |
configuration file can be modified so the measurements from the |
2317 |
04 Apr 14 |
olle |
temporary sensor are stored for the sensor number of the |
2489 |
05 Jun 14 |
olle |
malfunctioning one. |
2317 |
04 Apr 14 |
olle |
122 |
|
2317 |
04 Apr 14 |
olle |
== Compiling == |
2317 |
04 Apr 14 |
olle |
124 |
|
2317 |
04 Apr 14 |
olle |
To compile this package you also need: |
2317 |
04 Apr 14 |
olle |
126 |
|
5513 |
19 Jun 19 |
nicklas |
1. Ant 1.10 |
5513 |
19 Jun 19 |
nicklas |
2. Java 11 |
2317 |
04 Apr 14 |
olle |
129 |
|
2317 |
04 Apr 14 |
olle |
Follow these instructions: |
2317 |
04 Apr 14 |
olle |
131 |
|
2317 |
04 Apr 14 |
olle |
1. Download the source code from the subversion repository. See |
2317 |
04 Apr 14 |
olle |
http://baseplugins.thep.lu.se/wiki/net.sf.basedb.labenv for instructions. |
2317 |
04 Apr 14 |
olle |
134 |
|
2317 |
04 Apr 14 |
olle |
2. Type `ant download-lib` to automatically download the BASE core JAR file that |
2317 |
04 Apr 14 |
olle |
are needed for compilation. You can also do this manually by copying the |
2489 |
05 Jun 14 |
olle |
base-core-3.*.jar and base-webclient-3.*.jar files from the BASE installation |
2489 |
05 Jun 14 |
olle |
directory (`<basedir>/www/WEB-INF/lib/`) to the `./lib/compile` directory. |
2317 |
04 Apr 14 |
olle |
139 |
|
2317 |
04 Apr 14 |
olle |
3. Type `ant` to compile the code and generate the `labenv.jar` file |
2317 |
04 Apr 14 |
olle |
in the project directory. |
2317 |
04 Apr 14 |
olle |
142 |
|
2317 |
04 Apr 14 |
olle |
4. Use `ant package` to create a downloadable tar.gz package. |
2317 |
04 Apr 14 |
olle |
144 |
|
2317 |
04 Apr 14 |
olle |
Tip: If you need different values for any of the properties defined in |
2317 |
04 Apr 14 |
olle |
the 'build.xml' file, create a file named 'build.properties' and set |
2317 |
04 Apr 14 |
olle |
the values there. |
2542 |
03 Jul 14 |
olle |
148 |
|
2542 |
03 Jul 14 |
olle |
== Alarm functionality == |
2542 |
03 Jul 14 |
olle |
150 |
|
2542 |
03 Jul 14 |
olle |
* After an alarm has been reported, new alarm reports for that |
2542 |
03 Jul 14 |
olle |
configuration are normally blocked, until an alarm administrator |
2542 |
03 Jul 14 |
olle |
resets the alarm. An exception is alarm for lost contact with the |
2542 |
03 Jul 14 |
olle |
sensor, that blocks alarms of the same type, but not alarms for |
2542 |
03 Jul 14 |
olle |
temperature or humidity values outside allowed values, if contact with |
2542 |
03 Jul 14 |
olle |
the sensor should be reestablished. |
2542 |
03 Jul 14 |
olle |
* All alarms are reset if the Lab Environment service is restarted. |
2542 |
03 Jul 14 |
olle |
* All users can inspect alarm status via menu Extensions -> |
2542 |
03 Jul 14 |
olle |
Lab Environment -> Lab environment alarms, but only an alarm |
2542 |
03 Jul 14 |
olle |
administrator for an alarn can reset it. It is reset by setting option |
2542 |
03 Jul 14 |
olle |
"Alarm blocked" to "No" and clicking button "Set alarm blocker". |