how to customize gateway



  • Hi guys,
    I just found this awesome page. I went through the getting started staff, but i'm unable find any documentation. I was able to run serial gateway server on raspi and node on arduino nano. Im just wondering if is possible to send messages from gateway to node(s). Im planing to use my custom controller so i need to handle data by myself. Where i can get some hint how to send messages (gateway to one node/ all nodes) or how to handle received data on gateway? Please could u help where i can find some information. Thanks so much.


  • Admin



  • thanks for reply. I've read that already but i dont really understand it. When i run my gateway im not able to send any commands to it because gateway just listen to messages from nodes, there is no input for commands. Where I can send this kind of command 13;7;1;0;2;1\n (which supose to send command to node to dome something)? Maybe i just missed point. Thank you


  • Admin

    You send the commands from the RPi to the gateway over serial the line.
    (or maybe I don't understand your setup)



  • Right so I connected RPi with gateway(NRF24) over serial protocol (GPIO pins). When i run gateway example "sudo ./MyGateway". Gateway starts working and my console is showing up new messages received from node something like "12;6;0;0;3;1.4\n". And my question is when i want to say hey gateway send command to node, to switch off light (for example). Do I need to write something like "sudo ./MyGateway 'parameters (e.g.13;7;1;0;2;1\n)" in new console to send command from RPi to gateway (or how it works)? I dont understand communication between RPi (or other controller) and Gateway....thanks so much.


  • Admin

    Which serial gateway are you referring to?



  • I think im starting to understand it....in arduino SerialGateway i read inputs in void serialEvent() method right? Im using PiGatewaySerial as a gateway, but im lost witch method supose to read inputs, maybe gw->parseAndSend(buff) is used for sending commands. So i have to read commands from pty_master?


Log in to reply
 

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