Skip to content

muxen-config — Overview ​

muxen-config is the boat's configuration store. It holds the description of the installation — which devices are fitted, what each one is called, which button drives which output, which tank sensor feeds which gauge, what the screens show — and it publishes exactly one of those descriptions as the configuration the boat actually runs on.

Nothing on board reads a project directly. Every other MUXEN service reads one file, /etc/muxen/deploy.json, and that file is a copy of the project that was last deployed. Editing a project changes nothing until someone deploys it; deploying it changes the whole boat at once.

The daemon itself has no user interface. The configuration interface on the boat's screen talks to it over HTTP, and so does anything else that needs to read or write the installation.

The problem it solves ​

A MUXEN installation is not described by any single device. A keypad knows it has four buttons; it does not know that button 2 is "saloon lights". A power output knows it is on or off; it does not know it feeds a fridge. The equations that tie them together live in the devices as parameters, and the names, the screens and the sensor scaling live nowhere at all unless something stores them.

muxen-config is that something. It keeps the whole installation as one JSON document per boat configuration — a project — and gives it:

  • A place to live. /etc/muxen/configuration/<id>.json, one file per project, on the Brain, surviving reboots and package upgrades.
  • An editing surface. A REST API over HTTP, so the configuration interface can add a device, rename it, attach a sensor or wire a button without ever handling the file.
  • A single act of publication. PUT /project/<id>/deploy copies the project over /etc/muxen/deploy.json. That copy is atomic: consumers read a complete file or the previous one, never a half-written mixture.
  • Somewhere to fall back to. A daily job keeps up to 30 dated copies of deploy.json, and any project can be exported and re-imported whole.

Where it sits ​

 configuration UI  ──HTTP──►  nginx  ──►  muxen-configd  ──►  /etc/muxen/configuration/<id>.json
 (screen, laptop)             :8080       127.0.0.1:12000            │
                                                                     │ PUT …/deploy
                                                                     ▼
                             every other muxen-* service  ◄──  /etc/muxen/deploy.json
It readsFromPurpose
/etc/muxen/configuration/*.jsondisk, per requestthe projects being edited
/usr/share/muxen-config/templates/*.jsondisk, read-onlyfactory templates, offered alongside projects
/etc/muxen/deploy.jsondisk, per requestwhat GET /deploy serves
/etc/muxen/apps/*disk, per requestopaque per-application blobs
It writesToPurpose
/etc/muxen/configuration/<id>.jsondiskevery project edit
/etc/muxen/deploy.jsondisk, atomicallythe deployed configuration
/etc/muxen/apps/<id>diskwhatever an application asked it to keep

It is a purely local, purely file-backed service. It joins no bus, publishes no MQTT topic, opens no outbound connection, and listens on 127.0.0.1 only — reaching it from anywhere else means going through nginx.

What a project is ​

A project is one JSON document describing one complete boat configuration. It carries metadata (name, id, creation and modification times), and a section per concern:

SectionWhat it holds
settingsboat-wide values: languages, degraded-mode names, feature flags, the optional project password
devicesevery MUXEN device fitted, with its function, instance and parameter list
muxingthe switching rules — which input drives which output — and the device parameters they generate
sensorsanalogue sensor definitions: input channel, output unit, scaling
energythe electrical zones
buttonMappingphysical button → named function
viewsthe screen pages, their elements and their translations
mediaimages and other blobs, base64-encoded inside the project
commissioningoption groups that strip a template down to the boat actually built
synapseautomation instances, keyed by instance id

The project file documents every section field by field.

Templates and commissioning ​

A boat is rarely configured from nothing. The package creates /usr/share/muxen-config/templates/, and any project file placed there appears in the project list marked type: template. Templates are on a read-only filesystem, so they can be read and duplicated but never edited.

Duplicating a template is also where commissioning happens: the duplicate request may carry the answers to the template's option groups — "is there a watermaker?", "how many cabins?" — and the daemon applies them while copying, removing the devices, sensors, views and switching rules the boat does not have. What comes out is a project for that hull, not a catalogue.

Projects covers the whole lifecycle.

Passwords ​

A project can carry a password setting. Once it does, every request touching that project — reading it, editing it, deploying it, deleting it, overwriting it, restoring over it — must present the matching credential. There is no user database and no session: the setting stores a SHA-256 hash, the client sends it in an Authorization header, and the daemon compares the two.

Document map ​

DocumentContent
Getting startedinstall, verify, create and deploy a first project
Projectsprojects, templates, commissioning, passwords, backup and restore
Deploymentdeploying, deploy.json, serving it, caching, the daily backups
Troubleshootingsymptom → cause → check → fix, plus FAQ and tips
ReferenceCLI, units, paths, the full endpoint table, status and exit codes
The project filethe project JSON document, section by section

Integration of multiplexed solutions
MUXEN and the MUXEN logo are trademarks of MUXEN SAS.