Butterfly EDFA Rack: Home Assistant config and dashboard
Fresh repo holding only the Butterfly-rack HA side (the firmware and BOM live in koheron-esp32-bridge). Contents, pulled from the live HA host: - configuration.butterfly.yaml: dBm->mW template sensors + the YAML dashboard registration, to merge into /config/configuration.yaml - scripts.butterfly.yaml: the butterfly_edfa_shutdown emergency-off script - ui-lovelace-butterfly.yaml: the dashboard - deploy.sh: scp the dashboard, check_config, restart HA - .gitignore guards against committing the HA DB, logs and secrets Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
commit
abcb6b7553
@@ -0,0 +1,136 @@
|
||||
# Butterfly EDFA Rack (MOPA) — YAML-mode dashboard.
|
||||
# Registered in configuration.yaml (lovelace: dashboards: butterfly-rack).
|
||||
# Entities auto-discovered over MQTT; the *_mw power sensors are MQTT template
|
||||
# sensors defined in configuration.yaml (dBm -> mW).
|
||||
title: Butterfly Rack
|
||||
views:
|
||||
- title: MOPA
|
||||
path: mopa
|
||||
icon: mdi:laser-pointer
|
||||
cards:
|
||||
- type: vertical-stack
|
||||
title: Butterfly EDFA Rack (MOPA, 1550 nm, Class 4)
|
||||
cards:
|
||||
# ===== Graphs at the top: powers (mW) and temperatures =====
|
||||
- type: history-graph
|
||||
title: EDFA output & pre-amp PD (mW)
|
||||
hours_to_show: 1
|
||||
entities:
|
||||
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
||||
name: Output PD
|
||||
- entity: sensor.butterfly_edfa_rack_pre_amp_power_mw
|
||||
name: Pre-amp PD
|
||||
|
||||
- type: history-graph
|
||||
title: EDFA input PD (mW) — seed after attenuators
|
||||
hours_to_show: 1
|
||||
entities:
|
||||
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
||||
name: EDFA input
|
||||
|
||||
# Seed-side signal: CTL200 monitor photodiode current. Tracks seed
|
||||
# output relatively; NOT a calibrated optical power.
|
||||
- type: history-graph
|
||||
title: Seed monitor PD (mA — relative, uncalibrated)
|
||||
hours_to_show: 1
|
||||
entities:
|
||||
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
||||
name: Seed monitor PD
|
||||
|
||||
- type: history-graph
|
||||
title: Temperatures (°C)
|
||||
hours_to_show: 1
|
||||
entities:
|
||||
- entity: sensor.butterfly_edfa_rack_seed_temperature
|
||||
name: Seed
|
||||
- entity: sensor.butterfly_edfa_rack_seed_board_temperature
|
||||
name: Seed board
|
||||
- entity: sensor.butterfly_edfa_rack_amp_module_temperature
|
||||
name: Amp module
|
||||
- entity: sensor.butterfly_edfa_rack_amp_pre_amp_temperature
|
||||
name: Amp pre-amp
|
||||
|
||||
# ===== Status + headline values =====
|
||||
- type: glance
|
||||
columns: 3
|
||||
entities:
|
||||
- entity: binary_sensor.butterfly_edfa_rack_seed_link
|
||||
name: Seed link
|
||||
- entity: binary_sensor.butterfly_edfa_rack_amp_link
|
||||
name: Amp link
|
||||
- entity: sensor.butterfly_edfa_rack_amp_warnings
|
||||
name: Warnings
|
||||
|
||||
- type: glance
|
||||
title: Power now (internal PDs, indicative)
|
||||
columns: 3
|
||||
entities:
|
||||
- entity: sensor.butterfly_edfa_rack_amp_input_power_mw
|
||||
name: EDFA in mW
|
||||
- entity: sensor.butterfly_edfa_rack_output_power
|
||||
name: Out dBm
|
||||
- entity: sensor.butterfly_edfa_rack_output_power_mw
|
||||
name: Out mW
|
||||
|
||||
# ===== Stage 1: seed (Koheron CTL200) =====
|
||||
- type: entities
|
||||
title: Stage 1 — Seed (turn on FIRST)
|
||||
state_color: true
|
||||
entities:
|
||||
- entity: switch.butterfly_edfa_rack_seed_laser
|
||||
name: Seed laser
|
||||
- entity: number.butterfly_edfa_rack_seed_set_current
|
||||
name: Seed current set (<= 300 mA)
|
||||
- entity: sensor.butterfly_edfa_rack_seed_current
|
||||
name: Seed current (actual)
|
||||
- entity: number.butterfly_edfa_rack_seed_thermistor_setpoint
|
||||
name: Seed temp setpoint (Ω, rtset)
|
||||
- entity: sensor.butterfly_edfa_rack_seed_temperature
|
||||
name: Seed temperature (from thermistor)
|
||||
- entity: sensor.butterfly_edfa_rack_seed_photodiode_current
|
||||
name: Seed monitor PD (mA, relative)
|
||||
|
||||
# ===== Stage 2: booster (Agiltron M511, ACC) =====
|
||||
- type: entities
|
||||
title: Stage 2 — Booster (ACC; ramp gently, settles 2-4 s)
|
||||
state_color: true
|
||||
entities:
|
||||
- entity: switch.butterfly_edfa_rack_amp_pump
|
||||
name: Booster pump enable
|
||||
- entity: number.butterfly_edfa_rack_amp_pump_current
|
||||
name: Pump-1 current set (<= 4000 mA ~ 1 W)
|
||||
- entity: sensor.butterfly_edfa_rack_amp_pump_1_current
|
||||
name: Pump-1 current (actual)
|
||||
- entity: sensor.butterfly_edfa_rack_amp_module_temperature
|
||||
name: Module temp
|
||||
|
||||
# ===== Emergency off =====
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: button
|
||||
name: PUMP OFF
|
||||
icon: mdi:power-off
|
||||
icon_height: 40px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.butterfly_edfa_rack_amp_pump
|
||||
- type: button
|
||||
name: SEED OFF
|
||||
icon: mdi:power-off
|
||||
icon_height: 40px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.butterfly_edfa_rack_seed_laser
|
||||
- type: button
|
||||
name: SHUTDOWN
|
||||
icon: mdi:alarm-light
|
||||
icon_height: 40px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.butterfly_edfa_shutdown
|
||||
confirmation:
|
||||
text: Ramp pump to 0, disable booster, then seed?
|
||||
Reference in New Issue
Block a user