User Tools

Site Tools


operations:temphumidmonitor_software

This wiki is not maintained! Do not use this when setting up AuScope experiments!

Software

All sites

Edit the TempHumid.conf file accordingly (see below), then either restart the software by typing CTRL-C in the start_THRecord xterm or by rebooting the Pi.

Temperature and Humidity monitoring Software

Software, config file etc are stored in ~pi/TempHumid

Configuration:

The file TempHumid.conf describes which of the digital pins have sensors attached to them. e.g:

[pin03]
	gpio = 2
	label = Hub
	sensor = 11
	attached = True
  • gpio is the corresponding GPIO pin. Do not change this one!
  • label is a description of the sensor, e.g. it’s location
  • sensor is the sensor type. 11 = DHT11, 22 = DHT22
  • attached = True or False and indicates if the sensor is plugged in or not (or if you want to record it or not). The software will ignore this pin if set to False

The bin directory contains the executables:

  • THRecord.py: Reads sensors and writes values once per ~20s to a sqlite database in the data directory. Note database should grow at the rate of ~200 MB per year and the RPi has ~10 GB of free space on its microSD card.
  • THServer.py: Listens on port 60030 and returns the latest values on any query. Could be more sophisticated (different data depending on query), just ask :-). Example output:
    2018-09-09 05:52:00.648388 0.0 0.0 46.0 0.0 0.0 49.0 0.0 48.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -273.0 -273.0 19.0 -273.0 -273.0 20.0 -273.0 19.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0

    where first two strings are date and time (in UT) then all humidities and then all temperatures. The order of values is in digital pin number order (the same as in TempHumid.conf)

  • client_test.py: a test script to poll the server and get the most recent data
  • start_THRecord.sh and start_THServer.sh are started automatically after the RPi boots into a desktop session, so a reboot of the RPi should start these processes. They are called from ~/.config/lxsession/LXDE-pi/autostart. Edit this file if you want to change what happens when the desktop starts.

Katherine

Accelerometer, Analog temp/humid monitoring Software

A work in progress… The accelerometer data are available via the web but an alarm system for jolts needs to be implemented. At the moment, no analog temp/humid sensors are in use.

Software for IR remote control of aircon

A work in progress… Some preliminary work has been done but we are having trouble 'learning' the remote.

/home/www/auscope/opswiki/data/pages/operations/temphumidmonitor_software.txt · Last modified: 2019/03/25 21:18 by Jim Lovell