Robonect binding / Automower WLAN Module

binding
Tags: #<Tag:0x00007fd30e1f40d0>

(Marco Meyer) #1

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.


(Daniel Malmgren) #2

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:


(Marco Meyer) #3

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:


(Daniel Malmgren) #4

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:


(Marco Meyer) #5

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


(Daniel Malmgren) #6

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:


(Marco Meyer) #7

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.


(Daniel Malmgren) #8

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.


(Marco Meyer) #9

Perfect, once you confirm the binding works, I will add your Mower / Firmware combination to the “Tested mowers” section :wink:


(Daniel Malmgren) #10

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:


(Maximilian) #11

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.


(Marco Meyer) #12

Hi Maximilian,
Its already there. It’s called end of day. Just set the mode to end of day, when its raining…


(Maximilian) #13

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


(Daniel Malmgren) #14

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


(Maximilian) #15

@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:

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


(Marco Meyer) #16

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?


(Maximilian) #17

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


(Daniel Malmgren) #18

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?


(Maximilian) #19

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.


(Daniel Malmgren) #20

Aha… Well, then it makes sense. Sorry for questioning :wink: