Neato BotVac Connected binding?

@philKrylc It’s working here for me (installed latest)

After editing the Refresh time interval of the Neato Thing :

And restarting openHAB, the log shows updates on the configured time-interval:


2017-02-09 12:40:41.265 [INFO ] [b.binding.neato.handler.NeatoHandler] - Will get STATE for Robot Spijker
2017-02-09 12:40:41.930 [INFO ] [b.binding.neato.handler.NeatoHandler] - Successfully got and parsed new state for Spijker
2017-02-09 12:40:51.063 [INFO ] [b.binding.neato.handler.NeatoHandler] - Will get STATE for Robot Spijker
2017-02-09 12:40:51.579 [INFO ] [b.binding.neato.handler.NeatoHandler] - Successfully got and parsed new state for Spijker
2017-02-09 12:41:01.062 [INFO ] [b.binding.neato.handler.NeatoHandler] - Will get STATE for Robot Spijker
2017-02-09 12:41:01.586 [INFO ] [b.binding.neato.handler.NeatoHandler] - Successfully got and parsed new state for Spijker

Thanx!

@loovanloon Thanks! This was a good hint.
As far as I could find out, the Refresh time interval is set in seconds not minutes (even if it says minutes).

@scurb, is it also possible to define the refresh interval in the .things file? I tried to define it with:
neato:vacuumcleaner:robot [ serial="xxxxxx", secret="yyyyyyy", name="robotName", refresh="60" ]

but the refresh is wrong. However, the binding is setting it to 60 (seconds) then (which is obviously 1 minute).

Finally, the binding is refreshing the data after 60 seconds now even if it was a bit tricky - thanks a lot guys!

Wanted to check and see if there are any plans to get the map image?

Hey everyone!

Thank you for the great binding! I’ve tested it with my Neato Botvac D5 Connected. The autodiscovery worked well and the binding seems to get all stats. However, I am not able to start the cleaning. Other commands ,i.e., pause, resume, and stop do work, once I manually started cleaning.

Did anybody else had similar issues? Any suggestions where I could look into?

Not prioritized - but sure in my mind :slight_smile: I will focus on getting it through the push request at first.

Oh - have not heard about that before! Is it possible for you to enable debug log and paste it?

Hi!

You are absolutely right - it’s in seconds, not minutes. I have updated the label string in the new version of the binding.

I have also uploaded a new jar-file that fixes a problem with conversion of refresh time in things-file. Now it should read the “refresh” setting in things declaration file as well.

https://github.com/scurb/NeatoBinding/blob/master/org.openhab.binding.neato_2.0.0.201702102206.jar

Here’s the debug log after I have tried to start the cleaning:

2017-02-12 17:59:05.430 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Ok - will handle command for CHANNEL_COMMAND
2017-02-12 17:59:06.172 [INFO ] [b.binding.neato.handler.NeatoHandler] - Will get STATE for Robot neato
2017-02-12 17:59:06.596 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Result from getRobotState: {"version":1,"reqId":"abc","result":"ok","data": {},"error":null,"alert":"clean_completed_to_start","state":1,"action":0,"cleaning": {"category":2,"mode":2,"modifier":1,"navigationMode":1,"spotWidth":0,"spotHeight":0},"details": {"isCharging":false,"isDocked":false,"isScheduleEnabled":false,"dockHasBeenSeen":false,"charge":77},"availableCommands": {"start":true,"stop":false,"pause":false,"resume":false,"goToBase":false},"availableServices": {"findMe":"basic-1","generalInfo":"basic-1","houseCleaning":"minimal-2","IECTest":"basic-1","localStats":"advanced-1","logCopy":"basic-1","preferences":"basic-1","schedule":"minimal-1","softwareUpdate":"basic-1","spotCleaning":"minimal-2","wifi":"basic-1"},"meta": {"modelName":"BotVacD5Connected","firmware":"3.0.0-645"}}
2017-02-12 17:59:06.606 [INFO ] [b.binding.neato.handler.NeatoHandler] - Successfully got and parsed new state for neato
2017-02-12 17:59:06.606 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Your vacuum cleaner does not support General Info messages
2017-02-12 17:59:06.607 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel battery-level - lets see if any links exists!
2017-02-12 17:59:06.607 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.612 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel state - lets see if any links exists!
2017-02-12 17:59:06.613 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.618 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel version - lets see if any links exists!
2017-02-12 17:59:06.619 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.624 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel model-name - lets see if any links exists!
2017-02-12 17:59:06.625 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.630 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel firmware - lets see if any links exists!
2017-02-12 17:59:06.631 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Well - channel firmware does not seem to have a valid link. Will not publish changes!
2017-02-12 17:59:06.632 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel action - lets see if any links exists!
2017-02-12 17:59:06.633 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Well - channel action does not seem to have a valid link. Will not publish changes!
2017-02-12 17:59:06.633 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel dock-has-been-seen - lets see if any links exists!
2017-02-12 17:59:06.633 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Well - channel dock-has-been-seen does not seem to have a valid link. Will not publish changes!
2017-02-12 17:59:06.634 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel is-docked - lets see if any links exists!
2017-02-12 17:59:06.634 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.639 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel is-scheduled - lets see if any links exists!
2017-02-12 17:59:06.640 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.649 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel is-charging - lets see if any links exists!
2017-02-12 17:59:06.650 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.656 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Will try to publish changes to channel error - lets see if any links exists!
2017-02-12 17:59:06.656 [DEBUG] [b.binding.neato.handler.NeatoHandler] - Yes, channel is linked. Will publish updates!
2017-02-12 17:59:06.658 [ERROR] [b.binding.neato.handler.NeatoHandler] - Error when refreshing state. Error: null

