For the buttons I first of all wired a button to an ESP8266 device, made it connect to wifi and publish to MQTT and handled it that way.
But when it came to time to setup a lot more of them I realized that would get expensive quickly. SO I cheated. I bought a bunch of 433Mhz-based radio-buttons:
https://www.aliexpress.com/item/OWSOO-433MHz-Wireless-SOS-Bu...
Then I hooked up an SDR receiver to my PC, and handle it that way. I have a 433Mhz receiver for the arduino, which could also decode those transmissions, but I never used it for anything except to prove I could.
There's a pointer to the software and some overview here:
https://blog.steve.fi/decoding_433mhz_transmissions_with_sof...