This document presents a ZigBee-based home automation system that integrates a ZigBee home automation network and a Wi-Fi network through a common home gateway. The home gateway provides network interoperability, a simple user interface, and remote access. It also implements a "virtual home" to handle security and safety needs by checking communications before allowing them on the real home automation system. The system was developed to address limitations of existing home automation systems such as complex/expensive architectures, intrusive installations, lack of interoperability, inflexible interfaces, and inadequate security/safety features. It aims to provide a low-cost, flexible system that allows additional devices to be added easily and securely.