Maarten,
That is really great, you could build your code for Raspberry!
I've run into reliability issue too. And my best guess is that reliability depends on transmission quality. You can verify if it is true by placing transmitter and switch as close as you can. It should work each and every time.
I found that it is quite hard to match selfmade antenna with these cheap transmitters and receivers. And even factory helical antenna (I've bought several from eBay) is not good as I thought it would be.
Maybe these keychain and full-sized remotes are better tuned, or there is something I don't know because I, too, think that Livolo protocol has pretty good timing tolerance (maybe even more than 20 usec). And, yes, I've a bit varied timings, but as switches behaved quite well, I left them with 500-100-300 usec (in first version I used crazy 550-110-303-290 usec).
I powered transmitters both with 5V and 9V, but haven't noticed siginificant difference. What's even more strange, sometimes there were more "misfires" with 9V than with 5V (light didn't come on/off when expected). Don't know the reason, but I think transmitter could slightly change waveform, although it must not. Can't remember for sure, but last hardware cofiguration could use 9V to power transmitter, and it is quite stable.
As for range, I didn't run any tests. All my switches are in range of approximately 2.5 meters from transmitter. And what could be important, transmitter is at about 2 m height.
Hope that helps and thank you for feedback!
Regards,
Sergey.