I am getting a consistent error from the CAN bus integration.
[20:49:10][W][component:204]: Component canbus took a long time for an operation (0.10 s).
[20:49:10][W][component:205]: Components should block for at most 20-30ms.
I get it every few CAN frames. Here is a longer log…
[20:49:10][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:10][W][component:204]: Component canbus took a long time for an operation (0.10 s).
[20:49:10][W][component:205]: Components should block for at most 20-30ms.
[20:49:11][D][canbus:067]: received can message (#1) extended can_id=0x15fd0723 size=8
[20:49:11][D][can_id:057]: Received CAN message with ID: 15fd0723
[20:49:11][D][can_data:065]: Byte 0: a7
[20:49:11][D][can_data:065]: Byte 1: c0
[20:49:11][D][can_data:065]: Byte 2: 6f
[20:49:11][D][can_data:065]: Byte 3: 77
[20:49:11][D][can_data:065]: Byte 4: ff
[20:49:11][D][can_data:065]: Byte 5: 7f
[20:49:11][D][can_data:065]: Byte 6: ff
[20:49:11][D][can_data:065]: Byte 7: ff
[20:49:11][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:11][D][canbus:067]: received can message (#1) extended can_id=0xdf50b23 size=8
[20:49:11][D][can_id:057]: Received CAN message with ID: df50b23
[20:49:11][D][can_data:065]: Byte 0: cf
[20:49:11][D][can_data:065]: Byte 1: bb
[20:49:11][D][can_data:065]: Byte 2: 00
[20:49:11][D][can_data:065]: Byte 3: 00
[20:49:11][D][can_data:065]: Byte 4: 00
[20:49:11][D][can_data:065]: Byte 5: 00
[20:49:11][D][can_data:065]: Byte 6: 00
[20:49:11][D][can_data:065]: Byte 7: ff
[20:49:11][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:11][D][canbus:067]: received can message (#2) extended can_id=0x19f51323 size=8
[20:49:11][D][can_id:057]: Received CAN message with ID: 19f51323
[20:49:11][D][can_data:065]: Byte 0: 62
[20:49:11][D][can_data:065]: Byte 1: 00
[20:49:11][D][can_data:065]: Byte 2: ff
[20:49:11][D][can_data:065]: Byte 3: ff
[20:49:11][D][can_data:065]: Byte 4: ff
[20:49:11][D][can_data:065]: Byte 5: ff
[20:49:11][D][can_data:065]: Byte 6: ff
[20:49:11][D][can_data:065]: Byte 7: ff
[20:49:11][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:11][W][component:204]: Component canbus took a long time for an operation (0.10 s).
[20:49:11][W][component:205]: Components should block for at most 20-30ms.
[20:49:12][D][canbus:067]: received can message (#1) extended can_id=0x15fd0723 size=8
[20:49:12][D][can_id:057]: Received CAN message with ID: 15fd0723
[20:49:12][D][can_data:065]: Byte 0: a9
[20:49:12][D][can_data:065]: Byte 1: c0
[20:49:12][D][can_data:065]: Byte 2: 6f
[20:49:12][D][can_data:065]: Byte 3: 77
[20:49:12][D][can_data:065]: Byte 4: ff
[20:49:12][D][can_data:065]: Byte 5: 7f
[20:49:12][D][can_data:065]: Byte 6: ff
[20:49:12][D][can_data:065]: Byte 7: ff
[20:49:12][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:12][W][component:204]: Component canbus took a long time for an operation (0.05 s).
[20:49:12][W][component:205]: Components should block for at most 20-30ms.
[20:49:12][D][canbus:067]: received can message (#1) extended can_id=0xdf50b23 size=8
[20:49:12][D][can_id:057]: Received CAN message with ID: df50b23
[20:49:12][D][can_data:065]: Byte 0: d0
[20:49:12][D][can_data:065]: Byte 1: bb
[20:49:12][D][can_data:065]: Byte 2: 00
[20:49:12][D][can_data:065]: Byte 3: 00
[20:49:12][D][can_data:065]: Byte 4: 00
[20:49:12][D][can_data:065]: Byte 5: 00
[20:49:12][D][can_data:065]: Byte 6: 00
[20:49:12][D][can_data:065]: Byte 7: ff
[20:49:12][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:12][D][canbus:067]: received can message (#2) extended can_id=0x19f51323 size=8
[20:49:12][D][can_id:057]: Received CAN message with ID: 19f51323
[20:49:12][D][can_data:065]: Byte 0: 82
[20:49:12][D][can_data:065]: Byte 1: 00
[20:49:12][D][can_data:065]: Byte 2: ff
[20:49:12][D][can_data:065]: Byte 3: ff
[20:49:12][D][can_data:065]: Byte 4: ff
[20:49:12][D][can_data:065]: Byte 5: ff
[20:49:12][D][can_data:065]: Byte 6: ff
[20:49:12][D][can_data:065]: Byte 7: ff
[20:49:12][D][can_id:068]: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20:49:12][W][component:204]: Component canbus took a long time for an operation (0.10 s).
[20:49:12][W][component:205]: Components should block for at most 20-30ms.
[20:49:13][D][canbus:067]: received can message (#1) extended can_id=0x15fd0723 size=8
[20:49:13][D][can_id:057]: Received CAN message with ID: 15fd0723
[20:49:13][D][can_data:065]: Byte 0: ab
[20:49:13][D][can_data:065]: Byte 1: c0
[20:49:13][D][can_data:065]: Byte 2: 6f
[20:49:13][D][can_data:065]: Byte 3: 77
[20:49:13][D][can_data:065]: Byte 4: ff
[20:49:13][D][can_data:065]: Byte 5: 7f
[20:49:13][D][can_data:065]: Byte 6: ff
[20:49:13][D][can_data:065]: Byte 7: ff
This is my yaml…
spi:
id: spi_bus
clk_pin: GPIO18
miso_pin: GPIO19
mosi_pin: GPIO23
canbus:
- platform: mcp2515
cs_pin: GPIO5
spi_id: spi_bus
can_id: 0
use_extended_id: True
bit_rate: 250kbps
on_frame:
- can_id: 0
use_extended_id: True
can_id_mask: 0
then:
- lambda: |-
ESP_LOGD("can_id", "Received CAN message with ID: %x", can_id);
// Extracting the PGN directly
uint32_t PGN = (can_id >> 8) & 0x3FFFF; // Masking to 18 bits after shifting
for (int i = 0; i < 8; i++) {
ESP_LOGD("can_data", "Byte %d: %02x", i, x[i]);
}
ESP_LOGD("can_id", "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Any ideas why?
Also what is the significance of “message (#2)” . I cannot figure out what the #id means. It seems to increment until an error but not always.