Linux service to collect measurements pubished by TESS Sky Quality Meter via MQTT. TESS stands for Cristobal Garcia's Telescope Encoder and Sky Sensor
tessdb is a software package that collects measurements from one or several TESS instruments into a SQLite Database.
It is a Python Twisted Application that uses a custom Twisted library implementing the MQTT protocol
Desktop applicatons may query the database to generate reports and graphs using the accumulated, historic data.
These data sources are available:
- individual samples (real time, 5 min. aprox between samples).
The sampling period should be >= 1 min.
Warning: Time is UTC, not local time.
See the MAINTENANCE.md file
See the DATABASE.md file
The following components are needed and should be installed first:
- python 2.7.x (tested on Ubunti python 2.7.6)
Installation via PyPi repository
sudo pip install tessdb
or from GitHub:
git clone https://github.com/astrorafael/tessdb.git
cd tessdb
sudo python setup.py install
- All executables are copied to
/usr/local/bin
- The database is located at
/var/dbase/tess.db
by default - The log file is located at
/var/log/tessdb.log
Type sudo tessdb -k
to start the service in foreground with console output.
Type sudo service tessdb start
to start it as a backgroud service.
Type sudo update-rc.d tessdb defaults
to start it at boot time.
(Tested on Windows XP SP1 & python 2.7.10)
- Have Python 2.7 for Windows installed.
- Have PythonWin extensions installed. select the latest build fpr the Pyhton2.7 version
- Have the Microsoft Visual C++ Compiler for Python 2.7 installed. Thos is necessary to install
twisted
later on. Systems requirements state for Windows 7+, but it works fine for Windows XP, 32bits.
The Windows python 2.7 distro comes with the pip utility included.
- Open a
CMD.exe
console, with Administrator privileges for Windows 7 and higher - Inside this console type:
pip install twisted
Twisted will install (15.5.0 at this moment)
You can test that this installation went fine by opening a python command line (IDLE or Python CMD) and type:
```
>>> import twisted
>>> print twisted.__version__
15.5.0
>>> _
```
- Inside this new created folder type:
pip install tessdb
- The executables (.bat files) are located in the same folder
C:\tessdb
- The database is located at
C:\tessdb\dbase
by default. It is strongly recommeded that you leave it there. - The log file is located at
C:\tessdb\log\tessdb.log
In the same CMD console, type.\tessdb.bat
to start it in forground and verify that it works.
Go to the Services Utility and start the TESSDB database service.
There is a small configuration file for this service:
/etc/tessdb/config
(Linux)C:\tessdb\config.ini
(Windows)
This file is self explanatory. In special, the database file name and location is specified in this file.
Log file is usually placed under /var/log/tessdb.log
in Linux or under C:\tessdb\log
folder on Windows.
Default log level is info
. It generates very litte logging at this level.
File is rotated by logrotate only under Linux.
For Windows, it requires support from an exteral log rotator software such as LogRotateWin