Here, just if somebody needs it. Thats how I solved the issue (Bridge gets offline if Internet drops):
rule "reset Bridge"
when
Time cron "0 * * ? * *" //Check every Minute
then{
val bridgeStatus = getThingStatusInfo("worxlandroid:bridge:MyWorxBridge").getStatus()
if (bridgeStatus.toString() == "OFFLINE") {
var headers = new java.util.HashMap()
headers.put("Authorization", "Bearer " + "oh.resetworx.<here_goes_your_api_token>")
sendHttpPutRequest("http://<your_openhab_server_ip>:8080/rest/things/worxlandroid:bridge:MyWorxBridge/enable", "text/plain", 'false', headers, 5000)
var onofftimer = createTimer(now.plusSeconds(5), [ |
sendHttpPutRequest("http://<your_openhab_server_ip>:8080/rest/things/worxlandroid:bridge:MyWorxBridge/enable", "text/plain", 'true', headers, 5000)
])
}
} end
Thanks a lot @sihui with your tip you saved me a lot of time