Have you tried the latest version of this custom driver with your Sonoff switch (which model exactly it is)?