Best method for emergency alarm via /r/DIY


Best method for emergency alarm


I'm trying to build an alarm for my grandfather. He should toggle one switch, and I should get an alarm/ringtone on two-three Android smartphones. What is the best way to go about this? I do not want to pay to a cloud service or have a limited quota. Hardware available: Arduino UNO, Raspberry Pi 1.2 B+, Xbee modules (Z24), Wi-Fi router.

Current setup

An Arduino UNO has an Xbee (router), and a battery and a switch attached to it. A (stationary, headless) Raspberry Pi has mains power, an Xbee (coordinator), and it connected to my router via ethernet; this Pi is an MQTT broker. When the switch is pressed, it boots and transmits 'Y' through the Xbee module. The Pi listens for the 'Y', and when detected, it publishes a JSON string. I listen for this string using this MQTT client, and play a ringtone when it's received.

I've tried the following: * using different servers on the Raspberry Pi (Tornado, Starlette), MQTT seems best so far. * different MQTT clients; writing an Android MQTT client app (I cannot do this fast enough for the solution to remain useful, because I'll have to learn Kotlin/Java) * simple radio with just looped wires (unreliable).


  • There is a boot/start-up delay (12-15 seconds) in the Xbee router, not suitable for an emergency system.
  • The system is unreliable. Android sometimes decides to shut down the MQTT client's background process.
  • Seems like I'm using a lot of devices for something rather simple.

What is the best way to do this? I have the following experience, but willing to learn more: Arduino C++, Python, LabVIEW (G), almost no experience in networking. I can share any existing code or connection diagrams if needed.

Submitted May 30, 2021 at 10:19AM by eccentric-Orange
via reddit

Amazon ad

Leave a Reply

Your email address will not be published. Required fields are marked *