BlogContact

CAN Bus

Switching on the CAN bus and setting its speed, node ID and master/slave mode.

The controller has a CAN bus port (terminals H and L). boneIO uses it to talk to other devices over the CANopen protocol, for example another boneIO Black, or an ESPHome device running esphome-canopen. The bus is off by default.

For wiring, see the hardware installation page for your model, for example boneIO Black 32x10A.

Switching the bus on

  1. Open Settings → Connections → CAN Bus
  2. Switch on Enable CAN Bus. The rest of the fields appear once it is on.
  3. In CAN Interface, pick the interface the panel found on the controller. If the list says No CAN interfaces detected, the operating system does not see a CAN port, and no setting on this page will fix that.
  4. Set Bitrate. It must be the same on every device on the bus. The default, 125 kbps, matches esphome-canopen.
  5. Leave Node ID at auto unless you have a reason to change it (see below).
  6. Choose the Mode (see below).
  7. Click Save and then Restart Now. The section carries the restart badge: nothing changes until the application restarts.
FieldWhat it does
Enable CAN BusTurns CAN communication on or off.
CAN InterfaceThe CAN port to use, chosen from those detected on this controller.
BitrateBus speed: 10, 20, 50, 100, 125 (default), 250, 500 kbps or 1 Mbps.
Node IDThis device's address on the bus: auto or a number from 1 to 127.
ModeMaster (has LAN/MQTT) or Slave (CAN only).
Auto-setup interfaceSets up the CAN port with the chosen bitrate each time the application starts. On by default.
Restart on bus-off errorRestarts the CAN port when the bus stops because of too many errors. On by default.

Node ID

Every device on one bus needs its own ID. With auto, the controller works out an ID from its MAC address and keeps it, so it stays the same across restarts. Type a number from 1 to 127 only if two devices ended up with the same ID, or if another device on the bus expects this one at a fixed address.

Master or slave

  • Master (has LAN/MQTT): the controller is on the network. It passes the data of slave devices on to Home Assistant and sends them commands.
  • Slave (CAN only): the device has no network connection and sends its data only over the CAN bus, to a master.

A typical setup has one master connected to the network and one or more slaves.

Auto-setup interface and Restart on bus-off error need system permissions on the controller. If the CAN port does not come up after a restart, open Settings → Maintenance → System migrations and apply any pending migrations.

After the bus is on

With the bus on, the Scan CAN button appears in Settings → Connections → Remote Devices, next to Scan ESPHome and Scan WLED. It lists the devices that answered on the bus. See Remote Devices.