I'm using multiple pcf8574 port expanders on an i2c bus. They work fine using them as GPIOs. My intention is to use some pins in the pcf8574's in a keypad_matrix. Doing so, fills the logs with an warnings that reads are taking too long (~9-10 per second):
[14:42:42][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:42:42][W][component:205]: Components should block for at most 20-30ms.
I raised this on discord, @ssieb highlighted that the same issue had fixed in a recent PR (5137). I've taken the changes and applied them to the pcf8574 but the it's not solved the issue and I don't know enough to debug it.
[14:57:05][I][app:102]: ESPHome version 2023.8.1 compiled on Aug 22 2023, 14:05:30
[14:57:05][C][pcf8574:027]: PCF8574:
[14:57:05][C][pcf8574:028]: Address: 0x24
[14:57:05][C][pcf8574:029]: Is PCF8575: NO
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][pcf8574:027]: PCF8574:
[14:57:06][C][pcf8574:028]: Address: 0x20
[14:57:06][C][pcf8574:029]: Is PCF8575: NO
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][pcf8574:027]: PCF8574:
[14:57:06][C][pcf8574:028]: Address: 0x22
[14:57:06][C][pcf8574:029]: Is PCF8575: NO
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][pcf8574:027]: PCF8574:
[14:57:06][C][pcf8574:028]: Address: 0x21
[14:57:06][C][pcf8574:029]: Is PCF8575: NO
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][logger:301]: Logger:
[14:57:06][C][logger:302]: Level: DEBUG
[14:57:06][C][logger:303]: Log Baud Rate: 115200
[14:57:06][C][logger:305]: Hardware UART: UART0
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][i2c.arduino:053]: I2C Bus:
[14:57:06][C][i2c.arduino:054]: SDA Pin: GPIO14
[14:57:06][C][i2c.arduino:055]: SCL Pin: GPIO15
[14:57:06][C][i2c.arduino:056]: Frequency: 50000 Hz
[14:57:06][C][i2c.arduino:059]: Recovery: bus successfully recovered
[14:57:06][I][i2c.arduino:069]: Results from i2c bus scan:
[14:57:06][I][i2c.arduino:075]: Found i2c device at address 0x20
[14:57:06][I][i2c.arduino:075]: Found i2c device at address 0x21
[14:57:06][I][i2c.arduino:075]: Found i2c device at address 0x22
[14:57:06][I][i2c.arduino:075]: Found i2c device at address 0x24
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][restart.button:017]: Restart Button 'ESP Restart Hub Downstairs'
[14:57:06][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:06][W][component:205]: Components should block for at most 20-30ms.
[14:57:06][C][safe_mode.button:022]: Safe Mode Button 'ESP Restart to Safe Mode Hub Downstairs'
[14:57:06][C][safe_mode.button:022]: Icon: 'mdi:restart-alert'
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][status:034]: Status Binary Sensor 'ESPHome Status Hub Downstairs'
[14:57:07][C][status:034]: Device Class: 'connectivity'
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][matrix_keypad:090]: Matrix Keypad:
[14:57:07][C][matrix_keypad:091]: Rows:
[14:57:07][C][matrix_keypad:093]: Pin: 0 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 1 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 2 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 3 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 4 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 5 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 6 via PCF8574
[14:57:07][C][matrix_keypad:093]: Pin: 7 via PCF8574
[14:57:07][C][matrix_keypad:095]: Cols:
[14:57:07][C][matrix_keypad:097]: Pin: 0 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 1 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 2 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 3 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 4 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 5 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 6 via PCF8574
[14:57:07][C][matrix_keypad:097]: Pin: 7 via PCF8574
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][ethernet:221]: Ethernet:
[14:57:07][C][ethernet:363]: IP Address: 192.168.1.86
[14:57:07][C][ethernet:364]: Hostname: 'hub_downstairs'
[14:57:07][C][ethernet:365]: Subnet: 255.255.255.0
[14:57:07][C][ethernet:366]: Gateway: 192.168.1.254
[14:57:07][C][ethernet:372]: DNS1: 0.0.0.0
[14:57:07][C][ethernet:373]: DNS2: 0.0.0.0
[14:57:07][C][ethernet:397]: MAC Address: 94:3C:C6:3C:31:2F
[14:57:07][C][ethernet:402]: Is Full Duplex: YES
[14:57:07][C][ethernet:407]: Link Speed: 100
[14:57:07][C][ethernet:224]: Power Pin: 16
[14:57:07][C][ethernet:226]: MDC Pin: 23
[14:57:07][C][ethernet:227]: MDIO Pin: 18
[14:57:07][C][ethernet:228]: Type: LAN8720
[14:57:07][C][ethernet:229]: PHY addr: 1
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][web_server:161]: Web Server:
[14:57:07][C][web_server:162]: Address: 10.10.10.10:80
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][mdns:112]: mDNS:
[14:57:07][C][mdns:113]: Hostname: hub_downstairs
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][ota:093]: Over-The-Air Updates:
[14:57:07][C][ota:094]: Address: 192.168.1.86:3232
[14:57:07][W][component:204]: Component matrix_keypad took a long time for an operation (0.08 s).
[14:57:07][W][component:205]: Components should block for at most 20-30ms.
[14:57:07][C][api:138]: API Server:
[14:57:07][C][api:139]: Address: 192.168.1.86:6053
[14:57:08][C][api:143]: Using noise encryption: NO
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
I'm using multiple pcf8574 port expanders on an i2c bus. They work fine using them as GPIOs. My intention is to use some pins in the pcf8574's in a
keypad_matrix
. Doing so, fills the logs with an warnings that reads are taking too long (~9-10 per second):I raised this on discord, @ssieb highlighted that the same issue had fixed in a recent PR (5137). I've taken the changes and applied them to the pcf8574 but the it's not solved the issue and I don't know enough to debug it.
Which version of ESPHome has the issue?
2023.8.1
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
n/a
What platform are you using?
ESP32
Board
WT32-ETH01
Component causing the issue
pcf8574
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response