I cannot see anything suspicious – except for that last error. However, it seems like the error appears at every state refresh. As I said, every other commands, i.e., pausing, resuming, and stopping, works as expected – just start cleaning does not work. Also the state is updated correctly (despite the error message).

I guess I have the solution already – altough I couldn’t test it, since I don’t know how to build these OpenHAB bindings …

I think the Neato Botvac Connected D5 doesn’t support the same API commands as the older Neato Botvac Connected model (the one with the LCD display on the robot). So, for the D5 the clean command body in NeatoRobot.java should be

body = "{\"reqId\": \"1\", \"cmd\": \"startCleaning\", \"params\": { \"category\": 2, \"navigationMode\": 2 }}";77

As soon as I figure out how to build a binding, I’ll test it with this change.

Okay … that doesn’t seem to be the solution … Any other ideas, somebody? :disappointed:

Sorry - missed the notification avout new messages here. Did you manage to test for minimal-2 message format of the houseCleaning command? That would be my guess and I would need to fix this handling in code.

But it does not seem to be the solution if I get you right?

Added a new file: https://github.com/scurb/NeatoBinding/blob/master/org.openhab.binding.neato_2.0.0.201702202022.jar

Where it should send the correct houseCleaning command based on the available service classes (basic-1, minimal-2 or basic-2).

But - it will most probably send exactly the string that you have tried with…?

Thanky for the update, @scurb! Sadly, it still doesn’t work.

Starting the cleaning doesn’t work and I am still getting these status update errors (although the status seems to get updated correctly):

2017-02-21 20:20:29.071 [ERROR] [b.binding.neato.handler.NeatoHandler] - Error when refreshing state. Error: null

Would you mind pushing your update to github, such that I can experiment a little with the code for the Neato BotVac Connected D5?

Oh - too bad!

It’s there in the PR already. Can you access https://github.com/scurb/openhab2-addons ? There you will find the Neato bindign.

@scurb, thank you so much! After I spent a lot of time with debugging and building the binding over and over again, I finally gave up. I removed the binding. Today, I gave it a try again with your last version and – for reasons I still don’t understand – it works right away! My guess is that OpenHAB2 didn’t really use the new versions of the binding I was putting in the addon folder but instead used an (internally cached ???) old version? @Kai Does the online version of OpenHAB internally store/cache bindings such that this behavior can be explained?

TL;DR: The binding now works with the Neato BotVac Connected D5 as well! Thanks!

Really nice to hear!

Enjoy a cleaner house now when you can start the vacuumer :wink:

And not to forget - big thanks for your efforts in testing and debugging!

Hi,

there is a german version of Neato BotVac. It’s called Kobold VR200 and it uses the same protocol but different servers.
I forked your binding and it’s now supporting different vendors.

It already works very well. However, I had to implement a workaround regarding some ssl issues. I would fix it and send you a PR, if you are interested?

Oh, great work :)!

Absolutely, send the PR and I’ll try to get it into the OH PR.

Where can i download the binding?

1 Like

Go to https://github.com/scurb/NeatoBinding