Code for smartgrid nodes.