Read log from serial Gateway on raspberry Pi.



  • I belive I have read the answer to this question somwhere but I cant find the answer now.

    I have a node with 3st 1-wire sensors. It reported all the way in to Domoticz controller for a couple of hours.
    When I hook the node to a coumputer I can see in the serial monitor that it is indeed reading the temp and trying to send it but it reports "Failed".

    So now I want to read if the SerialGateway is reciving anything at all to see if I can get the problem sorted.

    //PEter


  • Contest Winner

    Not sure if I understand your question correctly. But the following command shows the serial communication on the Raspberry. I assume you know how to connect to the pi by ssh, or have a keyboard and monitor connected to the pi.

    sudo cat /dev/ttyACM0

    (at least that's the port that my USB gateway is using. You can see it in the hardware section of Domoticz)



  • @popunonkok

    I'm not sure what flavor of linux the raspberry Pi has, so it may not have all the utilities of a standard one.

    This works on my mac: screen /dev/cu.usbmodem1421 115200

    Here is an article with several ways to accomplish this

    Cheers



  • Hmm...

    TheoL: That didnt seem to work. I changed to my USBport, using:

    sudo cat /dev/ttyUSB0

    But that just left me "Hanging" so I hade to Quit that command using Ctrl-C.
    Im using SSH by the way.

    Barduino: Are you meaning that you have your gateway on a Mac? Im running Rasbian Wheezy on my Pi.

    Hmmm... I really would like to see the RAW serial output from the Gateway.



  • @popunonkok said:

    sudo cat /dev/ttyUSB0

    That works for me, but return some strange data - I assume that his is because the baudrate is wrong.
    barbuino posted the "screen" command that is working on a MAC, but I cant find a similar command for the pi - does anyone know that command?

    /Kurt


  • Contest Winner

    @popunonkok Could you post the port you've setup in Domoticz. Settings hardware. Then click on the MS gateway and you should be able to see the serial port on which the gateway is working.

    When I execute the cat command on my USB device, I see something like this:

    theo@domoticz-main ~ $ sudo cat /dev/ttyACM0
    0;0;3;0;9;read: 2-2-0 s=1,c=1,t=0,pt=7,l=5,sg=0:19.2
    2;1;1;0;0;19.2
    0;0;3;0;9;read: 2-2-0 s=2,c=1,t=4,pt=7,l=5,sg=0:1018
    2;2;1;0;4;1018
    0;0;3;0;9;send: 0-0-9-9 s=0,c=1,t=2,pt=0,l=1,sg=0,st=ok:1
    0;0;3;0;9;send: 0-0-9-9 s=0,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
    


  • @popunonkok said:

    Hmm...

    TheoL: That didnt seem to work. I changed to my USBport, using:

    sudo cat /dev/ttyUSB0

    But that just left me "Hanging" so I hade to Quit that command using Ctrl-C.
    Im using SSH by the way.

    Barduino: Are you meaning that you have your gateway on a Mac? Im running Rasbian Wheezy on my Pi.

    Screen is a common utility found in most linux distros, I guess Pi isnt one of them

    I connect my gateway to a computer (mac, windows) and then use node.js to send the messages to a controller.

    Anyway this http://playground.arduino.cc/Interfacing/LinuxTTY is a really good post on how to monitor your usb/serial on a linux

    The sudo cat /dev/xxxyyyy does not work on my mac but i suspect is because of the baud rate

    RVB:~ rvb$ sudo cat /dev/cu.usbmodem1411
    Password:
    s1??~???ےIq~???s1q?^???

    but with the
    RVB:~ rvb$ screen /dev/cu.usbmodem1411 115200
    i get

    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    0;0;3;0;14;Gateway startup complete.

    Either way make sure you are selecting the correct /dev/xxxyyy device and nothing else is connected to it (serial monitor of the arduino ide etc)


    Edit

    This is also a good post on how to monitor serial port an PI

    http://raspberrypi.stackexchange.com/questions/22181/arduino-serial-port-via-raspberry-pi-ssh

    Cheers



  • mysensorsgateway.jpg

    TheoL: This is the haardware settings.

    I havent have time to look into the other answers yet.



  • TheoL: the screenshot you posted. Is that screen updating every time you receive something?


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.