Hello dear community,
I wanna share a free and easy workaround to be able to monitor your local openhab instance and notify via mail if your local OH goes offline. other request was here : ( Reneval of Myopenhab Cloud request - #2 by sihui )
The Problem
If your local openHAB server goes offline due to a power outage, internet loss, or system crash, local rules or inbound webhooks obviously won’t work to send you an alert. You need an external “Heartbeat” (passive check) service that listens for a periodic ping from your server and alerts you when those pings stop arriving.
Step 1: Create a Heartbeat Monitor on Cronitor
-
Sign up for a free account on Cronitor.io.
-
Create a new monitor and select Heartbeat as the type.
-
Configure the schedule to expect a ping every 5 minutes (or
every 7 minutes), and set a Grace Period (e.g., 3 minutes) to avoid false alarms caused by minor network hiccups. -
Save the monitor and copy your unique Telemetry Ping URL (it will look like
[``https://cronitor.link/p/YOUR_MONITOR_KEY``](``https://cronitor.link/p/YOUR_MONITOR_KEY``)).
Step 2: Configure the HTTP Binding in openHAB
You can use the native HTTP Binding to send the ping without writing any complex scripts.
-
Install the HTTP Binding in openHAB (Settings > Bindings).
-
Create a new HTTP URL Thing (Settings > Things > + > HTTP Binding):
-
Label:
Cronitor Heartbeat -
Base URL:
[https://cronitor.link/p/YOUR_MONITOR_KEY](https://cronitor.link/p/YOUR_MONITOR_KEY)(replace with your actual URL) -
Refresh Time:
250(or 300 seconds to send a GET request roughly every 4–5 minutes)
-
-
Save the Thing.
-
Important: Go to the Channels tab of this newly created Thing, click Add Channel, and create a simple String Channel (e.g.,
ping).- Note: Even if you don’t link an Item to this channel, adding an active channel is necessary to trigger the periodic GET request automatically.
How it works
Your openHAB instance will now ping Cronitor in the background every few minutes. If your power goes out or openHAB crashes, the pings will stop. Once the expected interval plus the grace period expires (e.g., ~8 minutes total), Cronitor will automatically send an email alert notifying you that your instance is down. When openHAB comes back online, you’ll get a recovery email!
Hope this helps anyone looking for a simple, 100% free uptime check for their local setup!