Hi everyone, I’d like to start with a simple project: using an ESP32 to send basic sensor data (like distance from an HC‑SR04 ultrasonic sensor or motion via PIR) over MQTT or HTTP, and then have VyOS handle that data perhaps logging it, triggering a script, or even dynamically adjusting firewall rules. I found this guide very useful for understanding ESP32 + MQTT integration:
https://www.theengineeringprojects.com/2021/11/esp32-mqtt.html
I’ve also seen community examples where ESP32 devices publish sensor readings to dashboards like Home Assistant or send HTTP GET webhooks for notifications. My question is: can VyOS be configured to receive those MQTT or HTTP posts and act upon them such as writing entries to syslog, launching custom scripts, or applying firewall actions? Are there built-in or community packages, APIs, or typical setups to make this straightforward in VyOS?
VyOS supports containers to setup a container with whatever junk you want to be runned and tada!
Personally I would avoid having such applications being runned on my router but VyOS can be installed as a “server” aswell (it boils down to what you use the box for).
The idea is interesting, but essentially it comes down to writing a daemon that listens for MQTT messages and acts accordingly, most likely by converting them into API calls to VyOS. It could run in a Docker container directly inside VyOS.
Ntfy would be a really good tool for this. It uses a simple publish/subscribe model. So you could have the ESP32 publish to a topic, and have VyOS subscribe to it and take action on the message. VyOS could just subscribe with a shell script.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.