# How can I trigger a local alert from an ESP32 PIR sensor without using cloud services?

**URL:** <https://community.homey.app/t/how-can-i-trigger-a-local-alert-from-an-esp32-pir-sensor-without-using-cloud-services/140000>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [July 19, 2025, 6:59am UTC](https://community.homey.app/t/how-can-i-trigger-a-local-alert-from-an-esp32-pir-sensor-without-using-cloud-services/140000 "2025-07-19T06:59:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aria\_James](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Aria\_James](https://community.homey.app/u/Aria_James)\
**Post date:** [July 19, 2025, 6:59am UTC](https://community.homey.app/t/how-can-i-trigger-a-local-alert-from-an-esp32-pir-sensor-without-using-cloud-services/140000/1 "2025-07-19T06:59:54Z")

</div>

Hi everyone! I’ve been working on a DIY security system using an ESP32 and a PIR motion sensor. I followed this tutorial on ESP32-based motion detection with email alert:  
[https://www.theengineeringprojects.com/2022/03/iot-based-motion-detection-with-email-alert-using-esp32.html](https://www.theengineeringprojects.com/2022/03/iot-based-motion-detection-with-email-alert-using-esp32.html)  
It helped me get the motion detection and alerting part working using email, but I’d like to shift to something more local and privacy-friendly, without relying on cloud services. Now I’m trying to figure out the best way to send alerts locally either by triggering an HTTP request to a local server, using MQTT, or implementing SMTP directly on the ESP32.

Have any of you implemented something similar? I’d love to hear your suggestions on lightweight, secure, and fast methods to handle local alerts in a home setup. Bonus if it works well offline and preserves data privacy.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 19, 2025, 11:27am UTC](https://community.homey.app/t/how-can-i-trigger-a-local-alert-from-an-esp32-pir-sensor-without-using-cloud-services/140000/2 "2025-07-19T11:27:36Z")

</div>

Use a local webhook

> **[ESP32 - HTTP Request | ESP32 Tutorial](https://esp32io.com/tutorials/esp32-http-request)**
>
> Learn how to use ESP32 as web client, how to use ESP32 to make HTTP request to a web server, a website, Web API or REST API, how to send data via HTTP request and how to process the HTTP response. The ESP32 code.

> [@Webhook vom Smartphone an Homey schicken](https://community.homey.app/t/webhook-vom-smartphone-an-homey-schicken/90371/4):
>
> **Local Webhook Pro 2023:**  
> `http://<homey-ip>/webhook?event=my_event&tag=my_tag`
> 
> **Local Webhook Pro 2019:**  
> `http://<homey-ip>/api/manager/logic/webhook/my_event?tag=my_tag`
