With a little bit of reverse engineering, I just got my Worx Landroid automower integrated with openHAB using the HTTP binding and thought I share my knowledge.
(you need a WiFi capable model such as WG796E.1 or WG797E)
in items: (replace IP and substitute your PIN for “1234”)
If you call the URL, output shows a number of parameters, state being just one of them. Feel free to pick those of interest and use a copy of the Landroid_Status item with a modifed regex.
in sitemap:
Text item=Landroid_status label="Landroid status [%s]" Switch item=Landroid_Command mappings=[11="Start", 12="Stop"]
put up a rule:
rule "Landroid command"
when
Item Landroid_Command received command
then
/* Commands:
11 = start
12 = stop (& return to base)
13 = charging complete
14 = manual stop
15 = going home */
val String URL = "http://admin:1234@10.0.0.1/jsondata.cgi"
var String jsondata = 'data=[[\"settaggi\",' + Landroid_Command.state.toString + ',1]]'
logInfo("rules", "Sending command " + Landroid_Command.state + " to Landroid.")
sendHttpPostRequest(URL, "application/x-www-form-urlencoded", jsondata)
end
Access to the 2017 Landroid S model works completely different from all other models, older ones but the current M & L ones as well.
For this new model S, Positec (the vendor) does not provide a local API any more (well strictly speaking they never did).
The app now accesses a cloud server but they don’t want anyone else to access it. There’s been a request recently from Positec to all users and software creators of the iobroker implementation to stop accessing their cloud. Now while that may still work or not, you need to be afraid it won’t work in the future.
So if you haven’t bought your Landroid yet, for now, to be on the safe side, better get a Model M.