MySensors 2.1.1 and serial port



  • Hi,

    I'm trying to establish connection with a few sensors through NRF24L01+ connected to the Raspberry 3's GPIO/serial port. Sample output from mysgw running in debug mode:

    CODE: SELECT ALL
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: TSF:MSG:READ,83-83-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:BC
    mysgw: TSF:MSG:FPAR REQ,ID=83
    mysgw: TSF:PNG:SEND,TO=0
    mysgw: TSF:CKU:OK
    mysgw: TSF:MSG:GWL OK
    mysgw: TSF:MSG:SEND,0-0-83-83,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysgw: TSF:MSG:PINGED,ID=83,HP=1
    mysgw: TSF:MSG:SEND,0-0-83-83,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=0,pt=1,l=1,sg=0:70
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    mysgw: !TSF:MSG:SEND,0-0-83-83,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=11,pt=0,l=18,sg=0:Si7021BatteryBoard
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.3
    mysgw: TSF:MSG:READ,83-83-0,s=1,c=0,t=6,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:READ,83-83-0,s=2,c=0,t=7,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:READ,83-83-0,s=199,c=0,t=13,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    mysgw: TSF:MSG:SEND,0-0-83-83,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysgw: TSF:MSG:READ,83-83-0,s=199,c=1,t=38,pt=7,l=5,sg=0:2.806
    mysgw: TSF:MSG:READ,83-83-0,s=255,c=3,t=0,pt=1,l=1,sg=0:69
    mysgw: TSF:MSG:READ,80-80-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:BC
    mysgw: TSF:MSG:FPAR REQ,ID=80
    mysgw: TSF:PNG:SEND,TO=0
    mysgw: TSF:CKU:OK
    mysgw: TSF:MSG:GWL OK
    mysgw: TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysgw: TSF:MSG:READ,80-80-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysgw: TSF:MSG:PINGED,ID=80,HP=1
    mysgw: TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1

    After starting the mysgw service, Domoticz gives the following, but does not recognizes any of my sensors:
    CODE: SELECT ALL
    2017-04-22 19:16:05.977 TCPServer: shared server started...
    2017-04-22 19:16:05.977 RxQueue: queue worker started...
    2017-04-22 19:16:07.978 Hardware Monitor: Started
    2017-04-22 19:16:07.989 EventSystem: reset all events...
    2017-04-22 19:16:07.989 EventSystem: reset all device statuses...
    2017-04-22 19:16:07.990 EventSystem: Started
    2017-04-22 19:16:08.989 MySensors: Using serial port: /dev/ttyUSB20
    2017-04-22 19:16:08.989 MySensors: Gateway Ready...
    2017-04-22 19:16:10.978 Hardware Monitor: Fetching data (System sensors)
    2017-04-22 19:16:15.356 Incoming connection from: 192.168.0.152
    2017-04-22 19:16:53.194 Hardware Monitor: Fetching data (System sensors)
    2017-04-22 19:17:10.264 MySensors: Gateway Version: 1.4
    2017-04-22 19:17:23.226 Hardware Monitor: Fetching data (System sensors)
    2017-04-22 19:17:53.259 Hardware Monitor: Fetching data (System sensors)
    2017-04-22 19:18:23.291 Hardware Monitor: Fetching data (System sensors)
    2017-04-22 19:18:53.327 Hardware Monitor: Fetching data (System sensors)

    Can you help me with this issue? I would really appreciate any help in this matter : )
    Also, I'm quite new to Domoticz ( < 5 hours ), how comes that it reports GW version 1.4 while my protocol version is 2.1.1?


  • Mod

    I'd suggest you to use the ethernet gateway on the raspberry, since you can use myscontroller to debug and gives you more flexibility in the future. Try it and let's see if anything happens.



  • @gohan
    I'm currently using a USB gateway that works perfectly. But now I want to use the RPI GPIO port directly for gateway.


  • Mod

    I have the nrf24 radio connected to the GPIO port and I also use ethernet gateway and it works great 😉



  • @B_Johnny23
    Raspberry 3's GPIO/serial port ?
    I can see "Using serial port: /dev/ttyUSB20" in your log.
    It looks like serial through USB.

    RPI3 GPIO serial port has got some differncies compare with previous RPi2.

    http://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/


Log in to reply
 

Suggested Topics

  • 5
  • 2
  • 1
  • 8
  • 1
  • 5

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts