Summary
I would like to build (ideally based on ESPHome) a device with a buzzer I can trigger remotely via the network.
Context
I have several systems built around my home automation system:
- Home Assistant to keep state and trigger action on devices
- AppDaemon where I code my automations
- two kind of "hardware triggers":
- 433 MHz wall switches, which signals are picked up by a 433 Mhz to Wi-Fi bridge (and then to MQTT)
- Zigbee switches managed though Zigbee2MQTT
- various sensors
- various services around a dashboard I wrote myself
I am listing all this to show that I have, so far, two major kind of operations:
- getting data from sensors / Google calendar / Meteo services / various other APIs → and displaying their values
- sending a message from a wall switch, ultimately resulting for a Wi-Fi enabled device (such as a Sonoff Basic) to do some action
What I am missing
I now would like to build an IoT device that would accept data from my Wi-Fi network and trigger a module attached to it. You can see this as some kind of poor man alarm clock - where all the logic of the alarm is offloaded to a service, and the device just receives the order to buzz.
What is the right approach to build such an IoT?
I have NodeMCU modules, or Wemo D1s. I could flash them with ESPHome, bringing in the WiFi communication and the ability to connect to GPIOs.
What I do not understand is how the Wi-Fi stack interacts with the GPIOs, exactly. Do I need to write a specific module to be added during the compilation? (it's been 20 years I did not code in C, last time was for my PhD - but this is something I could get into). Or is there a module that does the bridge already?
Generally speaking, what is the approach when I want to send a message to a ESPHome, Wi-Fi enabled device in order to access its GPIOs.
Please note that I know how to do it the other way round: I have added existing ESPHome modules to a Weemo D1 and they are correctly exposed in Home Assistant or the built-in web server. But this is a case where such modules already exist (for specific hardware) and just send data out.