Integration for USB-connected GPIO ports

TL;DR: I wish there was an integration for USB-connected GPIO breakout boards. Such as MCP2221A or FT232H.


I used a spare reed switch and a couple of wires to turn my dumb analog doorbell into a smart doorbell. All I needed was to connect two wires to GPIO pins on my Raspberry Pi. (Actually, only one GPIO pin, the other pin is conncted to either VCC or GND.) This way, when the doorbell rings, the solenoid in the doorbell changes the magnetic field, which triggers the reed switch, which gets detected by the GPIO pin.

However, in December 2021, it was decided the core would not have GPIO integrations anymore, and the Raspberry Pi GPIO integration was removed in 2022.06. No problem, as that integration continues to be maintained by the community, and can be installed via HACS.

Now I’m thinking about replacing the old Raspberry Pi with a more powerful Intel NUC, in order to configure a private, fast, and local-only voice assistant. The problem is: the NUC has no GPIO ports. Thus, I’m thinking about adding GPIO via USB.

Current options

Somehow, there are still two GPIO integrations in HA core. One of them is actually a remote GPIO, connected over the network. The other integration is a local USB board by Numato. That board seems large, and also quite expensive at USD 57. That’s almost the full price of a single-board computer.

Alternatively, I was thinking about getting some tiny breakout boards from Adafruit, such as MCP2221A for USD 6.50 or FT232H for USD 15. Those are much more affordable, and more than enough for most use-cases. And since they are so cheap, it should be possible to connect multiple of them over USB. Unfortunately, I couldn’t find any integration for these breakout boards in Home Assistant. Hence my feature request here.

Final thoughts

I understand they won’t want to add that integration into HA core, but it could be built as a community integration. Even better, since we already have two or three existing GPIO integrations, would it be possible to share code between them? Would it be possible to write a new integration based on one of those?

There are many solutions for this already.

e.g. Use your old pi to connect to your new HA NUC via mqtt and report GPIO states (and much more):

It is well maintained and extremely reliable.

Alternatively ESPHome supports a number of GPIO expanders. This would connect to your HA server via the ESPHome API which is also very reliable. It too supports much more than just GPIO.

My intention is to retire the old RPi, or reuse it on another project. I don’t want to keep it just for that. (It also means an extra power supply and a couple of extra watts of consumption (for something that requires negligible power).

Using an additional ESP board just for that is possible, but that’s also extra hardware and extra complexity. This is going to be my “plan B”, if I can’t find anything else.

However, maybe I could run that mqtt-io on the same machine (the NUC), it could work. Maybe as an add-on (if I decide to keep using HAOS), or as a stand-alone process or in another container (if I decide to run HA in a container). Now I have to check if it supports any of the USB breakout boards.