You may want to try Jonathan's driver :
It features maintaining the state after an outage and energy reporting.