IoT Applications for Meter Security and Energy Efficiency in Smart Grids