Hi,
This is how I put my Apple TV (3rd Gen) to sleep, using ESP8266 IRremote library:
uint32_t rawZeroBit[3] = {8950, 2200, 600}; // raw ir command that emulates holding a button (after pressing the button)
irsend.sendNEC(0x77E1FAD6, 32); // play button cmd
delay(170);
long Start = millis();
while (millis() - Start < 6000) //hold for 5 seconds (3rd gen apple tv only, no way with 4th!)
{
irsend.sendRaw(rawZeroBit, 3, khz);// emulate holding the button (for all buttons)
delay(1);
}
Last edited by elfege on April 7, 2020 17:41.