Web-based interface for Optris CT series infrared thermometers. Provides real-time monitoring, full device configuration, and MQTT integration through a modern browser UI.
- Live Dashboard — real-time temperature readings with interactive charts (process, actual, head, box temperatures, emissivity, transmission)
- Complete Protocol Support — all 60+ read/write commands from the Optris CT binary protocol, including alarms, material table, head code, burst mode, and calibration tweaks
- MQTT Publishing — per-topic enable/disable, configurable intervals, JSON aggregate, broker authentication and TLS
- Device Settings — read and write every sensor parameter through the web UI, organized in logical groups
- Password Protection — optional bcrypt-hashed password for settings access
- Persistent Configuration — all settings saved to YAML and restored on startup
- Auto-Connect — reconnects to the last configured serial port on launch, auto-detects checksum mode
- Polling & Burst Modes — configurable poll interval (down to 100ms) or continuous burst streaming
- Dark Mode — modern dark UI theme
- RS-485 Multidrop — address 1–79 support for multi-sensor buses
The dashboard displays prominent live values with color-coded temperature cards and scrolling Chart.js graphs.
- Python 3.10+
- Serial connection to an Optris CT sensor (USB, RS-232, or RS-485)
cd webapp
pip install -r requirements.txt- FastAPI + Uvicorn (web server and WebSocket)
- pyserial (serial communication)
- paho-mqtt (MQTT client)
- pyyaml (configuration persistence)
- bcrypt (password hashing)
cd webapp
python main.pyOpen http://localhost:8080 in a browser.
cd webapp
docker compose up -dThe serial device must be passed to the container. Edit docker-compose.yml to match your device path:
devices:
- /dev/ttyUSB0:/dev/ttyUSB0Configuration is persisted via a volume-mounted config.yaml.
The server binds to 0.0.0.0:8080 by default. On first launch, navigate to the Communication tab to select your serial port and connect. Subsequent launches auto-connect to the last used port.
Live display of all sensor values with two chart areas:
- Temperature chart — process, actual, head, and box temperatures over a 5-minute rolling window
- Optical chart — emissivity and transmission
Serial port configuration:
- Port selection (auto-detected)
- Baud rate: 9600, 19200, 38400, 57600, 115200
- Polling or burst acquisition mode
- Multidrop address for RS-485
- Checksum enable/disable
- Device info display (serial number, firmware revision, head code)
All device parameters organized in collapsible groups:
| Group | Parameters |
|---|---|
| Measurement | Epsilon, transmission, epsilon source |
| Averaging & Hold | AVG time/mode, peak/valley hold, advanced hold mode/threshold/hysteresis |
| Alarms & Outputs | Alarm 1–2 thresholds/source/contact, Output Ch1–2 thresholds/source/contact/mode/type (0–10mV, 0–5V, 0–20mA, 4–20mA, TC-K, TC-J) |
| Analog Output | Low/high end, scaling min/max, IR/ambient DAC output, failsafe modes |
| Ambient Temperature | Source selection, fixed value |
| F3 Temperature Range | Low (0V) and high (5V) temperature |
| Calibration | Tweak offset and gain |
| Emissivity Calculation | Required/current temp, state |
| Communication | Baud rate, multidrop address, checksum |
Each parameter has individual Read and Set buttons. A Read All button loads every setting at once.
Broker connection with username/password and optional TLS. Topic configuration table with per-topic:
- Custom topic suffix
- Publish interval (seconds)
- Enable/disable toggle
Available topics: target temperature, actual temperature, head temperature, box temperature, emissivity, transmission, and a JSON aggregate.
Implements the complete Optris CT binary serial protocol as documented in the official specification:
- Read commands (0x01–0x81): temperatures, optical parameters, timing, alarms, device info, scaling, failsafe, material table, head code, calibration, burst string
- Set commands (0x82–0xAD, 0x51–0x52): all writable parameters with optional XOR checksum (firmware rev 26+)
- Burst mode: configurable parameter streaming with 0xAA 0xAA sync frames
- Multidrop addressing: 0xB0+address prefix for RS-485 buses, broadcast via 0xB0
- Temperature encoding:
(raw - 1000) / 10in °C - Fraction encoding:
raw / 1000for emissivity/transmission
Settings are persisted in webapp/config.yaml:
serial:
port: /dev/cu.usbserial-10
baudrate: 9600
mode: polling
poll_interval: 0.5
mqtt:
enabled: false
broker: localhost
port: 1883
base_topic: optris/ct
topics:
temp_target:
enabled: true
suffix: temperature/target
interval: 1.0The backend exposes REST and WebSocket endpoints:
| Endpoint | Method | Description |
|---|---|---|
/ws |
WebSocket | Live sensor data stream |
/api/serial/ports |
GET | List available serial ports |
/api/serial/connect |
POST | Connect to sensor |
/api/serial/disconnect |
POST | Disconnect |
/api/device/info |
GET | Serial number, firmware, head code |
/api/device/settings |
GET | Read all device parameters |
/api/device/values |
GET | Latest polled values |
/api/device/read |
POST | Read a specific parameter |
/api/device/write |
POST | Write a parameter (auth required) |
/api/config/{section} |
GET/POST | Read/update configuration |
/api/mqtt/status |
GET | MQTT connection status |
/api/mqtt/connect |
POST | Connect to MQTT broker |
The original command-line tool is still available in src/optris-ct.py for headless burst/poll operation with MQTT and curses UI. See src/ for details.
MIT