mirror of
https://github.com/esphome/esphome.git
synced 2025-11-18 15:55:46 +00:00
77242c65ed66f75b54fa63d03e41463ccbf5b928
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
Description
Languages
C++
64.5%
Python
35.3%
C
0.1%
