Hi everyone! I’ve been experimenting with small DIY IoT projects and I want to connect an ESP32 sensor (like a motion or temperature sensor) to my Zorin OS desktop to trigger local notifications or small scripts. I got the idea after reading this tutorial on about sending motion detection alerts with ESP32 and a PIR sensor:
https://www.theengineeringprojects.com/2022/03/iot-based-motion-detection-with-email-alert-using-esp32.html
I also looked into using Python notify-send on Linux and MQTT integration guides from Home Assistant, but I’m unsure about the simplest way to make Zorin respond to incoming ESP32 data (like a quick pop-up message or log entry). Has anyone tried something similar or can suggest a lightweight method to achieve this?
The Link you posted describes using an Arduino setup which relays to the operating system via email notifications.
You appear to be aiming for a more direct communication with the OS; You want it to trigger events on Zorin OS in response to ESP32 sensor data.
Eclipse Mosquitto is an open source MQTT broker that you might have the most luck with.
For simple and lightweight, you would want to launch Mosquito, setup ESP32 to publish a message to motion/detected topic per event and setup a local shell or python script that calls on notify-send on the desktop. How simple this is depends on your experience level... and any helpers - I have never set this up.
Your python script would need to import the series and subprocess. Define the serial and set an "if" condition on the subprocess: subprocess.Popen(["notify-send", "Motion!"])
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.