Skip to content

Commissioning ​

Order matters here: the gateway builds its list of paired transmitters when it starts, so every pairing change ends with a restart.

Everything below is run on the boat's Brain.

1. Wire it and check it lives ​

CAN to the MUXEN bus, power on. 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 --scan

A gateway that has never been configured parks itself on instance 63 and publishes nothing at all until it is given a real instance. This scan finds it anyway, by its UID.

3. Give it its instance ​

The gateway is a single MUXEN device — an SFSP receptor, function 22 — so there is only one instance number to hand out. A box that has never been configured is addressed by its UID, not by its instance; the UID comes from the scan above:

sh
muxen-uds -i can0 uid --uid <the-box-uid> --instance 0

Instance numbers run 0…62 and must be unique per function on the boat. 63 is the parking address and is not a usable instance.

Do this one box at a time — two unconfigured boxes on the bus at once collide on the parking address.

From here on the gateway answers on -F 22 -I 0, and publishes on device/22/0/….

4. Check it is publishing ​

sh
mosquitto_sub -h 127.0.0.1 -t 'device/22/0/#' -v

A life frame must arrive every second, carrying NbEmulatedInter — the number of transmitters the gateway has loaded. On a new box it is 0.

If nothing arrives, the instance was not taken. Go back to step 3.

5. Pair a switch ​

A transmitter is paired by writing its 32-bit identifier into one of 63 slots, SfspInter0 … SfspInter62. The slot number becomes the instance number of the MUXEN switch: the transmitter written into SfspInter5 appears on the boat as switch instance 5. Pick the slots deliberately — they are the numbering the rest of the boat will use.

Watch the gateway while you press:

sh
mosquitto_sub -h 127.0.0.1 -t 'device/22/0/state' -v

Press a button on the switch you want to pair. The gateway reports the identifier of any transmitter it does not recognise:

device/22/0/state {"UnknowInterId":305419896,...}

Press it twice and check you get the same number both times, then write that number into the slot you chose and restart the box:

sh
muxen-uds -i can0 -F 22 -I 0 writeconfig --name SfspInter5 --value 305419896 --reboot

Repeat for each switch. After the restart, pressing that switch publishes on device/23/5/life — a MUXEN switch, ready to be assigned to anything.

WARNING

Only pair an identifier you have seen twice from the switch in your hand. If somebody else presses a switch elsewhere on the boat at the same moment, its identifier lands on the same topic and looks exactly like yours.

6. Re-reading the identifier of a switch that is already paired ​

A transmitter that is already paired stays silent on the state topic — that topic only reports transmitters the gateway does not know. To read the identifier of one that is already in a slot, turn on the "report every transmitter" mode first:

sh
muxen-uds -i can0 -F 22 -I 0 routine --action 1 --routine 2 --payload 01   # on
muxen-uds -i can0 -F 22 -I 0 routine --action 1 --routine 2 --payload 00   # off

The mode is not saved: it is off again after a restart.

7. Undo a pairing ​

Clear the slot and restart:

sh
muxen-uds -i can0 -F 22 -I 0 writeconfig --name SfspInter5 --clear --reboot

An empty slot is a slot holding 0. After the restart, switch instance 5 is no longer published at all, and pressing that switch reports its identifier on the state topic again, as an unknown transmitter.

Clearing a slot changes nothing else: the other slots keep their numbering, and nothing is renumbered to close the gap.

8. Replace a broken switch ​

This is the case the slot numbering is designed for. The rest of the boat refers to the switch by its instance, which is its slot number — so keep the slot and change the identifier inside it:

  1. Fit the new switch.
  2. Turn on report-every-transmitter mode (step 6) if you want to confirm the old one is really dead.
  3. Press the new switch and read the new identifier off device/22/0/state.
  4. Write it into the same slot the old one used:
sh
muxen-uds -i can0 -F 22 -I 0 writeconfig --name SfspInter5 --value <new-id> --reboot

Nothing else on the boat has to change. If instead you pair the new switch into a free slot, it comes up as a different switch instance and every assignment that referred to instance 5 has to be redone.

9. Check the count and the radio ​

sh
mosquitto_sub -h 127.0.0.1 -t 'device/22/0/life' -v

NbEmulatedInter must equal the number of slots you filled. If it is lower, a slot did not save, or the box has not been restarted since.

Then check each switch actually reaches the gateway from where it is fitted:

sh
mosquitto_sub -h 127.0.0.1 -t 'device/23/5/life' -v

bp0…bp3 follow the buttons, and rssi carries the signal strength of the last telegram received from that switch. A switch that has never been heard reports 0. Press each switch in its final position and confirm the gateway sees it; a switch that only works when you stand next to the gateway is a siting problem, not a pairing problem.

10. Keep a copy ​

sh
muxen-uds -i can0 -F 22 -I 0 readconfig --save-as-csv enocean-pairing.csv

The pairing is the only thing in this installation that cannot be recovered from the equipment itself. It lives in the gateway, not in the switches: a configuration reset erases it, and re-pairing means walking the boat pressing every switch again.

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