From HFML-FELIX Wiki
| MQTT daemon | |
|
| |
| Determines which user station is selected | |
| Language | Python |
|---|---|
| Hosts | felix-control |
| Repository | unspecified |
Userstationd[1] receives ETH484 status information from ETH484d via MQTT regarding the state of the optical transport system and uses that to determine the actual user station.
Identified issues
[edit | edit source]Currently, only the state of the relays is used. The mirror position feedback inputs are disregarded.
MQTT
[edit | edit source]subscriptions
[edit | edit source]what this daemon depends on and subscribes to
| topic | description |
|---|---|
| FELIX/ETH484/+/relay/+/state | relay states of ETH484 devices needed to determine mirror positions |
statusses
[edit | edit source]what this daemon publishes
| topic | description | values |
|---|---|---|
| FELIX/userstation/current | the beam port of the current user station | string (e.g. US-11,2) |
| FELIX/userstation/servers/host_pid | server declaration | json formatted text {"startdate": "date time", "state": "active or passive", "hostname": "hostname", "pid": pid} |
| FELIX/userstation/clients/host_pid | client declaration Note: published by clients, not by this daemon |
json formatted text {"hostname": "hostname", "pid": pid,"state":"master or slave","subsystem":"userstation","starttime":timestamp} |
| FELIX/userstation/daemon_time | system time of the host the daemon runs on | unix timestamp (e.g. 1550680653.91) |
| FELIX/userstation/daemon_time/readable | system time of the host the daemon runs on | human-readable timestamp (e.g. Wed Feb 20 17:37:59 2019) |
commands
[edit | edit source]what this daemon will accept as user commands
| topic | description | accepted values |
|---|---|---|
| FELIX/userstation/refresh | resend all statusses | value does not matter |
| FELIX/userstation/log_level | set log level | string (notset/debug/info/warning/error/critical) or integer (e.g. 20) |
| FELIX/userstation/clients/stop | this topic is for remote shutdown of clients (the daemon itself takes no action) | False to stop clients, True to terminate clients |
Installation
[edit | edit source]First, make sure you have set up Feloperator gitlab authentication for the git clone and pip install commands below to work.
# clone the userstationd code cd /opt git clone https://gitlab.science.ru.nl/felix/userstationd.git cd userstationd chgrp -R fft . chmod -R 2775 .git mkdir log run chmod 2775 log run python3 -m venv .env .env/bin/pip install -r requirements.txt
