I have a new problem regarding the mysensors serial gateway.
I have started with a fresh install of Openhab, and have found the documents detailing how to install an up to date java 8 version confusing and out of date. With that said, I’m not sure my java is working properly which may be causing this problem.
I have installed the mysensors binding via the paperUI marketplace, and after adding the serial gateway and configuring it, it says UNINITIALIZED - HANDLER_INITIALIZING_ERROR.
The logs in karafe gives:
18:08:16.675 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@1ae7e8b': null
java.lang.NullPointerException: null
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.loadCacheFile(MySensorsBridgeHandler.java:172) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:79) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
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) [?:?]
18:08:16.893 [ERROR] [home.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'mysensors:bridge-ser:7e41fb40': null
java.lang.NullPointerException: null
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.loadCacheFile(MySensorsBridgeHandler.java:172) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:79) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
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) [?:?]
Can anyone help me to debug this problem?
I can confirm that when using the command:
screen /dev/ttyUSB0 115200
I can see the debug information coming from the gateway:
0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGA---,VER=2.2.0
0;255;3;0;9;4 TSM:INIT
0;255;3;0;9;6 TSF:WUR:MS=0
0;255;3;0;9;14 TSM:INIT:TSP OK
0;255;3;0;9;17 TSM:INIT:GW MODE
0;255;3;0;9;20 TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;23 MCO:REG:NOT NEEDED
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.2.0
0;255;3;0;9;28 MCO:BGN:STP
0;255;3;0;9;34 MCO:BGN:INIT OK,TSP=1
And when I operate a sensor node:
0;255;3;0;9;141450 TSF:MSG:READ,102-102-0,s=1,c=1,t=38,pt=7,l=5,sg=0:3.4
102;1;1;0;38;3.4
0;255;3;0;9;141457 TSF:MSG:READ,102-102-0,s=255,c=3,t=0,pt=1,l=1,sg=0:102
102;255;3;0;0;102
0;255;3;0;9;141470 TSF:MSG:READ,102-102-0,s=2,c=1,t=16,pt=1,l=1,sg=0:1
102;2;1;0;16;1
However, if I use the command:
cat /dev/ttyUSB0
I get nothing.