From HFML-FELIX Wiki
| MQTT daemon | |
|
| |
| Publishes ARMD radiation monitor readings to MQTT | |
| Language | Python |
|---|---|
| Hosts | felix-control |
| Repository | unspecified |
Armdd is a daemon that scrapes the web interface of our ARMD radiation monitors and publishes this information to the felixbroker. The data is stored in the MySQL database on isolator by the armd_plugin of the Archiver. A graph can be displayed in a webbrowser using Grafana.
Database
[edit | edit source]| Device | Database.table |
|---|---|
| ARMD1 | archiver.armd1 |
| ARMD2 | archiver.armd1 |
| ARMD3 | archiver.armd1 |
| Field name | Data type |
|---|---|
| timestamp | TIMESTAMP |
| value | DECIMAL(7,3) |
| unit | ENUM('uSv/h', 'mSv/h') |
MQTT
[edit | edit source]subscriptions
[edit | edit source]what this daemon depends on and subscribes to
| topic | description |
|---|
statusses
[edit | edit source]what this daemon publishes
| topic | description | values |
|---|---|---|
| building/armd/unit no/Unit_Id | the unit number | integer |
| building/armd/unit no/Latched_Faults | Latched_Faults | unknown |
| building/armd/unit no/Current_Activity_Reading/value | Current Activity Reading | float |
| building/armd/unit no/Current_Activity_Reading/unit | Current Activity Reading unit | string (uSv/h) |
| building/armd/unit no/Current_Faults | Current_Faults | unknown |
| building/armd/unit no/Latched_Alarm_State | Latched_Alarm_State | unknown |
| building/armd/unit no/Current_Alarm_State | Current_Alarm_State | unknown |
| building/armd/unit no/date | date on the device (Note that there might be some drift) | string (e.g. Wed 20/02/2019) |
| building/armd/unit no/time | time on the device (Note that there might be some drift) | string (e.g. 17:44:47) |
| building/armd/servers/host_pid | server declaration | json formatted text {"startdate": "date time", "state": "active or passive", "hostname": "hostname", "pid": pid} |
| building/armd/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":"undefined","starttime":timestamp} |
| building/armd/daemon_time | system time of the host the daemon runs on | unix timestamp (e.g. 1550680653.91) |
| building/armd/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 |
|---|---|---|
| building/armd/refresh | resend all statusses | value does not matter |
| building/armd/log_level | set log level | string (notset/debug/info/warning/error/critical) or integer (e.g. 20) |
| building/armd/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 armdd code cd /opt git clone https://gitlab.science.ru.nl/felix/armdd.git cd armdd 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
