For more than a century, the electricity grid has mostly worked in one direction.