lutron-control/config.example.yaml
2026-06-28 08:32:22 -05:00

221 lines
11 KiB
YAML

# Configuration for lutron-control.
#
# Copy this file to config.yaml and edit it. The program searches for the config
# in this order:
# 1. --config PATH on the command line
# 2. ./config.yaml
# 3. ~/.config/lutron-control/config.yaml
# 4. /etc/lutron-control/config.yaml
#
# The model is: define one or more Lutron `devices` (each reached over serial or
# telnet), then attach `sources` that drive a device's zones. A source can be an
# sACN receiver, an Art-Net receiver, an MQTT light, or an OSC server. When several
# sources target the same device, `priority` decides who wins: a higher-priority
# source that is actively sending locks out lower-priority ones for `hold_sec`
# seconds (so a live DMX show keeps Home Assistant from changing the lights
# mid-cue). DMX carries only zone levels; the richer controls (raise/lower/stop,
# shades, locks, sequence) live on the MQTT and OSC sources.
log:
level: info # debug, info, warn, or error.
type: console # console or json.
outputs:
- console # console, a file path, or default-file (/var/log/<name>.log).
# --- Lutron devices ---
devices:
- name: grafik-eye # Referenced by each source's `device`.
transport: serial # serial or telnet.
# Serial transport (used when transport: serial).
serial:
# Find yours with: ls -lah /dev/serial/by-id/
device: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
baud: 115200 # Must match the dipswitch on the QSE-CI-NWK-E.
# Telnet transport (used when transport: telnet). The QSE-CI-NWK-E telnet
# server listens on port 23 with predetermined logins "nwk" (or "nwk2"); the
# password is only needed if a login passphrase has been configured on the unit.
telnet:
address: 10.0.0.50:23
username: nwk
password: ""
integration_id: 1 # Integration ID bound to the GRAFIK Eye main unit.
zones: 6 # Controllable zones on your model (max 24). Maps to
# zone-controller components 1..zones, action 14.
fade: "00:00" # Fade sent with each level command; "00:00" = instant.
# Phantom-button components that signal integration control disabled/enabled
# (advanced; application-specific programming on the unit). Both default to 0
# (off): the signal is only acted on when set to a non-zero component, so an
# unrelated button can't silently disable the bridge. Set to match your unit.
# disable_component: 74
# enable_component: 75
# Monitoring sent on connect. By default zone-level + reply monitoring are
# ensured (so feedback works over serial too), plus scene monitoring when a
# scene source is attached. Use enable/disable to tune, or manage: false to
# leave the unit's programmed monitoring untouched.
monitoring:
manage: true
# enable: [8] # extra monitoring type numbers to turn on
# disable: [3, 4, 6] # silence button/LED/occupancy noise
# Reliability tuning (optional; defaults shown).
reliability:
rx_timeout_sec: 60
watchdog_interval_sec: 15
reconnect_backoff_min_sec: 1
reconnect_backoff_max_sec: 30
send_all_interval_sec: 10 # periodic full resend; 0 = send zones only on change
reset_cooldown_sec: 10
# --- Control sources ---
sources:
# sACN (E1.31) receiver. The DMX channel mapping is shared by sACN and Art-Net:
# use the sequential layout (start_address + zone/scene counts) for the common
# case, or an explicit `channels` list for full control.
- name: stage-sacn
type: sacn
device: grafik-eye
priority: 10 # Higher than MQTT so a live stream takes control.
hold_sec: 5 # Stay in control for 5s after the last frame.
sacn:
bind: "" # Bind address ("" = all interfaces).
interface: "" # Interface name for multicast (e.g. eth0); often optional on Linux.
universe: 3
# Sequential layout: zones start at start_address (0-indexed), then one
# scene-select channel.
start_address: 0 # zone 1 channel
zones: 6 # zones 1..6 -> channels start_address..+5 (0 = device zone count)
scenes: 0 # >0 adds one scene-select channel after the zones; its
# value (1..scenes) triggers that scene, 0 = no action
# Explicit map (overrides the sequential layout above when set):
# channels:
# - { channel: 1, type: zone, zone: 1 } # channel is 1-indexed DMX address
# - { channel: 7, type: scene } # value selects the scene to trigger
# Art-Net receiver. Listens on UDP 6454 for the configured port address. Uses
# the same DMX channel mapping fields as sACN.
- name: stage-artnet
type: artnet
device: grafik-eye
priority: 10
hold_sec: 5
artnet:
bind: 0.0.0.0
net: 0
subnet: 0
universe: 3
timeout_sec: 5 # Silence before the source is lost (zones black out); 0 disables.
start_address: 0
zones: 6
scenes: 0
# MQTT / Home Assistant lights. Each light drives its own set of QSE zones; a
# light's brightness is applied to every zone it controls, and the first zone in
# the set is mirrored back to Home Assistant as the aggregate state. All of a
# source's lights are grouped under one Home Assistant device.
- name: home-assistant
type: mqtt
device: grafik-eye
priority: 1 # Lowest, so DMX sources override it while streaming.
# fade: "00:01" # Optional per-source zone fade override (SS, MM:SS,
# or HH:MM:SS). Empty uses the device fade; DMX
# sources instead default to instant.
mqtt:
broker: 127.0.0.1
port: 1883
topic: lutron/qse-nwk # Base topic; also used by the scene selector below.
username: mqtt
password: change-me
client_id: "" # Auto-generated when empty.
discovery: true # Publish a Home Assistant discovery config. Entities
# carry an availability topic (<topic>/availability,
# backed by an MQTT Last Will) so Home Assistant marks
# them unavailable when the bridge is offline.
discovery_prefix: homeassistant
device_name: Lutron QSE NWK
scenes: 0 # >0 exposes a scene selector (1..N); commands on
# <topic>/scene/set, state on <topic>/scene, plus a
# Home Assistant select entity when discovery is on.
# Extended controls (each off by default; enable the ones your unit supports).
# These follow the scenes pattern: enabling one publishes its Home Assistant
# entity (when discovery is on) and subscribes its command topic.
shades: 0 # >0 exposes N shade columns (1-3) as covers
# (open/close/stop) on <topic>/shade/<n>/set.
zone_ramp: false # Raise/lower/stop buttons for each light's zones,
# on <light-topic>/{raise,lower,stop}/set.
zone_lock: false # Zone-lock switch on <topic>/zone_lock/set (QS Standalone).
scene_lock: false # Scene-lock switch on <topic>/scene_lock/set (QS Standalone).
sequence: false # Sequence select (Off / Scenes 1-4 / Scenes 5-16)
# on <topic>/sequence/set (QS Standalone).
# Monitoring relay. Publishes the panel's "~" reports to
# <topic>/<monitor_prefix>/<family>/<fields...> for use in automations
# (this is raw state, separate from the Home Assistant entities above; no
# discovery is published for it).
monitor_prefix: monitor
monitor:
enable: [] # #MONITORING types to request from the panel
# (e.g. [3] button, [5] zone, [8] scene; 255 = all).
# Empty relays only what the panel already reports.
families: [] # Restrict forwarded "~" families (e.g. [DEVICE, GROUP]);
# empty forwards every family.
# Lights exposed by this source. Each light has its own base topic (commands
# on <topic>/set, state on <topic>) and the list of zones it controls. Omit
# this whole block to fall back to a single light over every zone using the
# base topic above.
lights:
- name: All Zones # Friendly name in Home Assistant.
topic: lutron/qse-nwk/all
zones: [1, 2, 3, 4, 5, 6] # This one light controls zones 1-6.
# Add more lights to split the panel up, e.g.:
# - name: Front
# topic: lutron/qse-nwk/front
# zones: [1, 2, 3]
# - name: Back
# topic: lutron/qse-nwk/back
# zones: [4, 5, 6]
# OSC (Open Sound Control) server. Exposes the full control surface over UDP;
# the message address (under `prefix`) selects the operation, e.g. from a show
# controller or a TouchOSC layout. Movement/trigger addresses act on receipt
# and ignore their arguments.
#
# <prefix>/zone/<n>/level f|i set zone level (float 0-1, or int 0-255)
# <prefix>/zone/<n>/raise start raising zone <n>
# <prefix>/zone/<n>/lower start lowering zone <n>
# <prefix>/zone/<n>/stop stop raising/lowering zone <n>
# <prefix>/scene i activate scene <i>
# <prefix>/scene/off activate the scene-off look
# <prefix>/shade/<c>/<act> shade column <c>: open|close|preset|raise|lower|stop
# <prefix>/lock/zone i zone lock (0 off, 1 on)
# <prefix>/lock/scene i scene lock (0 off, 1 on)
# <prefix>/sequence i sequence (0 off, 1 scenes 1-4, 2 scenes 5-16)
#
# Monitoring feedback is streamed (when stream_to is set) back out under the
# same prefix, symmetric with the input addresses:
#
# <prefix>/zone/<n>/level f|i reported zone level
# <prefix>/scene i reported active scene
# <prefix>/group/<id>/occupancy i occupancy state (3 occupied, 4 unoccupied)
# <prefix>/monitor/<family>/<fields...> generic fallback for any other report
- name: show-osc
type: osc
device: grafik-eye
priority: 5 # Above MQTT, below a live DMX stream.
hold_sec: 5
osc:
listen: 0.0.0.0:9000 # host:port the OSC server binds.
prefix: /lutron # Address namespace this source responds under.
stream_to: [] # host:port destinations for monitoring feedback,
# e.g. [192.168.1.50:9001]. Empty disables streaming.
level_as_float: true # Send zone levels as 0-1 floats; false sends 0-255 ints.
monitor:
enable: [] # #MONITORING types to request from the panel
# (e.g. [3] button, [5] zone, [8] scene; 255 = all).
families: [] # Restrict forwarded "~" families; empty forwards all.