Appearance
Commissioning
The gateway reads its identity when it starts, so every change of instance number ends with a restart. Write settings with --reboot.
Everything below is run on the boat's Brain.
1. Wire it and check it lives
CAN 1 to the MUXEN bus, CAN 2 to the Aquabase 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 --scanNote the UID. You will address the box by UID until it has been given its numbers.
3. Give it its identities
The gateway is two MUXEN devices, and each has its own instance number:
| Device | Function | Default | What it is |
|---|---|---|---|
| Watermaker | 20 | 0 | the watermaker itself — the important one |
| Generic I/O | 17 | 255 (not addressed) | the relays and inputs of the box itself |
Read that table twice. The two defaults are not the same. The box's own I/O ships not addressed and stays quiet until you number it, as on every CanCan — but the watermaker device ships as instance 0 and starts publishing as soon as the unit talks to it. On a boat with one watermaker that is convenient; on a boat with two, the second gateway must be numbered before it is connected to the MUXEN bus, or both answer as watermaker 0.
sh
# the watermaker, here instance 1
muxen-uds -i can0 uid --uid <the-box-uid> --instance 1 --preferred-function-code 20
# the box's own I/O, here instance 4
muxen-uds -i can0 uid --uid <the-box-uid> --instance 4 --preferred-function-code 17--preferred-function-code is not optional here: this box answers on two functions, and without it the tool does not know which of the two you are numbering.
Instance numbers 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.
4. Check the watermaker side is alive
Power the watermaker up. Within a few seconds the gateway should start publishing:
sh
mosquitto_sub -h 127.0.0.1 -t 'device/20/#' -vTwo topics must appear once a second:
| Topic | What it carries |
|---|---|
device/20/<instance>/life | the mode the machine is in, salinity, production flow |
device/20/<instance>/state | the three pressures, valves, pumps, breakers, hour meter |
Silence here means the gateway is not hearing the unit at all. It publishes nothing — not zeros, nothing — until the watermaker's state message arrives, and it stops again after 5 seconds of silence. Go to Common mistakes — Aquabase gateway.
5. Try a command
With the unit in standby and the sea cocks open, ask it to produce:
sh
mosquitto_pub -h 127.0.0.1 -t 'device/20/<instance>/command' -m '{"produce":true}'
mosquitto_pub -h 127.0.0.1 -t 'device/20/<instance>/command' -m '{"rinsing":true}'
mosquitto_pub -h 127.0.0.1 -t 'device/20/<instance>/command' -m '{"off":true}'state on the life topic must follow within a second or two. If it does not move, the unit refused the command — its own controller has the last word, and it will not start into a fault or an emergency stop.
6. Check the alarms
Make the unit report something it is unhappy about — a closed sea cock is usually enough — and check that an alarm appears on the boat, then clears when the situation is fixed. Compare the alarm text with the fault shown on the Aquabase panel; see Common mistakes — Aquabase gateway if the two do not name the same thing.
7. Keep a copy
sh
muxen-uds -i can0 -F 20 -I <instance> readconfig --save-as-csv aquabase.csv
muxen-uds -i can0 -F 17 -I <io-instance> readconfig --save-as-csv aquabase-io.csv