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
@frits : This is my first GW, but during my early experiments I run it as an Ethernet GW, then I reconfigured to MQTT.
Currently I don't have a controller running but I'm using Node-Red + Influx-DB + Grafana.
So probably during these first experiments, while in Ethernet mode, the Node_IDs were distributed.
I will erase the EEPROMs by the next opportunity and will check the behaviour of my Nano sensors after re-boot.
Thanks for your explanation frits, it helped me to learn more about MySensors.
@mfalkvidd Thanks for your help. MYScontroller seems to be able to replace the gateway assignement. I was running it for troubleshooting and it assign ID that gateway already used.
So I created dummy ID in MYSController to ensure that node does not use the first one
Hi @hek and @scalz
Thanks for your response. I have been unable to locate the guide I thought I previously found... So I probably misread that.
Thank you for the clear answer - which leaves me with only one more ( at the moment )... If I install OpenHAB - will it be able to hand out id's via MQTT? I noticed that the clients without an id keep posting to MQTT... under node id 255...
/th
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
Hey there @Chaotic ! This is Fay from codebender.cc Thank you for using codebender! I just wanted to let you know that one of the sketches you are using in this comment has been deleted and so it is not available for users to view it. Let me know if you have any question.