New installation of Openhab and first time using the PaperUI. I’m using the Openhabian pre-built .img file running on a Raspberry Pi 4. I’m using the Development branch of the MySensors Raspberry Pi Gateway based on this pull request:
I can add the mysensors serial gateway binding and add a switch that is attached to my gateway and both are recognized however, if I reboot the pi or restart the OpenHab service the gateway will connect but the outlet attached remains uninitialized.
The log file relating to mysensors during the restart looks like this:
2020-01-01 15:35:33.778 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
2020-01-01 15:35:33.837 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
2020-01-01 15:35:33.842 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 4]
2020-01-01 15:35:33.859 [DEBUG] [col.serial.MySensorsSerialConnection] - Enabling connection watchdog
2020-01-01 15:35:33.864 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB20 [baudRate:115200]
2020-01-01 15:35:33.865 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@9cd1fd': bundleContext
java.lang.NoSuchFieldError: bundleContext
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.registerDeviceDiscoveryService(MySensorsBridgeHandler.java:216) ~[?:?]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:86) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
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_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2020-01-01 15:35:33.887 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'mysensors:bridge-ser:a07cc25d': bundleContext
java.lang.NoSuchFieldError: bundleContext
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.registerDeviceDiscoveryService(MySensorsBridgeHandler.java:216) ~[?:?]
at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:86) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
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_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2020-01-01 15:35:33.924 [DEBUG] [col.serial.MySensorsSerialConnection] - Serial port event listener started
2020-01-01 15:35:33.925 [DEBUG] [col.serial.MySensorsSerialConnection] - Successfully connected to serial port.
2020-01-01 15:35:33.936 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;3;0;14;Gateway startup complete.
2020-01-01 15:35:33.939 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
2020-01-01 15:35:33.940 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.lang.NumberFormatException : For input string: "Gateway startup complete."
at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:342) ~[bundleFile:?]
at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:338) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2020-01-01 15:35:33.944 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;0;0;18;2.4.0-alpha
2020-01-01 15:35:33.973 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
2020-01-01 15:35:33.979 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,4]
2020-01-01 15:35:33.981 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 4;1;1;0;2;1
2020-01-01 15:35:33.982 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
2020-01-01 15:35:33.984 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 not present in node 4
I’ve spent about a day trying to figure this out and am ready to throw in the towel. Any help would be greatly appreciated. See post below for screenshots of my “things” before and after reboot.