Skip to content
Sergio Pascual edited this page Nov 16, 2023 · 8 revisions

Tesstractor

Tesstractor is a software designed to read data from TESS photometers (http://tess.stars4all.eu/). It also reads data also from Unihedron SQM-LU photometers.

The data from the TESS photometers can be:

  • Written to a file using the IDA format
  • Sent via MQTT to the STARS4ALL server

In the case of SQM-LU, only the file output is supported. The STARS4ALL server doesn't handle the SQM data at the moment, but we are testing the procedure.

Installation

TESStractor works with Python 3.6 and 3.7. It could work with previous versions of Python 3 (we haven't tested).

You can install directly from PyPI. We recomend installing in a virtual environment or with the --user option. Please do not sudo pip

$ pip install tesstractor

Using TESStractor

Configuration file

With tesstractor installed, you can generate a template configuration file with

$ tesstractor --generate-config > config.ini

Edit the file to configure it for your usage. Select the [photometer] section corresponding to you device and set enabled: True. You can also remove the section that you are not using.

[photometer_tess]
model: TESS-R
name: test-tessr1
port: /dev/ttyUSB0
enabled: True

Update the [location] section. The values here will appear in the data files.

[location]
contact_name: My Contact
organization: My Organization
locality: My Location
province: My Province
country: ZZ
site: simulated
latitude: -3.6919
longitude: 40.4189
elevation: 650
timezone: CET
timesync: NTP

The following section, [mqtt] is currently only valid for TESS photometers with USB/Serial connection. The support for SQM photometers will be added in the future. If you have a supported photometer, contact Jaime Zamorano to obtain the value of the password field. Otherwise, keep it disabled.

[mqtt]
username: tess
password: xxxxxxxxx
hostname: astrix.fis.ucm.es
register_topic: STARS4ALL/register
publish_topic: STARS4ALL/{name}/reading
enabled: False

The [file] section controls the creation of files in IDA format. You can set here the directory where the files are created and the interval in seconds to register the samples. The program creates one file per day and rotates the file at local midday. Set enabled: True to activate this section.

[file]
dirname: /var/lib/tesstractor
interval: 300.0
enabled: False

If you activate a photometer with [photometer_] but leave [file] and [mqtt] disabled, the program will sample from the device but the data will not be stored.

Running tesstractor

With the edited configuration file, you can run the program in the command line with:

$ tesstractor -c config.ini

Running tesstractor with systemd

If your distribution uses systemd, you can create a service file named /etc/systemd/system/tesstractor.service and then handle tesstractor as a service (this guide can be helpful to understand the usage of systemd).

The contents of the file are basically:

[Unit]
Description=TESStractor reader
Requires=network.target

[Service]
ExecStart=/path/to/tesstractor -c /path/to/config.ini

[Install]
WantedBy=default.target

If you installed tesstractor with a virtual environment, then you have to call tesstractor with the custom interpreter.

[Unit]
Description=TESStractor reader
Requires=network.target

[Service]
ExecStart=/path/to/venv/bin/python /path/to/venv/bin/tesstractor -c /path/to/config.ini

[Install]
WantedBy=default.target

License

GPLv3+