1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-20 16:55:49 +00:00
Files
esphome/tests/components/canbus
Claude 77242c65ed [canbus] Add packet_transport support for CAN bus
Implements native CANBus transport for the packet_transport component,
enabling ESPHome nodes to share sensor and device data over physical
CAN bus networks.

Key features:
- Packet fragmentation to handle CAN's 8-byte frame limit
- Uses 7 bytes per frame for payload (1 byte for sequence/flags)
- Configurable CAN ID (default 0x600) and extended ID support
- Sequence tracking with error detection and recovery
- Compatible with all packet_transport features (encryption, rolling codes, ping-pong)

Use cases:
- Marine applications with existing CAN bus networks
- Automotive battery management and motor controller data sharing
- Industrial automation sensor networks

Configuration example:
```yaml
canbus:
  - platform: esp32_can
    id: my_can
    tx_pin: GPIO5
    rx_pin: GPIO4
    can_id: 4
    bit_rate: 125kbps

packet_transport:
  platform: canbus
  canbus_id: my_can
  can_id: 0x600
  sensors:
    - my_sensor
  providers:
    - name: remote-device
      encryption: "encryption key"
```

Implements: https://github.com/orgs/esphome/discussions/3255
2025-11-17 21:41:57 +00:00
..