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 -
Can not compile MySensors on esp8266
Troubleshooting • 24 Aug 2024, 15:35 • TheoL 29 Aug 2024, 20:47 -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
Extraneous info in Debug log
Troubleshooting • 28 Jun 2024, 22:42 • Gibber 28 Jun 2024, 22:42 -
Arduino nano and Uno in same My sensors network with NRF24L01+
Troubleshooting • 26 Jul 2024, 10:30 • DIY89 27 Aug 2024, 09:59