IoT in energy grids