A Habr article details a simple yet robust method using an Android smartphone, Termux, and the mobile network to monitor and alert homeowners about home automation system faults during internet outages, enhancing resilience and independence.
A Habr article proposes a simple but resilient way to keep a home automation setup under observation when the internet is unavailable: use an ordinary smartphone, Termux and the mobile network itself. The central idea is to treat SMS and voice calls as a fallback alert channel, so the system can escalate from one text message to another and then to a call if a fault persists. The author frames the approach as a continuation of an earlier project built around Android, Termux and Zigbee integration, and uses Majordomo as the main home automation server in the example.
The monitoring begins with basic network checks. First, the script pings the home automation server, the router and a public DNS address to confirm local and external connectivity. It then adds service-level checks for web interfaces on ports commonly used in home automation, including MajorDoMo on port 80 and Zigbee2MQTT on port 8080. The article shows two ways to do this: a quick port test with netcat and a deeper HTTP check with curl that verifies whether the service returns a proper page rather than merely accepting a connection.
The next step is to use Termux:API so Android can send SMS messages and place calls from the command line. The article recommends installing the companion app, granting the required permissions and then testing two commands: one for text messages and one for calls. This turns the phone into a network-independent alarm relay, which matters in places where internet access may fail while the mobile network remains available.
The final script combines all of the checks into a loop that runs every 30 seconds. It tracks repeated failures separately for the server, router, internet link and the two web services. After two consecutive errors, it sends an initial SMS; after four, it sends a second; after six, it triggers a call. If the connection recovers, it sends an “OK” message, but only if an alert had already been issued, which helps avoid unnecessary notifications during brief instability.
The article’s wider significance is that it places a smartphone-based fallback in the same space as a growing class of GSM-driven automation products. Telemetrica, for example, markets SMS control of remote power and heating systems without internet access, while DD-Link offers relay-based home automation with Wi-Fi, SIM or Bluetooth connectivity. IQsocket Mobile similarly uses SMS, calls or Bluetooth for remote switching, and services such as Guardio and industrial controllers such as GSM Commander show that GSM alerting and control remain practical in homes, outbuildings and industrial settings where reliable internet cannot be assumed. The Habr approach differs in that it repurposes a phone already on hand, rather than adding another dedicated controller.
Disclaimer: This content is intended for informational purposes only. Readers are advised to exercise their own judgement, conduct due diligence, or consult a qualified expert before acting on any information provided.





