Configuration

lightd

All environment, no config file: the broker credentials must never land on disk in a repository, and the same binary has to work under a systemd unit or a container without knowing which.

VariableDefault
LIGHTD_ADDR:8732listen address
LIGHTD_PALETTE_URLhttp://127.0.0.1:8731palette service
LIGHTD_STAND_IDlp-stand-01default stand
LIGHTD_COVER_TOPICunseta topic of cover images to light the stand from, relative to the prefix, e.g. nowplaying/current/art
LIGHTD_LOOK_TOPICunseta topic that says which covers have a look of their own, e.g. nowplaying/current/look. Needs LIGHTD_COVER_TOPIC
LIGHTD_SPECTRUM_EFFECTsweephow the spectrum look moves: sweep, the rainbow around the strip, or morph, each color in turn. Anything else stops the daemon
LIGHTD_TOPIC_PREFIXedsroot of the topic tree
LIGHTD_MQTT_URLtcp://127.0.0.1:1883tls://mqtt01…:8883 in production
LIGHTD_MQTT_USERNAME / _PASSWORD—broker credentials
LIGHTD_MQTT_CA_FILE—CA for the broker’s certificate
LIGHTD_MQTT_INSECUREfalsebring-up only; never with a real cert
LIGHTD_EFFECTbreathedefault effect: solid, breathe, sweep, morph, chase or scanner
LIGHTD_SPEED / LIGHTD_BRIGHTNESS0.4 / 0.8
LIGHTD_SWATCHES6swatches requested from palette
LIGHTD_MIN_CHROMA0.05below this a swatch is a gray
LIGHTD_SATURATION1.25chroma multiplier for the strip
LIGHTD_MAX_COLORS4palette entries per scene

Invalid values stop the daemon rather than lighting the room wrong quietly.

nowplayd

Environment only, with the same fallbacks to the platform’s kit.env names. A value that cannot be used stops the program.

VariableDefault
NP_MQTT_URLtls://$MQTT_HOST:$MQTT_PORT, else tcp://127.0.0.1:1883broker
NP_MQTT_CLIENT_IDeds-nowplaydmust be unique on the broker
NP_MQTT_USERNAME / NP_MQTT_PASSWORD$MQTT_USERNAME / $MQTT_PASSWORDkit.env carries lightd’s login, so nowplayd names its own
NP_MQTT_CA_FILE$MQTT_CA_FILEthe Deevnet Root CA
NP_MQTT_INSECUREfalsebring-up only
NP_TOPIC_PREFIX$DEEVNET_TENANT, else edsone topic level
NP_CATALOGUESdeezer,itunes,musicbrainzwhere a missing album or cover is looked up, in order; empty switches lookups off
NP_LOOKUP_TIMEOUT10sfor one catalog request
NP_CONTACTthis repository’s URLgoes in the User-Agent sent to catalogs
NP_COVERLESS_SOURCESnonesources reported without a cover: none is published for them and none is looked up (ADR-0016). No source on the workload: Spotify was one until ADR-0031
NP_DARK_SOURCESnonesources no room is lit for: their covers are published as usual, with the look dark, which lightd answers by sending the stand dark (ADR-0028). itunes,spotify on the workload: the stand is for records
NP_IDLE_AFTER15show long a track may sit paused, or nobody report, before current says stopped with no track and the cover topics are emptied, which darkens the stand, or dims it while a source in NP_SOURCE_POWER is switched on (ADR-0028, ADR-0024). 0s is never; at most an hour
NP_IDLE_AFTER_STOPPED1sthe same wait for a source that is stopped and still current: a turntable switched on with nothing playing. Short, because its driver has already waited out twenty seconds of silence. 0s is never; at most a day
NP_NO_CONTROLS_SOURCESnonesources a controller is told to offer nothing for (ADR-0025). turntable on the workload
NP_LOG_ENDPOINT, NP_LOG_INGEST_TOKENLOG_ENDPOINT and LOG_INGEST_TOKEN, as kit.env gives themthe tenant’s log store and the token that writes to its workload partition: where the counts of calls to outside services go once a minute (ADR-0027). Without both, the counts are in the journal only. The token is secret
NP_SOURCE_POWERnonesource=beacon pairs: a source whose equipment has a beacon on its switch. While the beacon is connected that source is current; while it is not, the source is not heard; a beacon never heard from changes nothing (ADR-0023). turntable=turntable-power-01 on the workload

console

Environment only. On the workload the broker’s settings come from kit.env; a CONSOLE_* variable wins.

VariableDefault
CONSOLE_ADDR:8080where it listens; :80 on the workload
CONSOLE_MQTT_URLtls://$MQTT_HOST:$MQTT_PORT, else tcp://127.0.0.1:1883broker
CONSOLE_MQTT_CLIENT_IDeds-consolemust be unique on the broker
CONSOLE_MQTT_USERNAME / CONSOLE_MQTT_PASSWORD$MQTT_USERNAME / $MQTT_PASSWORDthe console names its own login
CONSOLE_MQTT_CA_FILE$MQTT_CA_FILEthe Deevnet Root CA
CONSOLE_MQTT_INSECUREfalsebring-up only
CONSOLE_TOPIC_PREFIX$DEEVNET_TENANT, else edsone topic level
CONSOLE_STRIP_LEDS18how many LEDs the page draws for a stand, 1 to 300. The firmware’s LP_LED_COUNT, which nothing on the bus reports
CONSOLE_DASHBOARD_URLnonewhere the page’s link to Grafana goes
CONSOLE_DOCS_URLthis sitewhere the page’s link to these records goes

lp-stand

Build-time settings live in idf.py menuconfig under LP jacket stand: stand identifier, topic prefix, strip length and GPIO.

Credentials are not build-time. WiFi and broker credentials are provisioned into a dedicated creds NVS partition with make provision (or make wifi-config by hand), so the firmware image carries no secret. The WiFi key and the broker password are NVS-only, with no Kconfig option; the SSID, broker URI and username keep Kconfig defaults for an unprovisioned stand. See Provisioning a Stand.

Flash layout

PartitionTypeOffsetSize
nvsdata/nvs0x900024K
otadatadata/ota0xf0008K
phy_initdata/phy0x110004K
ota_0app0x200001.5M
ota_1app0x1A00001.5M
credsdata/nvs0x32000016K

Two OTA slots exist from the start because retrofitting them means repartitioning a device that is glued to a shelf. The table needs 3.25 MB, so the build requires a 4 MB flash part.