Mobile Alerts and openHAB 2

Working in OH2.5. I only have OH3 as a test setup but that’s powered off at the moment.

Finally got back to looking at OH3 >>>> update on to to get at mobile alerts sensor data for OH3
as the http binding no longer works for caching the sensor page. It generates a forbidden 403 error in the log!

To fix that the caching needs to be done using curl command. Here is what needs to be changed >>>>

  • Disable the http thing
  • Create a script with the following in it:. Check permissions.
curl https://measurements.mobile-alerts.eu/Home/SensorsOverview?phoneid=xxxxxx -A Mozilla
  • Put the script path in the whitelist
  • Create an exec thing to run the script
Thing exec:command:mobilealertsHTTP "MobileAlerts HTTP" [command="/etc/openhab/scripts/Mobile-Alerts_HTTP.sh", interval=300, timeout=30]
  • Change the item holding the cache to now point to the output of the exec thing
String MobileAlertsHTTPCache "Mobile-Alerts HTTP cache" <text> { channel="exec:command:mobilealertsHTTP:output" }

The rules should now work as before.

sorry, I post on:

maybe somone can help

regards
Marco

Did you see my post above?

Try this.