Two actuators / IR sender example
-
Hi,
I am building a simple remote on/off based on the IR sender example.
It uses a light switch to send IR commands (one command for on and one command for off)
Now I want to add a second switch as a new child, and send some other ir codes.
But I can understand how to the message is adressed to a child device? Can anyone point me inte the right direction.
"" if (message.type==V_LIGHT) {
int incomingRelayStatus = message.getInt();
if (incomingRelayStatus == 1) {
irsend.send(NEC, 0x1EE17887, 32); // Vol up yamaha ysp-900
} else {
irsend.send(NEC, 0x1EE1F807, 32); // Vol down yamaha ysp-900
}
// Start receiving ir again...
irrecv.enableIRIn();
} ""
-
Found the answer in this tread
https://forum.mysensors.org/topic/1086/getting-childid-from-incomingmessage/6
Will try this
if (message.type==V_LIGHT && message.sensor==3)
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Suddenly a Sensor is Missing, not the whole Node. (RPI Eth Gateway, HA)
Troubleshooting • 3 Jul 2024, 07:20 • se-O-matic 15 Jul 2024, 08:45 -
Forum Search not working?
Troubleshooting • 4 Oct 2023, 23:33 • Gibber 2 Sept 2024, 20:28 -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
Raspberry Pi 5: invalid GPIO 9
Troubleshooting • 27 Aug 2024, 13:20 • igo 27 Aug 2024, 13:20