== Requirements == 1. BASE 3.2.2 or later. == Introduction == This package is an extension package to BASE that allows storage of regular measurements of lab environment data through ThermoWorks Thermo Recoder TR-702W sensors placed in the labs, and inspection of the stored values. * The homepage for this extension: http://baseplugins.thep.lu.se/wiki/net.sf.basedb.labenv == Installation == 1. Download the `labenv-*.tar.gz` file. 2. Unpack the downloaded file to a directory of your choice. 3. Place a copy of JAR file `sqlite-jdbc-*.jar` in the Tomcat `lib/` directory. 4. Copy the `labenv-config.xml` file to `WEB-INF/classes` directory. 5. The default `labenv-config.xml` file does not contain any useful configuration values, but have to be edited with information on the lab sensors. Measurement data will be stored in the database for the sensor number defined in the configuration file. This lab sensor number is therefore not just a trivial index number for internal use in the XML configuration file. When sensors are added for new locations, they should normally be configured with a new unique number. 6. Copy the 'labenv.jar' file to your BASE plug-ins directory. Look in your 'base.config' file if you don't know where this is. 7. Go to 'Administrate->Plug-ins & Extensions->Overview' page. 8. Run the installation wizard and select to install 'labenv.jar'. 9. The LabEnv Server should now be running, and collect data from the configured sensors regularly, and store the average values in the local database. The BASE `Extensions` menu should now have a new cascade menu entry `Lab Environment`, with child menu items for different functionality of the extension, such as retrieving configuration data from the sensors, or inspecting the data stored in the database. 10. If the BASE server running the LabEnv extension is placed at a location different from that of the labs, where the sensors are installed, firewalls must be configured to allow the BASE server to access the internal web servers of the sensors, for lab environment data to be collected (port 80 has to be opened). 11. Done. == Known issues == * No known issues. == Tips and tricks == * It is recommended to configure the extension to make a number of measurements per stored value, as this will reduce the instrument noise in the stored data (the average value will be stored), and reduce the size of the database. * If a lab sensor is out of work for a longer time period (whether due to problem with the sensor or the network connection), you can configure the LabEnv extension to skip this sensor, when acquiring data. This is done by setting the start date for the sensor in question to a blank value in the configuration file `labenv-config.xml`, and restarting the extension. * If a malfunctioning sensor for an important location needs to be temporarily exchanged for a working sensor internally configured for a another, less important, location, and there is no time to re-configure the latter sensor internally, the lab environment configuration file can be modified so the measurements from the temporary sensor are stored for the sensor number of the malfunctioning one. == Compiling == To compile this package you also need: 1. Ant 1.8 2. Java 1.6 Follow these instructions: 1. Download the source code from the subversion repository. See http://baseplugins.thep.lu.se/wiki/net.sf.basedb.labenv for instructions. 2. Type `ant download-lib` to automatically download the BASE core JAR file that are needed for compilation. You can also do this manually by copying the base-core-3.*.jar and base-webclient-3.*.jar files from the BASE installation directory (`/www/WEB-INF/lib/`) to the `./lib/compile` directory. 3. Type `ant` to compile the code and generate the `labenv.jar` file in the project directory. 4. Use `ant package` to create a downloadable tar.gz package. Tip: If you need different values for any of the properties defined in the 'build.xml' file, create a file named 'build.properties' and set the values there.