Command for Relay Actuator



  • I found this wonderful interesting site, but me as arduino newbee wanna learn how to use these sensors.
    Because i have a fully working Domotiga ( www.domotiga.nl ) envoirement and want to try to integrate this in Domotiga.
    So i dont use a Vera controller.
    So i flashed one nano with the (serial)gateway sketch, only edited the line : Gateway gw; deleted the slashes and deleted the line : //Gateway gw(9, 10, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, 6, 5, 4);
    On another test uno i put the motion sensor sketch edited some lines, and on the (gateway)nano i get the sensor data for example : 2;1;0;16;Motion or 2;1;0;16;1 etc so this is useful for integration in Domotiga later.
    But now i want to see how it works to sent some data from gateway to, for example an arduino with the Relayactuator sketch.
    So question : In the serial monitor from the nano which is the gateway, what do i have to type to control a relay in another node say number 3?


  • Mod

    Hmm, do I understand that you are going to try to use a gateway as a controller?

    If so you would still have to make one of the boards a gateway imho.
    And you would have to create the logic for communication on the gateway which is not (or hardly) possible because you will soon run out of memory...



  • Marcel,

    "Hmm, do I understand that you are going to try to use a gateway as a controller?"
    No , as i wrote Domotiga is later getting my controller. This is a home automation system running on a cubieboard.
    But for testing i want to know how to control a sensor.
    So if i take for example a uno or nano, and put in the gateway sketch then open the serial monitor what do i have to type/sent to control a relay in another node?
    Its for testing, because if this is possible and works i can get this command serial out of my Domotiga controller.


  • Mod

    Aha, now I understand.

    I think this is going to help you.


  • Admin

    http://www.mysensors.org/build/sensor_api#the-serial-protocol

    12;3;1;2;1
    

    Turn on relay connected to node with radio-id 12 and relay registered with child-id 3

    12;3;1;2;0
    

    Turn off relay connected to node with radio-id 12 and relay registered with child-id 3



  • Ok im gonna try this. I allready found this but did not work will investigate.
    Hello Hek, i have seen that you found the Domotiga forum ๐Ÿ™‚



  • I dont get further with this.
    Am i right that i can sent a message from the gateway to a sensor or vice versa without using a controller?
    So if i use an gateway and a sensor with for example the motion sensor sketch with fixed id i can sent a message in the serial monitor of the motion sensor node to the gateway??
    If i do that nothing happens in the gateway serial monitor and vice versa.
    What am i doing wrong?


  • Admin

    Yes, you should be able to send messages without a controller (if you use fixed id's in the sensors).

    Some example sketches requests configuration from controller like isMetricSystem() . You will have to remove these as no controller will answer behind the gateway.

    You cannot use the serial monitor to send a message from the sensor (use the API). Only gateway listens to input on serial line.



  • So again if i type the command 12;3;1;2;1 in the serial monitor of the gateway, this command also has to show up in the sensor serial monitor ???
    I ask this because nothing happens here, but i see a led flashes so it look like something is been sent.



  • For others:

    As written in another topic : http://forum.mysensors.org/topic/111/can-t-control-actuator#747 i also enabled "newline" in the serial monitor to sent commands, and now it works.
    Thanks Hek for help.


Log in to reply
 

Suggested Topics

45
Online

11.6k
Users

11.2k
Topics

113.0k
Posts