reyem / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
3 stars 1 forks source link

Exceptions in error status #12

Closed Mr-iX closed 7 years ago

Mr-iX commented 7 years ago

This night my mower changed to the error state. After that an exception was thrown. This exception was always raised, when the mower changed again to the error state. Anyhow it seems that everything is working fine.

Maybe you know this issue and can fix it:

2017-08-27 23:57:05.004 [ERROR] [ing.robonect.handler.RobonectHandler] - Unexpected exception. Setting thing offline com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 1 column 2 at com.google.gson.Gson.fromJson(Gson.java:820)[11:com.google.gson:2.3.1] at com.google.gson.Gson.fromJson(Gson.java:775)[11:com.google.gson:2.3.1] at com.google.gson.Gson.fromJson(Gson.java:724)[11:com.google.gson:2.3.1] at com.google.gson.Gson.fromJson(Gson.java:696)[11:com.google.gson:2.3.1] at org.openhab.binding.robonect.model.ModelParser.parse(ModelParser.java:31)[229:org.openhab.binding.robonect:2.2.0.201708181923] at org.openhab.binding.robonect.RobonectClient.getMowerInfo(RobonectClient.java:154)[229:org.openhab.binding.robonect:2.2.0.201708181923] at org.openhab.binding.robonect.handler.RobonectHandler.refreshMowerInfo(RobonectHandler.java:265)[229:org.openhab.binding.robonect:2.2.0.201708181923] at org.openhab.binding.robonect.handler.RobonectHandler.access$0(RobonectHandler.java:264)[229:org.openhab.binding.robonect:2.2.0.201708181923] at org.openhab.binding.robonect.handler.RobonectHandler$1.run(RobonectHandler.java:394)[229:org.openhab.binding.robonect:2.2.0.201708181923] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_144] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_144] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144] at java.lang.Thread.run(Thread.java:748)[:1.8.0_144] Caused by: java.io.EOFException: End of input at line 1 column 2 at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1414)[11:com.google.gson:2.3.1] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:498)[11:com.google.gson:2.3.1] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:418)[11:com.google.gson:2.3.1] at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:190)[11:com.google.gson:2.3.1] at com.google.gson.Gson.fromJson(Gson.java:810)[11:com.google.gson:2.3.1] ... 15 more

reyem commented 7 years ago

The message basically states that the module does not respond with a proper formattes json message. This leads me to 2 suspictions: 1) old robonect firmware Or 2) encoding issue/ special characters in error message!? So

In case you have an error, you could also query the status manually before resetting. Just go with xour browser to http:///json?cmd=status

Then post the response here...

Mr-iX commented 7 years ago

My Robonect Firmware is: 0.9e Last Error Message: Alarm - Mower gestoppt Language: Deutsch Response from cmd=status: {"successful": true, "name": „Mower“, "status": {"status": 4, "stopped": false, "duration": 2351, "mode": 0, "battery": 86, "hours": 558}, "timer": {"status": 1, "next": {"date": "30.08.2017", "time": "08:00:00", "unix": 1504080000}}, "wlan": {"signal": -78}}

Around an hour ago I got the same exception. But this time the mower wasn't in the error state.

reyem commented 7 years ago

OK, almost same configuration like me. But I do not face the issue so far... As you also got the exception while not being in error state, I have no idea on what it can be. You could try setting the log level of org.openhab.binding.robonect.RobonectClient to 'DEBUG'. Then the binding should log the actual response it gets from the module.

Mr-iX commented 7 years ago

Ok I will set it to Debug log level and wait until it happens again.

Mr-iX commented 7 years ago

So now after 2 weeks and several Automower errors, the issue haven't appeared again.