ESP32 firmware bridging the 1550 nm MOPA (Koheron CTL200 seed + Agiltron M511 two-stage EDFA) to MQTT/HA as a single device. Telemetry and control for both instruments verified end-to-end: MQTT command -> seed lasing -> booster ramp to 27 dBm (~515 mW) at the documented 2500 mA operating point. - PlatformIO/Arduino project, project-local venv, Makefile upload flow - Koheron ASCII driver on UART2; Agiltron binary 0x55AA driver on UART1 - HA discovery (sensors, binary_sensors, switches, numbers); LWT availability - Static IP, firmware current clamps on seed and booster pump
16 lines
526 B
C
16 lines
526 B
C
// Copy to secrets.h and fill in. secrets.h is git-ignored.
|
|
#pragma once
|
|
|
|
#define WIFI_SSID "your-ssid"
|
|
#define WIFI_PASSWORD "your-password"
|
|
|
|
#define MQTT_BROKER "192.168.0.102" // HA / mosquitto host
|
|
#define MQTT_PORT 1883
|
|
// Broker allows anonymous; leave user/pass empty unless that changes.
|
|
#define MQTT_USER ""
|
|
#define MQTT_PASSWORD ""
|
|
|
|
// Logical unit slug -> topics live under lab/laser/<DEVICE_NAME>/...
|
|
#define DEVICE_NAME "butterfly_edfa_rack"
|
|
#define DEVICE_FRIENDLY "Butterfly EDFA Rack"
|