In this paper, a smart HEMS architecture that considers both energy consumption and generation based on ZigBee and PLC based renewable energy gateway (REG), respectively. The home server gathers both the energy consumption data through
ZigBee and energy generation data through the REG. By taking into account both consumption and generation, the home server optimizes home energy use.