Neato BotVac Connected binding?

oh2bindings
binding
vacuum
Tags: #<Tag:0x00007f6ce913f8c8> #<Tag:0x00007f6ce913f760> #<Tag:0x00007f6ce913f620>

(Jason Spangler) #1

Just wondering if anyone had started developing a Neato BotVac Connected robot vacuum binding?

Folks at https://www.mysensors.org/ reverse engineered the cloud and local protocols to control it, then Neato chimed in and made at least the cloud API official.

Some references:
1. Neato SDKs
2. Neato Developer Network
3. Neato APIs
4. Hacking a Neato Robotics BotVac Connected
5. Botvac Unofficial Ruby API - includes info on local LAN control


Connecting Vorwerk Kobold VR200 to openHAB2
(Pali) #2

There is also python library available https://github.com/HeroJC/pybotvac, which I have been used via exec binding to read and control my robot.


(Patrik) #3

Hi!

We got ourself a Neato BotVac this holiday and there were some traces of other projects on the internet, integrating with the Neato API's. So - I have started to build a binding for the Neato and wanted to know if there were any interest in such a binding from other people? It has been developed as a OH2-binding solely.

Right now - basic stuff works, like getting statuses and sending commands to the vacuum cleaner. As of right now, I have not built the discovery part of the binding, so a things-configuration containing secret and serial number has to be given to the binding.

Let's see if there are any interest in taking this binding development any further :slight_smile: ?


(Pali) #4

Great work Patrik. I'm definitely interested in.


(Marcel Will) #5

Looks good! I am also interested.


(Joakim Ahlqvist) #6

