v1/feature endpoint now returns incorrect payload causing exceptions
Closed this issue · 1 comments
Perform a set, get exceptions similar to
2023-08-05 22:31:34.010 [WARN ] [re.internal.VicareDeviceThingHandler] - Unexpected exception handling command ON for channel vicare:heating:73a6950753:30d23790-ab86-3836-8e84-1c421bc1139d:heating_dhw_oneTimeCharge_activate
java.util.concurrent.CompletionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 13 path $.data
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 13 path $.data
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:270) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:161) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:266) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:1058) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:1016) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:959) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:927) ~[?:?]
at com.qubular.vicare.internal.VicareServiceImpl.sendCommand(VicareServiceImpl.java:269) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareBridgeHandler.sendCommand(VicareBridgeHandler.java:223) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareBridgeHandler.handleBridgedDeviceCommand(VicareBridgeHandler.java:200) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDeviceThingHandler.syncHandleCommand(VicareDeviceThingHandler.java:307) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDeviceThingHandler.lambda$handleCommand$3(VicareDeviceThingHandler.java:157) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
... 6 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 13 path $.data
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:395) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:259) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:161) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:266) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:1058) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:1016) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:959) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:927) ~[?:?]
at com.qubular.vicare.internal.VicareServiceImpl.sendCommand(VicareServiceImpl.java:269) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareBridgeHandler.sendCommand(VicareBridgeHandler.java:223) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareBridgeHandler.handleBridgedDeviceCommand(VicareBridgeHandler.java:200) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDeviceThingHandler.syncHandleCommand(VicareDeviceThingHandler.java:307) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDeviceThingHandler.lambda$handleCommand$3(VicareDeviceThingHandler.java:157) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
... 6 more
2023-08-05 22:32:48.252 [WARN ] [re.internal.VicareDeviceThingHandler] - Unexpected exception handling command ON for channel vicare:heating:73a6950753:30d23790-ab86-3836-8e84-1c421bc1139d:heating_dhw_oneTimeCharge_deactivate
java.util.concurrent.CompletionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 13 path $.data
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 13 path $.data
This appears to be caused by an undocumented change in what's returned by the v1/feature endpoint, proposed fix is to call the v2 features/ endpoint which will return v2 endpoints for all commands.
v2 endpoints continue to return expected payload.
Fixed in 4.0.1