Worx Landroid Binding

I also have the problem described here. My work around is that I disable the Bridge and the Thing shortly before the actual start of mowing and then reactivate them one after the other.
I check whether the mower is online or offline via the battery temperature; if it hasn’t changed in the last hour, then I assume that the Bridge and/or Thing are offline.

var Bridge_Rasenbaer, Rasenbaer;

var thread = Java.type(‘java.lang.Thread’)

if ((items.getItem(‘Rasenbaer_Battery_Temperature’).persistence.countStateChangesBetween(time.ZonedDateTime.now().minusHours(1) ,time.ZonedDateTime.now(), ‘rrd4j’)) == 0) {
actions.notificationBuilder(‘Offline’).addUserId(…items.getItem(‘Mark_Adresse’).state.split(‘,’)).withTitle(‘Rasenbär’).send()
Bridge_Rasenbaer = things.getThing(‘worxlandroid:mower:Rasenbaer’).bridgeUID;
Rasenbaer = things.getThing(‘worxlandroid:mower:Rasenbaer’).uid;
things.getThing(Bridge_Rasenbaer).setEnabled(false);
things.getThing(Rasenbaer).setEnabled(false)
thread.sleep(5000);
things.getThing(Bridge_Rasenbaer).setEnabled(true);
thread.sleep(4000);
things.getThing(Rasenbaer).setEnabled(true)
}

Certainly not optimal, but at least this way I can continue to control the mower.

I experienced the problem described above for the first time on Monday morning, June 23.
Since then, the connection has been interrupted after 2 hours at the latest.
Further note, since 27.06. 18 p.m. the connection remained upright. Let’s see how long.

1 Like

Same here, fingers crossed.

In case someone needs it…I have create a rule to disable / enable the landroid bridge & mower once every hour in rules language. It’s working fine now for over a day, so I assume it does not trigger the ban on worx side.

rule ResetLandroidConnection
when
   Time cron "0 0 * * * ?"
then
   logInfo("Landroid", "Resetting Landroid MQTT connection")

   val headers = newHashMap("Authorization" -> "Bearer XXXINSERT_BEARER_TOKEN_HEREXXX", "WWW-Authenticate"-> "Basic")
   val bridge = "http://192.xxx.xxx.x:8080/rest/things/worxlandroid:bridge:MyWorxBridge/enable"
   val mower = "http://192.xxx.xxx.x:8080/rest/things/worxlandroid:mower:MyWorxBridge:xyz/enable"
   sendHttpPutRequest(bridge, "text/plain", "false", headers, 5000)
   sendHttpPutRequest(mower, "text/plain", "false", headers, 5000)
   Thread::sleep(5000)
   sendHttpPutRequest(bridge, "text/plain", "true", headers, 5000)
   Thread::sleep(4000)
   sendHttpPutRequest(mower, "text/plain", "true", headers, 5000)
end

I just wanted to share my rule and tested it before by manually deactivating the things and I do not see them being enabled. Have you tested the rule and what OH version are you using? Thanks!

I’m running on openHAB 4.3.2 currently.
Rule is running since a day and working fine.
I tested it also before.
Please mind that you have to insert the right API Token. You need to generate one with your user account after looging in.

Here is my fixed rule. Totally trivial issue: I changed from OH on Raspbberry to docker and changed Port from 8080 to 8082. I have overseen adapting… So if using my rule, you might want to change back to 8080 most likely.

Besides regular check via cron, I trigger in AWS connection loss as well as manual command (for testing etc.). I also changed to harder setting as I reset if not online (instead of offline; there are much more potential thing status but I wan to ensure online)

rule "Reset Landroid Bridge"
when
  Item LandroidResetBridgeCommand changed to ON or
  Item LandroidAwsConnected changed to OFF or
  Time cron "0 * * ? * *" //Check every Minute
then{
  if (BootFinished.state != ON) {
        return;
    }
  var headers = new java.util.HashMap()
  val bridgeStatus = getThingStatusInfo("worxlandroid:bridge:abc").getStatus()
  if (bridgeStatus.toString() != "ONLINE" || LandroidAwsConnected.state == OFF) {
        logInfo("Landroid","Reset Bridge start")
        headers.put("Authorization", "Bearer " + "oh.thingsreset.xxxx")
        sendHttpPutRequest("http://192.168.186.10:8082/rest/things/worxlandroid:bridge:abc/enable", "text/plain", 'false', headers, 5000)
        createTimer(now.plusSeconds(5), [ |
                sendHttpPutRequest("http://192.168.186.10:8082/rest/things/worxlandroid:bridge:abc/enable", "text/plain", 'true', headers, 5000)    
                logInfo("Landroid","Reset Bridge end")
            ])     
   }

    val mowerStatus = getThingStatusInfo("worxlandroid:mower:abc:xyz").getStatus()
   if (mowerStatus.toString() != "ONLINE") {
        logInfo("Landroid","Reset Mower start")
        headers.put("Authorization", "Bearer " + "oh.thingsreset.xxxx")
        headers.put("Authorization", "Bearer " + "oh.thingsreset.xxxx")
        sendHttpPutRequest("http://192.168.186.10:8082/rest/things/worxlandroid:mower:abc:xyz/enable", "text/plain", 'false', headers, 5000)
        createTimer(now.plusSeconds(5), [ |
                sendHttpPutRequest("http://192.168.186.10:8082/rest/things/worxlandroid:mower:abc:xyz/enable", "text/plain", 'true', headers, 5000)    
                logInfo("Landroid","Reset Mower end")
            ])     
   }

}
end

Are you sure this is still needed?
My mower is online without any extra rules or triggers. There was only a small hickup end of last month for 2 or 3 days.
I would be very careful with triggering the cloud server too often, there are reports of account bans in the ioBroker forum which last several days, even weeks …

Adapter Worx Landroid v3.x.x (sorry, very long and German only)