Testing OpenHAB Cloud connection (myopenhab)

Is there a way to test the openHAB Cloud connection?

Background:
I am using the OpenHAB Cloud for notifications / status updates.
In the past, the Cloud service was not always available, so I setup an alternative notification service (Telegram) which works really well.
But: When everything is okay, I get 2 notifications now - one via OpenHAB Cloud service (myopenhab) and one via telegram.
So I would like to use the alternative notification only if the main notification service (myopenhab) does not work.
Is this possible to detect?

Yes
You can use a http binding like this:

String OH2_CloudStatus "my.openhab.org [%s]" { http="<[https://www.appbeat.io/status/openHAB:300000:XPATH(/html/body/div[@class='status-layout']/div[@class='components']/div[1]/span[@class='component-status']/text())]" }

But I was annoyed with wrong status updates when OH is restarting because the XPATH transform in not running yet (During the restart) so I moved to node-red:

image

1 Like

Okay, thanks, I will add the XPATH transformation for my system and give it a try.
Maybe I will also set the String item periodically from a cron-based rule that is delayed after startup to avoid the wrong status updates.

By the way, what is the update interval for your string item (how often is the site polled)?

It’s in the binding 300000 millis or 5 minutes