I send send information from the controller to a sensor node
on that there are 4 light connect. al with different child id
controller sends the child id and and level signaal
how can i get the child id out of the message on the node
Great! That worked. I was just trying to get it to work between the node and gateway, and the motion example didn't have the MY_NODE_ID in the example.
Got it after some trial and error with getters and setters.
In case someone needs. I did following.
MyMessage msg(); //Create a blank MyMessage instance. Do this before void setup()
then when you want to send the message. Create a message on the fly like following.
1. msg.setType(2);
2. msg.setSensor(1);
3. msg.setDestination(2);
4. send(msg.set(1));
This is what I am doing above:
set message type ex. V_LIGHT is 2. Look at API for more
Set sensor child ID of the sensor you want to change status of
This is the destination node ID which has the sensor you are trying to reach
Send the message just like you would usually.
Hope this helps someone
Does this help:
http://forum.mysensors.org/topic/748/manual-assigning-node-id-s-for-network-with-repeaters
I agree with you that the serial messages are not perfectly documented, but realise that this site has been made (as far as I know) by a bunch of people that share their 'love' for home automation.....
boozz