## 1 Introduction
Smart cities are a system of multiple sources of energy generated by the users themselves, as well as grids, the main task of which is management and distribution [24]. In order to manage a smart grid, it must be divided into several decentralized microgrids. The decentralized microgrids will also improve transmission and distribution losses. About a quarter of all energy is lost on the way from the power plant to the consumer. The smaller the system, the shorter the distance between supply and demand and the fewer losses may occur during distribution. The grid itself will become a means of energy storage for anyone having the energy to feed into it. In addition, the decentralized systems are much more reliable and resilient. In case of outages, the system may use neighboring systems to serve as a backup. Large, centralized systems are dependent on one main system and must install several additional backup systems operated redundantly. Our goal globally is to reduce energy consumption in a way that significantly reduces the negative impact of our consumption on the environment and, thus, on nature (including ourselves). In order to achieve this fundamental goal, engineering and automation of integrated building systems have to be focused on. Logically, integrating and operating these buildings to reduce energy consumption is a top priority. It is possible to achieve this only by integrating the system and using the powerful technologies available today to ensure the facility's efficient operation. For this reason, these technologies can be used to create integrated systems. Combined with new technologies such as Cloud and IoT, more efficient buildings that use current technologies to reduce consumption can be created. Building automation is evolving to meet the need to reduce energy consumption. However, the building automation industry has continued to work hard to develop solutions addressing the construction market and reduction in the energy consumption of buildings. The end-user has started to ask about the interconnection of various systems to allow for a competitive choice of products and service providers. Open protocols have begun to become a common topic of discussion as users realize the power of integration. During this time, our world begins to see the impact of our energy consumption on the planet. However, we have continued to develop solutions that dramatically reduce our impact open protocols for fully integrated systems. This was the beginning of the BACnet(r) Project Standards Committee in 1987 (introduced as an ANS/ASHRAE standard in 1995) and the introduction of LonWorks(r) in 1990 by Echelon Corporation (submission and adoption of LonTalk(r) as an ANSI standard in 1999). The Internet of Things has opened up a whole new world of interconnectivity, enabling the use of smart mobile devices and apps for these complex systems. Web browsers, SaaS (Software as a Service), and mobile applications can be used to create a dynamic system where data storage capacities are virtually unlimited, and access and control are within reach. With all these options, the efficiency is greater than ever. However, success can only be achieved through successful integration. This led us to set another goal for our research: to analyze issues related to integration and protocols. In this case, it was confirmed that it was important to evaluate which devices could be integrated and which could not. The good news in these situations is that many manufacturers are now starting to create native or input devices allowing for various systems to be connected using open protocols. Some practical examples of the application of Internet communication to facilitate the process of technical equipment automation in buildings and their coordination within smart cities, where the main purpose is sustainable energy in the system of the energy performance of a building, will be shown.