souliss / bindingopenhab2

Souliss binding developed for openHAB 2
3 stars 3 forks source link

Error decoding status frame then no more communications #7

Closed FulvioSpelta closed 5 years ago

FulvioSpelta commented 5 years ago

During the first status update from a node there is a java error, then you can see that there is not any more response to the ping request and the gateway goes offline.

2019-04-14 17:31:35.630 [DEBUG] [.protocol.SoulissBindingUDPServerJob] - Packet received (port 56994) HEX: [24 23 17 26 48 BD 00 31 00 00 04 18 24 24 24 24 D8 4B 0C 4C 00 FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
2019-04-14 17:31:35.633 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Received functional code: 0x31 - Read state answer
2019-04-14 17:31:35.642 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding t18 packet
2019-04-14 17:31:35.657 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding t18 packet
2019-04-14 17:31:35.672 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding t18 packet
2019-04-14 17:31:35.686 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding t18 packet
2019-04-14 17:31:35.700 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding T5n packet
2019-04-14 17:31:35.717 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding T5n packet
2019-04-14 17:31:35.727 [DEBUG] [al.protocol.SoulissBindingUDPDecoder] - Decoding T5n packet
2019-04-14 17:31:35.729 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NumberFormatException: null
    at java.math.BigDecimal.<init>(BigDecimal.java:494) ~[?:?]
    at java.math.BigDecimal.<init>(BigDecimal.java:383) ~[?:?]
    at java.math.BigDecimal.<init>(BigDecimal.java:806) ~[?:?]
    at org.eclipse.smarthome.core.library.types.DecimalType.<init>(DecimalType.java:57) ~[?:?]
    at org.eclipse.smarthome.core.library.types.DecimalType.valueOf(DecimalType.java:71) ~[?:?]
    at org.openhab.binding.souliss.internal.protocol.SoulissBindingUDPDecoder.decodeStateRequest(SoulissBindingUDPDecoder.java:647) ~[?:?]
    at org.openhab.binding.souliss.internal.protocol.SoulissBindingUDPDecoder.decodeMacaco(SoulissBindingUDPDecoder.java:121) ~[?:?]
    at org.openhab.binding.souliss.internal.protocol.SoulissBindingUDPDecoder.decodeVNetDatagram(SoulissBindingUDPDecoder.java:88) ~[?:?]
    at org.openhab.binding.souliss.internal.protocol.SoulissBindingUDPServerJob.run(SoulissBindingUDPServerJob.java:63) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
    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) [?:?]
2019-04-14 17:31:36.589 [DEBUG] [liss.handler.SoulissGatewayJobHealty] - Sending healthy packet
2019-04-14 17:31:36.594 [DEBUG] [ernal.protocol.SoulissCommonCommands] - sendHEALTY_REQUESTframe - HEX: [25 00 00 00 06 ], IP: 192.168.0.189 - port: 56994
2019-04-14 17:31:36.598 [DEBUG] [liss.handler.SoulissGatewayJobHealty] - Sent healthy packet
2019-04-14 17:31:57.089 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sending ping packet
2019-04-14 17:31:57.094 [DEBUG] [ernal.protocol.SoulissCommonCommands] - sendPing - HEX: [08 00 00 00 00 ], IP: 192.168.0.189 to port 56994
2019-04-14 17:31:57.097 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sent ping packet
2019-04-14 17:31:57.100 [DEBUG] [ouliss.handler.SoulissGatewayHandler] - Gateway do not respond to 9 ping packet - setting OFFLINE
2019-04-14 17:31:57.103 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SoulissGatewayHandler tried updating the thing status although the handler was already disposed.
2019-04-14 17:32:03.597 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sending ping packet
2019-04-14 17:32:03.601 [DEBUG] [ernal.protocol.SoulissCommonCommands] - sendPing - HEX: [08 00 00 00 00 ], IP: 192.168.0.189 to port 56994
2019-04-14 17:32:03.604 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sent ping packet
2019-04-14 17:32:27.106 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sending ping packet
2019-04-14 17:32:27.110 [DEBUG] [ernal.protocol.SoulissCommonCommands] - sendPing - HEX: [08 00 00 00 00 ], IP: 192.168.0.189 to port 56994
2019-04-14 17:32:27.112 [DEBUG] [ouliss.handler.SoulissGatewayJobPing] - Sent ping packet
2019-04-14 17:32:27.115 [DEBUG] [ouliss.handler.SoulissGatewayHandler] - Gateway do not respond to 10 ping packet - setting OFFLINE
2019-04-14 17:32:27.118 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SoulissGatewayHandler tried updating the thing status although the handler was already disposed.
FulvioSpelta commented 5 years ago

Hi all, I've found that the error java.lang.NumberFormatException: null is due to an error in openhab thing/item files configuration. I've misaligned the souliss slots of a node so the 2 bytes of a T52 was took from a wrong position in souliss frame.