Worx Landroid

hardware
landroid
Tags: #<Tag:0x00007f6ce8d3b948> #<Tag:0x00007f6ce8d3b6f0>

(Markus Storm) #1

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")

String Landroid_status "Landroid Status [%s]" <garden> (Rasenmaeher) { http="<[http://admin:1234@10.0.0.1/jsondata.cgi:5000:REGEX(.*\"state\":\"(.*?)\",.*)]" }
String Landroid_Command "Landroid action" <garden> (Rasenmaeher)

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

Looking for an automatable vacuum cleaner
(Rich Koshak) #2

Nice! This would make a good addition to the Application Integration section on the Wiki.

https://github.com/openhab/openhab/wiki/Application-Integration


(Markus Storm) #3

Here you are.

By the way: https://www.youtube.com/watch?v=DYZ3wi4jIlo


(Boris) #4

Dear Makus,

recently, the communication of the new Landroid 2017 models is known. A plugin for ioBroker already exists.

https://github.com/mjiderhamn/worx-landroid-nodejs/blob/master/landroid-mqtt.md

http://www.roboter-forum.com/showthread.php?22535-Landroid-S-in-Smarthome-einbinden-endlich-m�glich

Could you also implement the new models? I am willing to test, but I am not a talented programmer and can code it by myself.

BTW: It seems to me also possible to use the MQTT Binding with the retrieved Client-Certificate.

Best regards!
-Boris


(Markus Storm) #5

Nope, sorry. The implementation is based on reverse engineering and iterative trial-and-error, and I don’t have any such new unit to test against.


(Markus Storm) #6

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.