Standby power takes 5-10 % of the residential electricity around the world. Some countries lose more than 14 % of the total electricity used in the residential sector. Hence, a new energysaving concept that could help to decrease the power losses is discussed in this paper. Firstly, the two power lines of infrastructure for continuously connected equipment and for standby devices is proposed for new smart buildings. Secondly, the segmented infrastructure with unified hardware
units is proposed for existing smart buildings (the new one can apply this principle as well). The contactors (i.e. unified hardware units) consist of the NodeMcu Lua ESP8266 WiFi IoT development board, ACS712T ELC-30A current sensor, and the Songle relay. The automatic mode is based on three steps: measurement of the current using ACS712T ELC-30A sensor in all segments except the root; switching off the relays with the current less than or equal to any number in the historical data; switching off the root contactor if all the descendent relays (i.e. contactors) are switched off. Second step represents the linear classification with sliding window in machine learning. The software consists of two parts, low-level Arduino sketches and high-level C# Windows form app. They are connected by MQTT broker Mosquitto. The proposed concept was successfully tested using a prototype with three segments, one of which includes smart lighting. The payback period is of approximately one month and a half for the whole-building switch concept.