Worx fine, thank you!
3 jul 2016 18:30 #62
What response do you get for the command ?
curl -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'data=[["settaggi",11,1]]' http://admin:email@example.com/jsondata.cgi
When I run this, the mower doesn't stop and return home, but the response I get is:
which indicates that it ought to be going home (element 15 = 1).
4 jul 2016 07:34 #63
The command you quote is to send command 11 (i.e. "start"). To stop, you need to send 12.And not sure if we need to start counting at 0, but in your post it's element #16 = 1 while #15 is 0. And to send command 15 didn't work for me.
5 jul 2016 18:31 #64
Michael, the PIN in your has just 3 digits, so likely, authentication failed.
5 jul 2016 22:21 #65
Oh, that was actually just I type when I paste the code here and replaced my true pin code with zeroes.
So in the command I sent I had a correct pin. And I got a valid response back from the webserver.
I but my mower doesn't seem to react to my commands, start on 11 and stop and go home on 12.
8 jul 2016 16:30 #66
Hmm, could be anything, then. Do you use latest mower SW (1.98) ?
Try it via openhab (see https://github.com/openhab/openhab/wiki/Worx-Landroid).
Or do what I did: start wireshark, then access the mower from your web browser and record comms. Repeat with curl and compare to find out the difference.
11 jul 2016 22:47 #67
13 jul 2016 08:07 #68
Finally I found what was wrong, when I compared the output in Wireshark I noticed that I had two extra whitespaces in my command in the json, removing those solved the problem.
I've updated the repo at https://github.com/trieb/worx-landroid so now it's possible to control the mower using mqtt
Status from the mower is sent back as mqtt messages as before.
9 aug 2016 23:12 #69
miktr, your scripts seems really interesting! But please, a litle how-to get things up and running. I have already installed Mosquitto, and is familiar with it. Is it just to start the script "worx-landroid-mqtt.py", and it keeps looping forever? __init__.py seems useless, so is there another bootup-script? In the scripts folder, there is some hard-coded IP-address.to landroid. These files are not used?
9 aug 2016 23:51 #70
1) Copy config_default.ini to a config.ini
2) Edit The 'Mqtt'-section of the condig file. Set 'Host' to the ip address where your have mosquitto running. (Could of course be the same computer). You could also change the 'BaseTopic' to be whatever you like. (landroid in my example below)
3) Edit the 'Landroid'-section. Set 'Addr' to point to the address of your mower and change pin.
4) Start script by running:
>> python worx-landroid.mqtt.py
and let it run.
You should now be able to communicate with the mower by sending mqtt-messages like:
landroid/command check (to get the status of the mower)
Let me know if you have any problems!
(The files in the scripts-folder are just for testing!)
10 aug 2016 11:46 #71
Really nice, I did get it to work.
I had to install python-pip first, and git-core to clone the files, but then it worked.
I do have some suggestions on improvements though.
Redigerat 10 aug 2016 13:12
- One topic where you send out current status, as text string. Either current alarm, or Mowing/Charging/Seeking charger.
- Send out messaegs by interval, without need to receive the check command. Say each minute, and add setting in config file to define this.
- MQTT authentication
10 aug 2016 13:30 #72
I've created issues for 2 and 3 and will add the features as soon as I can. For suggestion 1) I need
some more info, I don't really understand how you mean.
10 aug 2016 13:45 #73
For 1), i mean instead of sending a whole lot of possible statuses as bools, send the current actual status as a text string to <BaseTopic>/state. If the mower is currently mowing, send the text string "Mowing". If it is charging, send "Charging". If there is an alarm, send the alarm text, for example "Blade blocked" if the alarm is blade_blocked. This should both be sent on interval and when received the check command.
9 sep 2016 23:41 #75
I already got that installed but I want to try your code to publish to mqttRedigerat 9 sep 2016 23:46