07-20-2026, 01:39 PM
Hi there,
I know that I'm replying to a very old post. I got a Pi5R16 - link with very similar problem - relays outputs work well "out-of-the-box" (after necessary steps of enabling i2c, configuration.yaml etc...), but digital inputs stay "silent".
After many attempts I got them working as following:
1. Positive terminal (+12V or +24V) <--> Digital input COM pin
2. to simulate/trigger an input, short the GND (negative terminal) to a digital input pin 1-16.
yaml
binary_sensor:
- platform: mcp23017
i2c_address: 0x20
invert_logic: true
pull_mode: NONE
pins:
00: "Digital Input 1"
.....
Cheers!
I know that I'm replying to a very old post. I got a Pi5R16 - link with very similar problem - relays outputs work well "out-of-the-box" (after necessary steps of enabling i2c, configuration.yaml etc...), but digital inputs stay "silent".
After many attempts I got them working as following:
1. Positive terminal (+12V or +24V) <--> Digital input COM pin
2. to simulate/trigger an input, short the GND (negative terminal) to a digital input pin 1-16.
yaml
binary_sensor:
- platform: mcp23017
i2c_address: 0x20
invert_logic: true
pull_mode: NONE
pins:
00: "Digital Input 1"
.....
Cheers!

