Text this: Energy management in homes and residential microgrids :