I started my HomeKit adventure a few years ago by buying a HUE 2.0 starter kit. Since then I have added a few more HUE bulbs, non-HUE bulbs (which do not require a separate hub / bridge / gateway), a few smart sockets, an AppleTV (4K) and two Symfonisk Sonos / AirPlay speakers.
Now I'm looking to add a few switches / buttons and sensors to easily trigger lights or scenes. It's very tempting to go for some of the cheaper options on AliExpress, for example. you need to have their own hub to connect to HomeKit. I already have the bridge of shades and I am afraid that as the configuration increases, soon I will have a huge collection of "useless" hubs. I do not like to replace the current one, but I would like to replace it with one that allows me to connect (almost) any HomeKit compatible device to it, including my current Hue bulbs, but for example. as well as other Zigbee certified products (which does not necessarily support HomeKit out of the box).
Which would be the best option? I know how to use a raspberry pi for something homemade, but what software would be the best and / or the most extensible? Do I need other hardware components?