Problem with connecting serial gateway to openhab2



  • Hi,

    So I tried to connect my serial gateway(Arduino mega) to openhab. The logs say:

    2020-01-07 19:34:02.408 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
    

    but then when I try to turn lights on the error shows up:

    2020-01-07 16:23:51.839 [ome.event.ItemCommandEvent] - Item 'light01' received command ON
    
    2020-01-07 16:23:51.849 [nt.ItemStatePredictedEvent] - light01 predicted to become ON
    
    2020-01-07 16:23:51.859 [vent.ItemStateChangedEvent] - light01 changed from OFF to ON
    
    ==> /var/log/openhab2/openhab.log <==
    
    2020-01-07 16:23:51.871 [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:342) ~[243:org.openhab.binding.mysensors:2.4.0.201812040738]
    
    	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:338) [243:org.openhab.binding.mysensors:2.4.0.201812040738]
    
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
    
    	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) [?:?]
    
    2020-01-07 16:23:52.050 [INFO ] [rsAbstractConnection$MySensorsWriter] - ACK received for message: 0;0;1;1;2;1
    

    There's my things file:

    Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB1", sendDelay=200, startupCheckEnabled=false ] {
        light                       light01 [ nodeId=0, childId=0, requestAck=true ]
      }
    
    

    I will be thankful for all help.


  • Hero Member

    @Marcin-Szyda please set requestAck=false and try again. Is the error appearing again?



  • @TimO Yes, but without this message:

    2020-01-07 16:23:52.050 [INFO ] [rsAbstractConnection$MySensorsWriter] - ACK received for message: 0;0;1;1;2;1
    


Suggested Topics

  • 6
  • 2
  • 5
  • 9
  • 6
  • 7
  • 6

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts