If trying to Link Item in PaperUI the duration is limited to 60
The robonect can take jobs with much more minutes, for example 180 (cutting gras ca. 90 Minutes, reloading an hour, cutting again für 90 Minutes, reloading, then during reloading stopping job)
Any idea whats wrong with the channel if configured like in example?
Can anyone change to new API Version?
Find another Error: While uninstall and reinstall robonect Binding Snapshot Build 1544 openhab.log shows warning:
2019-03-02 21:55:52.905 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoSuchFieldError: SECOND
at org.openhab.binding.robonect.internal.handler.RobonectHandler.refreshMowerInfo(RobonectHandler.java:253) ~[?:?]
at org.openhab.binding.robonect.internal.handler.RobonectHandler.access$1(RobonectHandler.java:241) ~[?:?]
at org.openhab.binding.robonect.internal.handler.RobonectHandler$MowerChannelPoller.run(RobonectHandler.java:411) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
exactly what i have. but this leads to the following error:
2020-03-30 11:23:38.559 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.robonect.internal.handler.RobonectHandler@58b5976c': Name is null
java.lang.NullPointerException: Name is null
at java.lang.Enum.valueOf(Enum.java:236) ~[?:1.8.0_232]
at org.openhab.binding.robonect.internal.model.cmd.ModeCommand$Mode.valueOf(ModeCommand.java:1) ~[?:?]
at org.openhab.binding.robonect.internal.handler.RobonectHandler.handleJobCommand(RobonectHandler.java:140) ~[?:?]
at org.openhab.binding.robonect.internal.handler.RobonectHandler.sendCommand(RobonectHandler.java:127) ~[?:?]
at org.openhab.binding.robonect.internal.handler.RobonectHandler.handleCommand(RobonectHandler.java:87) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy796.handleCommand(Unknown Source) [?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Hi Jens, thanks a lot! I just checked out all commands which can be transformed using XPath depending on the needs:
battery
clock
door
error
exit
health
joystick (?)
mode
passage
portal
push
remote
status
timer
weather
wire
Can you give some more Information? I activated in Robonect to talk to openhab due to status change too (with an own API-Script), but I think you got a solution to get all values with jsonpath or Xpath?
I simply used the same xml interface you did. So if you send for example the first one of the mentioned commands to the interface, you will use a command like this:
So if you want to know the voltage you could use an item like:
String voltage "Current voltage [XPATH(/robonect/batteries/battery/voltage/text()):%s]" (gGroup) { http=">[ON:GET:http://192.168.0.xx/xml?user=username&pass=password&cmd=battery]" }
I haven’t tested it with an item, but in a rule it works like this, where “url” is a string just as http://192.168.0.xx/xml?user=username&pass=password&cmd=battery
In my case I’m using the response for logging information.
var String response = transform("XPATH", "/robonect/successful/text()", sendHttpGetRequest(url))
Of course http Binding has to be installed to use this binding configuration and transformation xPath has to be installed. But that’s quite simple because you can do both in PaperUI or in addons.cfg file (my way).
Just FYI, JSON would work as well. You can test http://192.168.x.xx/json&user=xxxxx&pass=xxxxx&cmd=status
and compare JSON results with XML results.
JSON values are easier to define in Items from my point of view, but on the other hand you need a .js file for each value in /configuration/transform according to http-binding definition. The only alternative is using JSONPath. See https://www.openhab.org/addons/bindings/http1/#handling-json
So my conclusion is, that the easiest way to get the results is usage of JSON in combination with JSONPath Transformation.
The NullPointerException “Name is null” at location RobonectHandler.java:140 indicates that the channel parameter is not loaded at all (it is null), no matter how the channel configuration is entered. I tried it myself. Did you find a working configuration for the job-channel yet?
I came accross the thing configuration pages and there I saw that custom channels can be configured with parameters, just like the Astro binding does it. I just thought this might be working. As soon as my Robonect is working again, I’ll test it…