I just want to share my little home project. I have a whole bunch of wired reed sensors in my house that I wanted to integrate into Home Assistant, which I have running on a Raspberry Pi. After much thought I decided to use an mcp23017 board to connect the sensors, I ended up ordering the io pi plus because it is designed so you can solder a couple of idc20 connectors to it, then I ordered a couple of screw end block boards with idc20 connectors, I plugged some flat ribbon cables between them and ended up with a very decent looking setup.
I have written a pretty basic HA custom_component binary sensor for mcp23017, I am still working on it but it works well enough. The configuration.yaml should look like this:
binary_sensor:
- platform: mcp23017
i2c_address: 0x20
scan_interval: 1
pins:
0: Living Room Window
1: Front Door
2: Back Door
And, well… here is a picture of my setup, I still need to tidy some things up:
MCP23017 is connected to the same PI running HA.
I am not aware of the gpio input problem you are referring to, I wrote my own custom component for HA and it’s been working fine so far.
I tried connecting directly to the gpio pins using rpi_gpio, But HA can miss when they change state, so after only a few on offs, they were showing the wrong state. But as your using the mcp23017 it might not happen
I believe what you are experiencing has to do with the default bouncetime for the rp-gpio binary sensors being too short (50 milliseconds). Try adding bouncetime: 500 (half a second) in your configuration.yaml like this:
binary_sensor:
- platform: rpi_gpio
bouncetime: 500
ports:
11: PIR Office
12: PIR Bedroom