tobof / openhab-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
39 stars 30 forks source link

Mysensors 2.2.0 beta splash screen throws java stacks #92

Closed Adesin-fr closed 6 years ago

Adesin-fr commented 6 years ago

I've plugged my gateway with last beta, and splash_screen enabled.

It seems that splash_screen printed by gateway is not supported by the binding . Here is the log :

2017-09-18 15:51:28.058 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB1 [baudRate:115200]
2017-09-18 15:51:28.131 [DEBUG] [col.serial.MySensorsSerialConnection] - Final port list: /dev/ttyUSB1
2017-09-18 15:51:28.189 [DEBUG] [col.serial.MySensorsSerialConnection] - Successfully connected to serial port.
2017-09-18 15:51:28.192 [DEBUG] [col.serial.MySensorsSerialConnection] - Waiting 3 seconds to allow correct reset trigger on serial connection opening
2017-09-18 15:51:31.198 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
2017-09-18 15:51:31.198 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received:  __  __       ____
2017-09-18 15:51:31.202 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.207 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
2017-09-18 15:51:31.209 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.214 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
2017-09-18 15:51:31.217 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.222 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
2017-09-18 15:51:31.225 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.230 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
2017-09-18 15:51:31.234 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.240 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received:         |___/                      2.2.0-beta
2017-09-18 15:51:31.252 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.255 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: true
2017-09-18 15:51:31.257 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 
2017-09-18 15:51:31.258 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
    at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.261 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: true
2017-09-18 15:51:31.262 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;14;Gateway startup complete.
2017-09-18 15:51:31.264 [INFO ] [rs.internal.gateway.MySensorsGateway] - Node 0 available again!
2017-09-18 15:51:31.266 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;0;0;18;2.2.0-beta
2017-09-18 15:51:31.267 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
2017-09-18 15:51:31.268 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
2017-09-18 15:51:31.270 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.2.0-beta
2017-09-18 15:51:31.272 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.2.0-beta)
2017-09-18 15:51:31.277 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,2]
2017-09-18 15:51:31.279 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.

The splash screen which is sent by the gateway is this one :

  __  __       ____
 |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
 | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
 | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
 |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
         |___/                      2.2.0-beta
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.2.0-beta
0;255;3;0;2;2.2.0-beta

I've also opened an issue on MySensors git, since this issue could be resolved by a modification on mysensors gateway code (prefix splash with a standard frame )

andreacioni commented 6 years ago

Hi @LemarinelNet, Thank you for reporting this issue. I can confirm that is present in current release, but I don't see a quick and clean solution to fix it. Just out of curiosity, why you need "splash screen" enabled?

Adesin-fr commented 6 years ago

I don't need it enabled, I think it was by default. I disabled it and of course it works.

PS: since a few minutes, mysensors snapshot has now splash_screen disabled for gateway.

andreacioni commented 6 years ago

Good news! I hope they keep it disabled by default in future release 😄