scripts for smart meter