Appearance
Commissioning
Do this with the main switch closed and the boat energised. A module whose switch is open cuts the bus power ten minutes later and then stops answering the bus entirely — that is normal, and it is the one state in which you cannot configure it.
Everything below is run on the boat's Brain.
1. Wire it and check it lives
CAN to the MUXEN bus, LIN to the battery sensor, both relay outputs and the feedback contact to the main switch. The system LED must blink once a second. Anything else: see Common mistakes.
2. Find it on the bus
sh
muxen-uds -i can0 uid --scanA factory module has no instance number yet (InstanceNum = 255) for the switch itself and publishes nothing until it gets one.
The scan answers twice with the same UID: once for the switch, and once for the battery whenever a sensor is answering on the LIN pair. They are the same physical box.
3. Give the switch its identity
sh
muxen-uds -i can0 uid --uid <the-module-uid> --instance 0 --preferred-function-code 25--preferred-function-code is not optional: this box answers on two functions, and without it the tool does not know which one you are numbering.
Instance numbers run 0…62 and must be unique per function on the boat. Do this one box at a time — two unconfigured boxes on the bus at once collide on the parking address.
Power-cycle the module once it is numbered. The address it listens on for commands and for configuration is taken when it starts; until it has restarted, the steps below will not reach it.
4. Give the battery its identity
The battery is a separate MUXEN device with a number of its own, and unlike the switch it does not start at 255: a factory module publishes battery 0 as soon as the sensor answers. On a boat with a single MDV there is nothing to do here. With more than one, or with an existing battery 0 on the bus, renumber it before they collide:
sh
muxen-uds -i can0 uid --uid <the-module-uid> --instance 1 --preferred-function-code 5Function numbers are independent of each other: the switch and the battery may both be instance 0 without conflicting.
5. Tell it which sensor is fitted
BatteryIbsType is 1 (Hella IBS 24 V) out of the box. For a 12 V bank:
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name BatteryIbsType --value 0This one is read only at startup. Power-cycle the module after changing it, or it keeps talking to the sensor in the wrong language and reports no battery.
6. Check which way the switch is driven
Command the switch off and back on from the Brain and watch what actually happens:
sh
mosquitto_pub -h 127.0.0.1 -t 'device/25/<switch-instance>/command' -m '{"relay": false}'
mosquitto_pub -h 127.0.0.1 -t 'device/25/<switch-instance>/command' -m '{"relay": true}'
mosquitto_pub -h 127.0.0.1 -t 'device/25/<switch-instance>/command' -m '{"relay": "auto"}'If false closes the switch and true opens it, the two coils are crossed. Fix it in configuration rather than in the loom:
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name ReverseSwitchDrive --value 1Then set the drive timeout to something close to the switch's real travel time. The module drives a coil until the feedback contact confirms the move, and gives up after RemoteSwitchTimeout — 300 000 ms out of the box, which is far longer than any switch takes:
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name RemoteSwitchTimeout --value 30007. Watch it on the Brain
sh
mosquitto_sub -h 127.0.0.1 -t 'device/25/#' -v # the switch itself
mosquitto_sub -h 127.0.0.1 -t 'device/5/#' -v # the batteryThe switch frame carries the position of the switch, whether the bus is being powered, whether the module's own supply is good, the injected current, and the two boat power-up / power-down flags.
8. Decide how long the boat stays alive after switch-off
When the main switch opens, the module keeps the bus powered for PowerInjectionOffDelay — 600 000 ms, ten minutes by default — then cuts it and goes to sleep. That window is what lets the Brain and the screens shut down properly. Shorten it only if you know what is still running at the end of it:
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name PowerInjectionOffDelay --value 300000OnOffPulseLength (2 000 ms) is how long the boat power-up and power-down flags stay set in the frame after the switch moves. Devices that react to those flags need them long enough to notice.
9. Bind the battery to its parc
BindToParc is left on automatic. On the first valid voltage reading the module decides which battery parc the bank belongs to, writes the answer to flash and never revisits it. Set it by hand when the automatic answer is wrong:
sh
muxen-uds -i can0 -F 5 -I <battery-instance> writeconfig --name BindToParc --value 3The voltage windows it uses are in Reference — MDV battery switch module.
10. Check the battery limits
The Hella sensor announces no charge or discharge limits of its own — it is a shunt, not a BMS. The limits published with the battery are the ones written in its configuration, and their defaults suit a 24 V bank. For a 12 V bank, for example:
sh
muxen-uds -i can0 -F 5 -I <battery-instance> writeconfig --name VChargeMax --value 145
muxen-uds -i can0 -F 5 -I <battery-instance> writeconfig --name VDischMax --value 115Voltages are in 0.1 V, currents in 0.1 A. Set AlertVmin and AlertVmax to the bank's real working range at the same time: they are what the module uses to ask the boat for charge or to declare the bank full.
11. Optional — switch the boat from a local button
RemoteSwitchEqn is a logic equation evaluated on what passes on the MUXEN bus. Every rising edge of its result toggles the main switch, exactly as a press on a physical button would. Left empty — the default — the switch obeys the bus and nothing else.
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name RemoteSwitchEqn --value 'B8S(3,I,1,0,0)'That example follows dry-contact input 1 of Bloc 8 number 3. The operators are & (and), | (or), ! (not), ^ (exclusive or) and # (latch), with [ ] around a sub-expression. The equation is read once, at startup: power-cycle the module after changing it.
Think about what you are wiring here. This equation switches the boat off.
12. Calibrate the injected current — only if you have to
IMeaCoef scales the current measurement, and its default matches the shunt on the board. If a reference ammeter disagrees, multiply the coefficient by the ratio of the two readings: a module publishing 20.0 A where the ammeter reads 22.0 A needs 291 × 22.0 ÷ 20.0, that is 320.
sh
muxen-uds -i can0 -F 25 -I <switch-instance> writeconfig --name IMeaCoef --value <new-coefficient>13. Keep a copy
sh
muxen-uds -i can0 -F 25 -I <switch-instance> readconfig --save-as-csv mdv-switch.csv
muxen-uds -i can0 -F 5 -I <battery-instance> readconfig --save-as-csv mdv-battery.csvA factory reset erases the instance numbers, the parc binding, the sensor type and the equation. The module comes back working, but not configured for this boat.
