I wrote this
It works great for a Broadlink RM3 and you can just use it with a http get switch driver.