Also interested (although I haven't updated to OH2, yet...)
Owns a BotVac connected since a couple of months, and I'm kind of impressed of it :slight_smile:


(Patrik) #7

Would you be interested in testing ut out if I publish the jar file? Kind of alpha though :wink:

You need to know the serial and the secret of the vacuum cleaner towards Neato.


(Oliver) #8

Very much interested. I am looking into buying a robot vacuum the next months when i can afford, and this is just what ive been looking for. Also had my eye alot on the botvac connected but a proper binding makes it so much easier


(Ton van Loon) #9

Looks great, I own one and am very much interested in a OpenHAB2 binding.

I'm willing to test it, since I don't have to spent much time on vacuming lately.
:grin:


(Ulrik Aarhus) #10

Hi Patrik

+1

:slight_smile:

Ulrik
Denmark


(Peter) #11

I'd love to test it out as well! I've made a similar system for my home brewed automation system before switching to OH2, so miss this binding a lot!


(Patrik) #12

Hi all!

I have not left the building - only got interrupted with travels and other family stuff :wink:

I have implemented a function in the binding so the username and password towards Neato Web cloud replaces the need for getting the vacuum cleaner's serial and secret strings. So - basicly, the binding should be added, the username/pwd should be entered and then the vacuum will appear in the openhab inbox. Have some debug regarding timing issues left, and then I would be really glad to give you the jar file for further testing/input.

Over and out! :slight_smile:


(Ton van Loon) #13

Great.I'm looking forward to it.


(Patrik) #14

Hi all!

Still have some things that should be fixed, unfortunatly - time is running too fast here :slight_smile: But - if you would like, here is the jar file for the binding as of today. One thing that remains to be fixed is that the binding starts the scan just before it has gotten the configured values (under binding configuration in PaperUI). The result of this is that the vacuums does not automatically gets discovered and added to the inbox. However, they will be if a manual scan from the inbox is started - so I guess it's not a big problem.

So:
1. Add the binding
2. Configure the binding in the PaperUI - add your login and password to neato
3. Go to inbox and scan for items with the Neato binding.
4. Hopefully - it will appear :slight_smile:

Example of an neato.items file:

Group GNeato

String FannDammName  "Name [%s]" (GNeato) 
Number FannDammBattery  "Battery level [%.0f %%]" <battery> (GNeato) 
String FannDammState  "Status [MAP(neato-sv.map):%s]" (GNeato) 
String FannDammError  "Error [%s]" (GNeato) 
String FannDammVersion  "Version [%s]" (GNeato) 
String FannDammModel  "Model [%s]" (GNeato) 
String FannDammFirmware  "Firmware [%s]" (GNeato) 
String FannDammAction  "Action [MAP(neato-sv.map):%s]" (GNeato) 
Switch FannDammDockHasBeenSeen  "Seen dock [%s]" <present> (GNeato) 
Switch FannDammIsDocked  "In dock [MAP(neato-sv.map):%s]" <present> (GNeato) 
Switch FannDammIsScheduled  "Scheduled [%s]" (GNeato) 
Switch FannDammIsCharging  "Is Charging [%s]" <heating> (GNeato) 

String FannDammCategory  "Cleaning Category [MAP(neato-sv.map):%s]" (GNeato) 
String FannDammMode  "Cleaning Mode [MAP(neato-sv.map):%s]" (GNeato) 
String FannDammModifier  "Cleaning Modifier [MAP(neato-sv.map):%s]" (GNeato) 
Number FannDammSpotWidth  "SpotWidth [%.0f]" <niveau> (GNeato) 
Number FannDammSpotHeight  "SpotHeight [%.0f]" <niveau> (GNeato) 

String FannDammCommand  "Send Command"

And corresponding sitemap:

Frame label="Neato BotVac Connected" {
	Switch item=FannDammCommand mappings=[clean="Clean",stop="Stop",pause="Pause",resume="Resume", dock="Send to dock"]
	Text item=FannDammBattery label="Battery level"
	Text item=FannDammState
	Text item=FannDammError label="Error Message" icon="siren"
	Text item=FannDammAction label="Activity"
	Text item=FannDammIsDocked label="In dock"
	Group label="Mer information" item=GNeato
}

Example of neato.things file (if you don't discover the item via discovery routine):

neato:vacuumcleaner:fanndamm [ serial="vacuumcleaner-serial", secret="secret-string", name="Fann Damm"]

Although, in order to get the secret to use if you manually define the things file - you will have to use external python (or other) libraries. Link: https://github.com/stianaske/pybotvac

Excited to know if it will work or not for you :slight_smile:

https://github.com/scurb/NeatoBinding/blob/master/org.openhab.binding.neato_2.0.0.201701102253.jar (View/Download RAW file)


( ) #15

Hey Patrik,
great you are making progress. You could already think about opening a Pull Request. That will help you get some feedback and you can already start the review process, speeding things up a little :wink:

Btw. Is there also a things file example?


(Patrik) #16

Added an example things definition.

Yes - I will start to figure out how I can move towards getting this into an official conttribution. :slight_smile:


(Martyn Bright) #17

+1 for interested in Neato binding. Have Botvac Connected and OH2 development server if I can be of any help.

I have tried to grab the jar file from github, but it keeps timing out. Will try again later.


(Nathan Stratton) #18

Very cool, I think I am going to pick up 2 for my house, does the binding support more then one vac and do you plan on being able to pull coverage maps?


(Patrik) #19

Should support two, but haven't tested :wink:

I actually haven't seen the possibility to get the coverage map via the rest api...


(Nathan Stratton) #20

I see some talk of it in the JS SDK

Getting robot coverage maps

To retrieve the list of robot cleaning coverage maps:

robot.maps().done(function (data) {
  if(data["maps"] && data["maps"].length > 0) {
    // since map image urls expire, you need to use the map id
    // to retrieve a fresh map url
    var mapId = data["maps"][0]["id"];
    robot.mapDetails(mapId).done(function (data) {
      // show the map image
      window.open(data["url"]);
    }).fail(function (data) {
      // something went wrong getting map details...
    });
  }else {
    // No maps available yet. Complete at least one house cleaning to view maps.
  }
}).fail(function (data) {
  // something went wrong getting robots map...
});
The code above retrieves the list of all the available maps and, if exists, shows the first one.