In my OH3-openhab.log is often
[WARN ] [etatmo.internal.camera.CameraHandler] - Error on parsing the content as JSON!
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:433) ~[bundleFile:?]
at org.json.JSONObject.<init>(JSONObject.java:194) ~[bundleFile:?]
at org.json.JSONObject.<init>(JSONObject.java:321) ~[bundleFile:?]
at java.util.Optional.map(Optional.java:265) ~[?:?]
at org.openhab.binding.netatmo.internal.camera.CameraHandler.executeGETRequestJSON(CameraHandler.java:222) [bundleFile:?]
at org.openhab.binding.netatmo.internal.camera.CameraHandler.getLocalCameraURL(CameraHandler.java:211) [bundleFile:?]
at org.openhab.binding.netatmo.internal.camera.CameraHandler.switchVideoSurveillance(CameraHandler.java:188) [bundleFile:?]
at org.openhab.binding.netatmo.internal.camera.CameraHandler.handleCommand(CameraHandler.java:71) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy6362.handleCommand(Unknown Source) [?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
when I
events.sendCommand("NetatmoWCWelcomeCamera_State", "OFF");
and this is linked to
netatmo:NACamera:xxxx:wc:welcomeCameraStatus
Sometime it works and disables the netatmo welcome camera - and sometimes not.
The netatmo things are all online.
When I disable the welcome camera thing and enable it again then the sendCommand works well.
Is there an easy was to disable and enable a thing from OH3 application/javascript?
Please with a small example because I not a great programmer. Every rule is very hard work for me.
Openhab 3.0.1 on debian, netatmo weather station, welcome and presence
Thank you.