NeatoRobotics / neato-sdk-js

Neato Javascript SDK.
MIT License
42 stars 23 forks source link

How to trigger an action `sendToBase` #5

Closed jury89 closed 7 years ago

jury89 commented 7 years ago

Hi,

I would like to know if, at any point while the robot is cleaning, I can interrupt it and send the bot back to its base (when dockHasBeenSeen = true).

I've tried with to POST https://nucleo.neatocloud.com:4443/vendors/neato/robots/OPS21417-508CB11E2D52/messages

{
  "reqId": "77",
  "cmd": "sendToBase",
}

but it doesn't work.

I noticed that in the response i get from many endpoint there is this section:

....
"availableCommands": {
    "start": true,
    "stop": false,
    "pause": false,
    "resume": false,
    "goToBase": false
  }
....

but goToBase is always false. Does it ever change to true?

Thanks, Jury

marcouberti commented 7 years ago

Hi Jury, there are some constraints robot-side that don't allow the send to base command while the robot is cleaning or stopped. This is available only when the robot is paused (and additionally the robot must be paused after an amount of time). We're working to improve this.

A workaround maybe this if you want to dock the robot:

Now you can check the "result" property and see if it is "ok" or not to understand if the robot understand. But docking the robot when it is stopped is not possible currently.

Best, Marco

conan747 commented 4 years ago

Are there any news on this regard? I find it often that my robot loses contact with the docking station because e.g. the cat pushes it. I would like to issue the sendToBase command at any point even if the robot is not cleaning (e.g. when it's right next to it). I guess it is able to detect it if it's right in front of it right?

My particular use case is that I have the docking station under some furniture where the robot can easily access but I cannot. I like to keep it hidden if it's not in use. It would be great if I could simply put it close to it and then issue the sendToBase command. However, it now doesn't work at all. Using the pause method I was able to make it work one single time.