Robonect binding / Automower WLAN Module

Is anybody already working on a binding for the robonect.de WLAN module, which makes the Automower controllable via HTTP?

In their community forum the people describe integrations via normal HTTP Binding. But that is a bit inconvenient.
http://robonect.de/viewtopic.php?f=21&t=796

So I plan to start a simple binding for it. But if somebody already does it silently (there is no Feature Request in github yet), please let me know so we can join forces.

Did you start any work on this? Thought Robonect would be a nice addition for my Automower and of course OH integration would make it even better :slight_smile:

Yes, it is almost done. You can find it here:

you can download the current snapshot build from here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.robonect/2.1.0-SNAPSHOT/org.openhab.binding.robonect-2.1.0-SNAPSHOT.jar

and a bit of documentation here:

2 Likes

Great! I ordered my Robonect hardware today, with a little luck that means I can try this binding out soon. Iā€™ll get back with input. First question though: Is this a OH2 binding? Most of my current things come from the z-wave binding, so Iā€™m not used to fiddling with .items and .things files :slight_smile:

Great! Itā€™s a very nice module once it is installed :wink:

Itā€™s an OH2 binding. You just need to add a thing via PaperUI entering the IP of your robonect module. Of course the IP must be reachable from the network OH2 runs. So donā€™t try to enter the default IP of the Robonect exposed WLAN but properly integrate Robonect into your WLAN. After that all channels are mappable via PaperUI to items if you donā€™t like item files :wink:

Also please note that this is build on Openhab 2.1 SNAPSHOT. So Iā€™m not sure if it runs with current OH 2.0 stable. You should install a OH2.1 Snapshot version to be sure.

If you detect any bugs please report them under

1 Like

Ok, got the module installed now (on my Automower 310, you might want to add that model to the supported ones, Iā€™ve got fw 0.9e). The binding doesnā€™t work well though, I donā€™t know if it might be because Iā€™m still on 2.0 stable or something else? I get this in the log:

11:40:54.324 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ā€˜robonect:mower:051c4307ā€™ has been added.
11:40:54.366 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ā€˜robonect:mower:051c4307ā€™ changed from UNINITIALIZED to INITIALIZING
11:40:54.482 [ERROR] [ing.robonect.handler.RobonectHandler] - Exception when trying to initialize
org.openhab.binding.robonect.RobonectCommunicationException: Could not send command http://http://192.168.168.70/json?cmd=version
at org.openhab.binding.robonect.RobonectClient.sendCommand(RobonectClient.java:211)[249:org.openhab.binding.robonect:2.1.0.201706272144]
at org.openhab.binding.robonect.RobonectClient.getVersionInfo(RobonectClient.java:216)[249:org.openhab.binding.robonect:2.1.0.201706272144]
at org.openhab.binding.robonect.handler.RobonectHandler.refreshVersionInfo(RobonectHandler.java:313)[249:org.openhab.binding.robonect:2.1.0.201706272144]
at org.openhab.binding.robonect.handler.RobonectHandler.initialize(RobonectHandler.java:335)[249:org.openhab.binding.robonect:2.1.0.201706272144]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.util.concurrent.ExecutionException: java.nio.channels.UnresolvedAddressException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:655)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.openhab.binding.robonect.RobonectClient.sendCommand(RobonectClient.java:205)[249:org.openhab.binding.robonect:2.1.0.201706272144]
ā€¦ 10 more
Caused by: java.nio.channels.UnresolvedAddressException
at org.eclipse.jetty.util.SocketAddressResolver$Async$1.run(SocketAddressResolver.java:169)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
ā€¦ 1 more
11:40:54.506 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ā€˜robonect:mower:051c4307ā€™ changed from INITIALIZING to OFFLINE

Of course the url starting with ā€œhttp://http://ā€ doesnā€™t work. Any idea if this is something the binding does or OH itself?

Sorry for being a little reluctant to upgrading my environment to 2.1. Many things that could be broken :blush:

for me this looks like you have in the config
host=ā€œhttp://192.168.168.70ā€

but it should be
host=ā€œ192.168.168.70ā€

So remove the http:// prefix and it should be fine.

Hahahaā€¦ I feel kinda stupid now, donā€™t I? Why on earth do Firefox do that? I mark the IP address and copy it and then Firefox silently inserts ā€œhttp://ā€ in front of it. I do not want that! I only want to copy the stuff I actually marked!

Seems to work fine now. Iā€™ll get back when Iā€™ve tried some more.

Perfect, once you confirm the binding works, I will add your Mower / Firmware combination to the ā€œTested mowersā€ section :wink:

Yep, I can confirm everything works perfectly. This is with the combination Automower 310/Hx/0.9e and HA 2.0 stable. Thanks for a very good job!

edit: Btw, one thing in the readme that you could add is info about units used for the pollinterval and offlineTimeout settings. Are they seconds or minutes?

edit2: Doh. Just realized 2.1 was released, guess itā€™s time to upgrade now. Well, now we know that it works for 2.0 as well anyway :slight_smile:

Hi Marco,

can you implement a feature to set the Mower to ā€œFeierabendā€?
So that I can leave the Mower at home when itĀ“s raining.

Hi Maximilian,
Its already there. Itā€™s called end of day. Just set the mode to end of day, when its rainingā€¦

Ok thanks, I will try that later.
Have you got a documentation what kind of parameters I can send to the different Thing channels?

Itā€™s all in the readme: https://github.com/reyem/openhab2-addons/blob/2240-robonect-binding/addons/binding/org.openhab.binding.robonect/README.md

1 Like

@reyem
I have the problem, that the Error code and the Error message receive no update.
When I raise my automower, the Error date updates, but the code and message are still UNDEF.

Debug Log:

2017-07-29 12:11:53.687 [DEBUG] [nhab.binding.robonect.RobonectClient] - Response body was: {"successful": true, "name": "Mower", "status": {"status": 7, "stopped": true, "duration": 16, "mode": 1, "battery": 99, "hours": 1187}, "timer": {"status": 2, "next": {"date": "30.07.2017", "time": "08:00:00", "unix": 1501401600}}, "wlan": {"signal": -81}, "error": {"error_code": 71, "error_message": "Mower angehoben", "date": "29.07.2017", "time": "12:11:24", "unix": 1501330284}} 

Screenshot sitemap:

IMG_0642

Would it also be possible to show the last error message and date?

Currently the error message/code is just set if the mower is in error status. However, I could introduce a channel for last error message and last error code if this helps. Theoretically the full list of errors would aldo be available from the module. But I donā€™t know a good way/channel type to provide it in OH. Is the last error enough or do you need more?

For me the last error message would be perfect.
I donā€™t need the whole list of errors.

Seems like something quite unnecessary to me. Why donā€™t just make a rule to save the current error message if itā€™s useful for anything later on?

That would be possible, but when the error changed really fast back to the normal state, the items donā€™t get updated.
So it would be nice to always the the last error message from that api.

Ahaā€¦ Well, then it makes sense. Sorry for questioning :wink: