Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

lightmime keeps its settings in one TOML file. The window and the CLI write it for you; editing it by hand is only needed for the settings without a control, and for MQTT.

InstallConfig file
Native~/.config/lightmime/config.toml
Flatpak~/.var/app/io.github.pataar.lightmime/config/lightmime/config.toml

--config <path> points any command at another file. The file holds the bridge keys and the MQTT password, so lightmime writes it readable by you only (mode 0600). A missing file or key means the default.

Restart lightmime after editing the file by hand; the window and Home Assistant write their own changes into it. Those writes only touch the values that changed, so your comments, layout and any keys lightmime doesn’t know about stay as they are.

An annotated example is in contrib/config.example.toml.

[bridge]

KeyDefaultMeaning
hostThe bridge’s IP address or hostname.
app_keyApplication key from pairing.
client_key32 hex characters from pairing; the key for the encrypted stream.
entertainment_config_idThe area to sync to (set by lightmime use-area).

[capture]

KeyDefaultMeaning
source"monitor"What the screen picker offers: "monitor" or "window".
width, height64, 36Frames are scaled down to this size before the colours are taken. More gives no visible gain.

[sync]

KeyDefaultRangeMeaning
fps301–60Frames per second sent to the bridge.
brightness1.00.0–1.0Output brightness.
smoothing0.30.0–0.95Smoothing between frames.
saturation1.20.0–3.0Saturation; 1.0 keeps the screen’s colours.
region_size0.30.05–1.0Part of the screen each light averages.

Values outside the range are clamped. See Tuning.

[mqtt]

KeyDefaultMeaning
enabledfalseConnect to the broker and appear in Home Assistant.
host, port"", 1883The broker.
username, password""Broker login, if it needs one.
tlsfalseConnect over TLS. Brokers usually listen for TLS on port 8883.
ca_file""PEM file with the CA that signed the broker’s certificate, for a self-signed broker. Empty trusts the system’s CAs.
discovery_prefix"homeassistant"Home Assistant’s discovery prefix.
base_topic"lightmime"First part of every topic.
node_idthe hostnameNames this machine in topics, entity ids and the MQTT client id. Must be unique per machine on the broker.

Other files

WhatNativeFlatpak
Which screen to capture (the portal’s restore token)~/.local/state/lightmime/restore_token~/.var/app/io.github.pataar.lightmime/.local/state/lightmime/restore_token

Delete the restore token to be asked for the screen again.