Thanks for this. I'm a wondering how you get the codes for the remote. I installed IRremoteESP8266 and got this out for one button.
Encoding : SONY
Code : 540C (15 bits)
Timing[31]:
+ 2462, - 520, + 1268, - 520, + 674, - 520, + 1268, - 520,
+ 672, - 520, + 1268, - 520, + 646, - 546, + 648, - 542,
+ 672, - 520, + 674, - 520, + 674, - 516, + 652, - 542,
+ 1268, - 520, + 1272, - 516, + 652, - 542, + 672
uint16_t rawData[31] = {2462, 520, 1268, 520, 674, 520, 1268, 520, 672, 520, 1268, 520, 646, 546, 648, 542, 672, 520, 674, 520, 674, 516, 652, 542, 1268, 520, 1272, 516, 652, 542, 672}; // SONY 540C
uint32_t address = 0x30;
uint32_t command = 0x15;
uint64_t data = 0x540C;
Using the 0x540C in the demo IRsend it works.
Everything I've tried on the sonoff doesn't switch on the device.
In the wiki is says "data is the data frame as 32 bit unsigned integer."
So i tried converting the numbers to integers but it still doesn't work.
Can you please point me in the right direction.
Regards
Paul