Byggahus.se

Worx Landroid development

  1. F
    Medlem Nivå 2
    Worx :p fine, thank you!
     
  2. miktr
    Medlem Nivå 2
    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:000@1.2.3.4/jsondata.cgi

    When I run this, the mower doesn't stop and return home, but the response I get is:
    "settaggi":[0,0,0,0,1,1,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
    which indicates that it ought to be going home (element 15 = 1).
     
  3. M
    Medlem Nivå 1
    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.
     
  4. M
    Medlem Nivå 1
    Michael, the PIN in your has just 3 digits, so likely, authentication failed.
     
  5. miktr
    Medlem Nivå 2
    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.
     
  6. M
    Medlem Nivå 1
    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.
     
  7. M
    Medlem Nivå 1
    Seems that the Domoticz API may have been broken in the 3.x upgrade. See https://github.com/mjiderhamn/worx-landroid-nodejs/issues/2 and/or https://www.domoticz.com/forum/viewtopic.php?f=6&t=12660 to follow the progress of this issue.
     
  8. miktr
    Medlem Nivå 2
    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

    E.g:
    <base_topic>/command check
    <base_topic>/command start
    <base_topic>/command gohome

    Status from the mower is sent back as mqtt messages as before.
     
  9. J
    Medlem Nivå 1
    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?

    //Jocke
     
  10. miktr
    Medlem Nivå 2
    Hi!

    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)
    landroid/command start
    landroid/command gohome

    Let me know if you have any problems!

    (The files in the scripts-folder are just for testing!)
     
  11. J
    Medlem Nivå 1
    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.

    1. One topic where you send out current status, as text string. Either current alarm, or Mowing/Charging/Seeking charger.
    2. Send out messaegs by interval, without need to receive the check command. Say each minute, and add setting in config file to define this.
    3. MQTT authentication
     
    Redigerat 10 aug 2016 13:12
  12. miktr
    Medlem Nivå 2
    Good suggestions, thanks!
    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.

    2) https://github.com/trieb/worx-landroid/issues/6
    3) https://github.com/trieb/worx-landroid/issues/7
     
  13. J
    Medlem Nivå 1
    Great!
    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.
     
  14. miktr
    Medlem Nivå 2
  15. F
    Medlem Nivå 2
    Redigerat 9 sep 2016 23:46