{"id":314751,"date":"2020-12-12T15:01:11","date_gmt":"2020-12-12T15:01:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=314751"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=314751","title":{"rendered":"\u041a\u0430\u043a \u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0441\u0432\u043e\u0439 \u0441\u0442\u043e\u043b \u0441 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b \u0432 \u0441\u0442\u043e\u043b \u0441 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c \u0432\u0435\u0449\u0435\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0441\u0432\u043e\u0439 \u0441\u0442\u043e\u043b \u0441 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b \u0441 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c \u0432\u0435\u0449\u0435\u0439. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u043e\u0442\u043e\u0440\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e IoT \u043a Google \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Heroku \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0432\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041f\u0435\u0440\u0432\u043e\u0435: \u0441\u0442\u043e\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437 Google Smart Home \u043a Heroku \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0438 \u0432\u0442\u043e\u0440\u043e\u0435: Heroku \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0442\u043e\u043b \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439 MQTT. MQTT \u2014 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0440\u0430\u0437\u0432\u043b\u0435\u0447\u044c\u0441\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043e\u043d\u0430 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442 \u0432\u0430\u043c \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/532688\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zf\/w1\/0u\/zfw10udcdoagpewft-zbgxuo22o.jpeg\"><\/div>\n<p><\/a><a name=\"habracut\"><\/a><i>\u0422\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u043e\u043b\u0438\u043a<\/i>  <\/p>\n<hr>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h2>\n<p><\/font><br \/>  \u041f\u0435\u0440\u0432\u0430\u044f \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441\u0430\u043c\u0430\u044f \u0442\u0440\u0443\u0434\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u2014 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u043e\u043b. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0443 \u0441\u0442\u043e\u043b\u0430 \u0431\u044b\u043b\u0430 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u0430\u044f \u0440\u0443\u0447\u043a\u0430, \u043e\u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0430\u0441\u044c \u0443 \u043a\u0440\u0430\u044f \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u044b. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043a \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044e \u0440\u0443\u0447\u043a\u0438, \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0441\u0442\u043e\u043b\u0430. \u042f \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043a \u0441\u0442\u043e\u043b\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043c\u043e\u0442\u043e\u0440, \u043d\u043e \u0431\u0435\u0437\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043d\u043e. \u0417\u0430\u0442\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f: \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u043e \u0434\u043b\u0438\u043d\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u043b \u0431\u044b \u0435\u0433\u043e \u043d\u043e\u0436\u043a\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0431\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0415\u0441\u043b\u0438 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a \u0441\u0442\u0435\u0440\u0436\u043d\u044e \u043f\u0440\u0438\u0432\u043e\u0434, \u0442\u043e\u0433\u0434\u0430 \u044f \u0441\u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043c\u0435\u043d\u044c \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u0440\u0436\u043d\u044f \u0438 \u043c\u043e\u0442\u043e\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0441\u043d\u0430\u0441\u0442\u0438\u0442\u044c \u0441\u0442\u043e\u043b \u043c\u043e\u0442\u043e\u0440\u043e\u043c, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u044f\u0441\u044c \u0432 \u0435\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0412\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430<\/h2>\n<p><\/font><br \/>  \u0417\u0430\u043a\u0430\u0437\u0430\u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u043e\u0434 \u0438 \u0440\u0435\u043c\u0435\u043d\u044c, \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0430 Amazon \u043c\u043e\u0442\u043e\u0440 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c. \u0418 \u2014 \u043e, \u0447\u0443\u0434\u043e! \u2014 \u044f \u043d\u0430\u0448\u0451\u043b \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439! \u0418\u043b\u0438 \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c\u2026 \u041a\u0443\u043f\u0438\u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a, \u043e\u043a\u043e\u043b\u043e \u043c\u0435\u0441\u044f\u0446\u0430 \u044f \u0436\u0434\u0430\u043b \u0435\u0433\u043e \u043f\u0440\u0438\u0431\u044b\u0442\u0438\u044f \u0438\u0437 \u041a\u0438\u0442\u0430\u044f. \u042f \u0431\u044b\u043b \u0442\u0430\u043a \u0432\u0437\u0432\u043e\u043b\u043d\u043e\u0432\u0430\u043d, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u0438\u0435\u0445\u0430\u043b! \u041d\u0435 \u043c\u043e\u0433 \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0451 \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0439 \u043c\u043e\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b.<\/p>\n<p>  \u0412\u0441\u0451 \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u042f \u043f\u0440\u043e\u0432\u0451\u043b \u0434\u0435\u043d\u044c, \u0432\u044b\u0440\u0435\u0437\u0430\u044f \u0434\u044b\u0440\u0443 \u0434\u043b\u044f \u0441\u0442\u0435\u0440\u0436\u043d\u044f \u0432 \u043c\u0435\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0448\u0438\u0432\u043a\u0435 \u0441\u0442\u043e\u043b\u0430. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0443\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043d\u044f\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b. \u0411\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u043d\u0446\u0443 \u0434\u043d\u044f \u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u0441\u0431\u043e\u0440\u043a\u0443 \u0441\u0442\u043e\u043b\u0430 \u0438 \u0431\u044b\u043b \u0433\u043e\u0442\u043e\u0432 \u0435\u0433\u043e \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u042f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a, \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u043e\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0438\u2026 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0437\u0436\u0435 \u043c\u043e\u0442\u043e\u0440 \u043d\u0430\u0447\u0430\u043b \u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438 \u0441\u043a\u0440\u0435\u0436\u0435\u0442\u0430\u0442\u044c \u0437\u0443\u0431\u0446\u0430\u043c\u0438 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0451\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043c\u043d\u044f. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u044f \u0438\u0437\u0432\u043b\u0451\u043a \u0434\u0432\u0430 \u0443\u0440\u043e\u043a\u0430: \u0440\u0435\u043c\u0435\u043d\u044c, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u0430 \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u00ab\u041c\u043e\u0442\u043e\u0440 \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c\u00bb \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u042f \u043c\u043e\u0433\u0443 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u0441\u0432\u0435\u0442\u0435\u00bb. \u0412\u0442\u043e\u0440\u043e\u0439 \u0443\u0440\u043e\u043a: \u043d\u0430\u0434\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u0430\u043b\u044c\u0446\u0430\u043c\u0438. \u041c\u043e\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u044b\u043c!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ub\/8d\/qs\/ub8dqs_98np92uc715mth3aoica.jpeg\"><\/p>\n<p>  \u0421\u043b\u0435\u0432\u0430 \u043d\u0430 \u0444\u043e\u0442\u043e \u043c\u043e\u0442\u043e\u0440 \u0438 \u0440\u0435\u043c\u0435\u043d\u044c. \u0412\u0432\u0435\u0440\u0445\u0443 \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0451\u043d\u043d\u044b\u0439 \u043a \u0441\u0442\u043e\u043b\u0443 \u043c\u043e\u0442\u043e\u0440 (\u043f\u043e\u0437\u0436\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u043c). \u0412\u043d\u0438\u0437\u0443 \u0441\u043f\u0440\u0430\u0432\u0430 \u043c\u043e\u0442\u043e\u0440 \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0441\u0442\u043e\u043b\u0435.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u041f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043c\u043e\u0442\u043e\u0440<\/h2>\n<p><\/font><br \/>  \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043c\u043e\u0442\u043e\u0440, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u044b. \u042f \u0431\u044b\u043b \u0443\u0434\u0438\u0432\u043b\u0451\u043d \u0442\u0435\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e.<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a26\/7b8\/5d1\/a267b85d12d6ebdd0b3a5c3fec351d54.svg\" alt=\"$T = F * r$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041a\u0440\u0443\u0442\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u044d\u0442\u043e \u0441\u0438\u043b\u0430, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u0443 \u043f\u043b\u0435\u0447\u0430 \u0440\u044b\u0447\u0430\u0433\u0430.<\/p>\n<p>  \u0427\u0442\u043e \u0436, \u043f\u043b\u0435\u0447\u043e \u0440\u044b\u0447\u0430\u0433\u0430 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e (\u044d\u0442\u043e \u0440\u0443\u043a\u043e\u044f\u0442\u043a\u0430 \u0441\u0442\u043e\u043b\u0430), \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0438\u043b\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0431\u044b \u043f\u043b\u0435\u0447\u043e \u0440\u044b\u0447\u0430\u0433\u0430. \u042f \u043d\u0430\u0433\u0440\u0443\u0437\u0438\u043b \u0441\u0442\u043e\u043b, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0432 \u043a \u0440\u0443\u0447\u043a\u0435 \u043a\u0443\u0432\u0448\u0438\u043d \u0434\u043b\u044f \u043c\u043e\u043b\u043e\u043a\u0430 \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0432 \u043a\u0443\u0432\u0448\u0438\u043d \u0432\u043e\u0434\u0443, \u043f\u043e\u043a\u0430 \u0440\u044b\u0447\u0430\u0433 \u043d\u0435 \u043d\u0430\u0447\u0430\u043b \u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0432 \u0440\u0443\u0447\u043a\u0443 \u043a\u0432\u0435\u0440\u0445\u0443 \u0441 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c \u043a\u0443\u0432\u0448\u0438\u043d\u043e\u043c \u044f \u0443\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u0432\u0435\u0441 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0443\u0447\u043a\u0443. \u042f \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043f\u043b\u0435\u0447\u0430 \u0440\u044b\u0447\u0430\u0433\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 11 \u0441\u043c, \u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0430\u044f \u0441\u0438\u043b\u0430 \u2014 4 \u0444\u0443\u043d\u0442\u0430. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u044d\u0442\u0438 \u0446\u0438\u0444\u0440\u044b \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443, \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u043c\u043e\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 19,95 \u043a\u0433\/\u0441\u043c. \u0418 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u043e\u043b \u043d\u0435\u043e\u0431\u0440\u0430\u0442\u0438\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041c\u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u0441\u0442\u043e\u043b\u0430 \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c \u043f\u043e\u043b\u044b\u0439. \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0434\u0432\u0443\u0445\u0432\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0442\u043e\u0440, \u044f \u043c\u043e\u0433 \u0440\u0430\u0437\u0440\u0435\u0437\u0430\u0442\u044c \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043c\u043e\u0442\u043e\u0440\u043e\u043c \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435. \u041a\u0443\u043f\u0438\u0432 \u0434\u0432\u0430 \u043c\u043e\u0442\u043e\u0440\u0430 \u0441 \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c 20 \u043a\u0433\/\u0441\u043c, \u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u0447\u0442\u043e \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0441\u0442\u043e\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>  \u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443 \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b \u0441\u0432\u043e\u0439 \u0441\u0442\u043e\u043b \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u0434\u043f\u0438\u043b\u0438\u0432 \u0432\u0430\u043b\u044b \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0441\u0442\u0435\u0440\u0436\u043d\u044f. \u042f \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u044b\u0440\u043e\u043a \u0432 \u043c\u0435\u0442\u0430\u043b\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0438\u0445 \u043c\u043e\u0442\u043e\u0440\u044b. \u0420\u0435\u043c\u043d\u044f \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0435 \u0431\u044b\u043b\u043e: \u043c\u043e\u0442\u043e\u0440\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e \u0441\u0442\u0435\u0440\u0436\u043d\u0435\u043c, \u0434\u044b\u0440\u044b \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438. \u041f\u043e\u043a\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u043b \u0432\u0435\u0447\u0435\u0440, \u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0442\u043e\u043b \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b \u0435\u0433\u043e \u043e\u0444\u0438\u0441\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wz\/ui\/pm\/wzuipm47toun7ik00q5alfkbd7c.jpeg\"><br \/>  <i>\u0414\u0432\u0430 \u0432\u0435\u0440\u0445\u043d\u0438\u0445 \u0444\u043e\u0442\u043e \u2014 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0442\u043e\u043b \u043c\u043e\u0442\u043e\u0440\u044b. \u0414\u0432\u0430 \u043d\u0438\u0436\u043d\u0438\u0445 \u0444\u043e\u0442\u043e \u2014- \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e \u0434\u043b\u0438\u043d\u0435 \u0441\u0442\u043e\u043b\u0430.<\/i><\/p>\n<p>  \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u043c\u043e\u0442\u043e\u0440\u044b \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b \u0438\u0445 \u0441 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0412\u043a\u043b\u044e\u0447\u0438\u0432 \u043f\u0438\u0442\u0430\u043d\u0438\u0435, \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0430! \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043c\u043e\u0442\u043e\u0440\u043e\u0432. \u042f \u0443\u0434\u0432\u043e\u0438\u043b \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439 \u0440\u0430\u0434\u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435 \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435!<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0442\u043e\u043b \u0431\u044b\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c. \u042f \u0441\u043d\u044f\u043b \u0432\u0438\u0434\u0435\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u043e\u043b, \u043d\u043e \u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c 5 \u043c\u0438\u043d\u0443\u0442, \u043a\u0430\u043a \u0441\u0442\u043e\u043b \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u044b.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u041e\u0431\u043e\u0440\u043e\u0442\u044b \u0432\u0430\u0436\u043d\u044b. \u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/h2>\n<p><\/font><br \/>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0432\u0441\u0451 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0434\u0432\u0443\u043c \u0432\u0435\u0449\u0430\u043c: \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0438 \u043e\u0431\u043e\u0440\u043e\u0442\u0430\u043c. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u043e\u0442\u043e\u0440 \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u043e\u0440\u043e\u0442\u043e\u0432 \u043f\u0440\u0438 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435.<\/p>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e. \u0425\u043e\u0442\u044f \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u0434\u0432\u0443\u0445\u0432\u0430\u043b\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0442\u043e\u0440\u0430, \u0437\u0430\u0442\u043e \u043d\u0430\u0448\u0451\u043b <a href=\"https:\/\/www.ebay.com\/itm\/90-Right-Angle-Gearbox-Speed-Reducer-Transmission-Ratio-1-1-Shaft-8mm-DIY-Part\/383629813206?ssPageName=STRK%3AMEBIDX%3AIT&amp;var=652041748087&amp;_trksid=p2060353.m2749.l2649\">\u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0442\u043e\u0440 \u0441 \u043e\u0434\u043d\u0438\u043c \u0432\u0430\u043b\u043e\u043c \u0432 \u0434\u0432\u0443\u0445\u0432\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0442\u043e\u0440.<\/p>\n<p>  \u041a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446 \u0431\u044b\u043b \u043c\u0435\u0441\u044f\u0446\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447 \u0438\u0437 \u041a\u0438\u0442\u0430\u044f, \u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u043b\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0441\u0443\u0431\u0431\u043e\u0442\u043e\u0439 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u0441\u0442\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0432\u0438\u0433\u0430\u043b\u0441\u044f \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qr\/vd\/xm\/qrvdxm7noif-chgmiet3en4snh8.jpeg\"><br \/>  <i>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u0442\u043e\u0440 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u043b\u0435\u0432\u0430, \u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u2014 \u0441\u043f\u0440\u0430\u0432\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f.<\/i><\/p>\n<p>  \u042f \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0435\u043c \u0441\u0442\u043e\u043b\u0435, \u043b\u0435\u0436\u0430\u0449\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0430 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u044f \u043c\u0435\u043d\u044f\u043b \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0430. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435\u043b\u0430\u043b\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0438\u043c\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u0432\u044b\u0441\u043e\u0442\u044b.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>Bluetooth<\/h2>\n<p><\/font><br \/>  \u041f\u0435\u0440\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0441\u0442\u043e\u043b\u0443 Bluetooth. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0434\u043e\u043c\u0435 \u0438\u043c\u0435\u0435\u0442 Nluetooth, \u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043c\u043e\u0435\u043c\u0443 \u0441\u0442\u043e\u043b\u0443.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u043f\u043b\u0430\u0442\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043c\u043e\u0442\u043e\u0440\u0430, \u043f\u043b\u0430\u0442\u0443 \u0434\u043b\u044f Bluetooth Nordic NRF52, \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u043d\u0430\u0447\u0430\u043b \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0444\u0442 \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434: \u044f \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f: ESP32 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C++ \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Arduino \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c BLE Terminal \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 BLE \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0441\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 BLE. \u0414\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0435, \u043a\u0430\u043a \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435. BLE \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c UUID, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u041a\u043e\u0433\u0434\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0432\u0430\u0448\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u0441\u0442\u043e\u043b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0434\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u044b\u0441\u043e\u0442\u044b \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u043d\u0438\u0436\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u043d\u0441\u043e\u0440 TFMini-S LiDAR. \u042d\u0442\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0439 \u0441\u0435\u043d\u0441\u043e\u0440: \u043e\u043d \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f LiDAR, \u0445\u043e\u0442\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043b\u0430\u0437\u0435\u0440. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u043f\u0442\u0438\u043a\u0443 \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u0451\u0442\u0430 \u0418\u041a-\u0438\u0437\u043b\u0443\u0447\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0441\u0435\u043d\u0441\u043e\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0442\u043e\u043b\u0430. \u0417\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u043e\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0438\u0436\u0435, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b <a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-ble\/blob\/master\/src\/main.cpp?ref=hackernoon.com\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"cpp\">void setup() {    Serial.begin(115200);    Serial2.begin(TFMINIS_BAUDRATE);    EEPROM.begin(3); \/\/ used for saving the height presets between reboots     tfminis.begin(&amp;Serial2);    tfminis.setFrameRate(0);     ledcSetup(UP_PWM_CHANNEL, PWM_FREQUENCY, PWM_RESOLUTION);    ledcAttachPin(UP_PWM_PIN, UP_PWM_CHANNEL);     ledcSetup(DOWN_PWM_CHANNEL, PWM_FREQUENCY, PWM_RESOLUTION);    ledcAttachPin(DOWN_PWM_PIN, DOWN_PWM_CHANNEL);     state_machine = new StateMachine();    state_machine-&gt;begin(*t_desk_height, UP_PWM_CHANNEL, DOWN_PWM_CHANNEL);     BLEDevice::init(&quot;ESP32_Desk&quot;);   ...     BLEServer *p_server = BLEDevice::createServer();    BLEService *p_service = p_server-&gt;createService(BLEUUID(SERVICE_UUID), 20);     \/* ------------------- SET HEIGHT TO PRESET CHARACTERISTIC -------------------------------------- *\/    BLECharacteristic *p_set_height_to_preset_characteristic = p_service-&gt;createCharacteristic(...);    p_set_height_to_preset_characteristic-&gt;setCallbacks(new SetHeightToPresetCallbacks());    \/* ------------------- MOVE DESK UP CHARACTERISTIC ---------------------------------------------- *\/    BLECharacteristic *p_move_desk_up_characteristic = p_service-&gt;createCharacteristic(...);    p_move_desk_up_characteristic-&gt;setCallbacks(new MoveDeskUpCallbacks());    \/* ------------------- MOVE DESK UP CHARACTERISTIC ---------------------------------------------- *\/    BLECharacteristic *p_move_desk_down_characteristic = p_service-&gt;createCharacteristic(...);    p_move_desk_down_characteristic-&gt;setCallbacks(new MoveDeskDownCallbacks());    \/* ------------------- GET\/SET HEIGHT 1 CHARACTERISTIC ------------------------------------------ *\/    BLECharacteristic *p_get_height_1_characteristic = p_service-&gt;createCharacteristic(...);    p_get_height_1_characteristic-&gt;setValue(state_machine-&gt;getHeightPreset1(), 1);    BLECharacteristic *p_save_current_height_as_height_1_characteristic = p_service-&gt;createCharacteristic(...);    p_save_current_height_as_height_1_characteristic-&gt;setCallbacks(new SaveCurrentHeightAsHeight1Callbacks());    \/* ------------------- GET\/SET HEIGHT 2 CHARACTERISTIC ------------------------------------------ *\/   ...    \/* ------------------- GET\/SET HEIGHT 3 CHARACTERISTIC ------------------------------------------ *\/   ...    \/* ------------------- END CHARACTERISTIC DEFINITIONS ------------------------------------------ *\/    p_service-&gt;start();     BLEAdvertising *p_advertising = p_server-&gt;getAdvertising();    p_advertising-&gt;start();     xTaskCreate(        updateDeskHeight,     \/\/ Function that should be called        &quot;Update Desk Height&quot;, \/\/ Name of the task (for debugging)        1024,                 \/\/ Stack size        NULL,                 \/\/ Parameter to pass        5,                    \/\/ Task priority        NULL                  \/\/ Task handle    ); }<\/code><\/pre>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b BLE \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0443\u0447\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0441\u0435\u0442\u0430 \u0438, \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u043e\u043b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435.<\/p>\n<p>  \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u044b\u0441\u043e\u0442\u044b \u0441\u0442\u043e\u043b\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438 \u2014 \u043c\u0430\u0448\u0438\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u043e\u043b\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u044b\u0441\u043e\u0442\u0430, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u0441\u0442\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0451, \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b. \u042f \u043c\u043e\u0433 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 \u043f\u0440\u0435\u0441\u0435\u0442\u044b \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0432\u044b\u0441\u043e\u0442\u044b \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b \u0432 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b <a href=\"https:\/\/apps.apple.com\/us\/app\/ble-terminal-bluetooth-tools\/id1511543453?ref=hackernoon.com\">BLE Terminal<\/a> \u043d\u0430 \u043c\u043e\u0451\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u0430\u043a \u044f \u043c\u043e\u0433 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435 \u043c\u043e\u0435\u043c\u0443 \u0441\u0442\u043e\u043b\u0443 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044e. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u043e \u044f \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0431\u0438\u0442\u0432\u0430 \u0441 BLE \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/my\/lr\/_t\/mylr_twhohxlnphgctllnvedvem.jpeg\"><br \/>  <i>\u0413\u043e\u043b\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bluetooth\u2026 \u0412\u0441\u0451, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u2014 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 iOS\u2026<\/i><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u044f \u0436\u0435\u043d\u0430 \u0441\u043a\u0430\u0437\u0430\u043b\u0430 \u043a\u043e\u0435-\u0447\u0442\u043e, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442: \u00ab\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0432\u043e\u0438\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u043c?\u00bb.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043a\u0440\u0443\u0442\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a \u0441\u043f\u0438\u0441\u043a\u0443 Google Assistant \u043e\u0442\u043f\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 iOS, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0442\u043e\u043b\u043e\u043c. \u0418 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443. \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043f\u043e\u0431\u0435\u0434\u0430!<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439<\/h2>\n<p><\/font><br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0435 \u0441\u0442\u043e\u043b\u0430 \u0434\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Google Smart Home \u0438 \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u0441 Wi-Fi.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c Wi-Fi \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u042f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 Nordic NRF52 \u043d\u0430 ESP32 \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c WiFi. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043e\u0444\u0442\u0430 \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C++, \u0430 \u043e\u0431\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/platform.io\/\">Platform.IO<\/a> \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Arduino, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <a href=\"https:\/\/github.com\/bloveless\/tfmini-s?ref=hackernoon.com\">tfmini-s<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043c\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u044b\u0441\u043e\u0442\u044b \u0441\u0442\u043e\u043b\u0430.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0442\u043e\u043b\u0430 \u0441 Google Smart Home. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u043d\u043e\u0439 \u0438 \u0413\u0443\u0433\u043b\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hx\/9t\/b8\/hx9tb83tx9e1_xufc0q06nldrcs.jpeg\"><\/p>\n<p>  \u0418\u0442\u0430\u043a, Bluetooth \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0451\u043d. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Google Smart Home. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0434\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/developers.google.com\/assistant\/smarthome\/develop\/create?ref=hackernoon.com\">Smart Home Actions<\/a>. \u0412 \u0435\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440 OAuth2, \u0430 \u043d\u0435 \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OAuth2 Node.js Express, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043e Heroku \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u0435\u0436\u0434\u0443 Google \u0438 \u043c\u043e\u0438\u043c \u0441\u0442\u043e\u043b\u043e\u043c.<\/p>\n<p>  \u041c\u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e: \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041f\u0435\u0440\u0432\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u2014 node-oauth2-server, \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 <a href=\"https:\/\/oauth2-server.readthedocs.io\/en\/latest\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0412\u0442\u043e\u0440\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 express-oauth-server \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Express \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 <a href=\"https:\/\/github.com\/oauthjs\/express-oauth-server\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"javascript\">const { Pool } = require(&quot;pg&quot;); const crypto = require(&quot;crypto&quot;); const pool = new Pool({    connectionString: process.env.DATABASE_URL });  module.exports.pool = pool; module.exports.getAccessToken = (bearerToken) =&gt; {...}; module.exports.getClient = (clientId, clientSecret) =&gt; {...}; module.exports.getRefreshToken = (bearerToken) =&gt; {...}; module.exports.getUser = (email, password) =&gt; {...}; module.exports.getUserFromAccessToken = (token) =&gt; {...}; module.exports.getDevicesFromUserId = (userId) =&gt; {...}; module.exports.getDevicesByUserIdAndIds = (userId, deviceIds) =&gt; {...}; module.exports.setDeviceHeight = (userId, deviceId, newCurrentHeight) =&gt; {...}; module.exports.createUser = (email, password) =&gt; {...}; module.exports.saveToken = (token, client, user) =&gt; {...}; module.exports.saveAuthorizationCode = (code, client, user) =&gt; {...}; module.exports.getAuthorizationCode = (code) =&gt; {...}; module.exports.revokeAuthorizationCode = (code) =&gt; {...}; module.exports.revokeToken = (code) =&gt; {...}; <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Express. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 OAuth, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0437\u0434\u0435\u0441\u044c.<\/p>\n<pre><code class=\"javascript\">const express = require(&quot;express&quot;); const OAuth2Server = require(&quot;express-oauth-server&quot;); const bodyParser = require(&quot;body-parser&quot;); const cookieParser = require(&quot;cookie-parser&quot;); const flash = require(&quot;express-flash-2&quot;); const session = require(&quot;express-session&quot;); const pgSession = require(&quot;connect-pg-simple&quot;)(session); const morgan = require(&quot;morgan&quot;);  const { google_actions_app } = require(&quot;.\/google_actions&quot;); const model = require(&quot;.\/model&quot;); const { getVariablesForAuthorization, getQueryStringForLogin } = require(&quot;.\/util&quot;); const port = process.env.PORT || 3000;  \/\/ Create an Express application. const app = express(); app.set(&quot;view engine&quot;, &quot;pug&quot;); app.use(morgan(&quot;dev&quot;));  \/\/ Add OAuth server. app.oauth = new OAuth2Server({    model,    debug: true, });  \/\/ Add body parser. app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.use(express.static(&quot;public&quot;));  \/\/ initialize cookie-parser to allow us access the cookies stored in the browser. app.use(cookieParser(process.env.APP_KEY));  \/\/ initialize express-session to allow us track the logged-in user across sessions. app.use(session({...}));  app.use(flash());  \/\/ This middleware will check if user's cookie is still saved in browser and user is not set, then automatically log the user out. \/\/ This usually happens when you stop your express server after login, your cookie still remains saved in the browser. app.use((req, res, next) =&gt; {...});  \/\/ Post token. app.post(&quot;\/oauth\/token&quot;, app.oauth.token());  \/\/ Get authorization. app.get(&quot;\/oauth\/authorize&quot;, (req, res, next) =&gt; {...}, app.oauth.authorize({...}));  \/\/ Post authorization. app.post(&quot;\/oauth\/authorize&quot;, function (req, res) {...}); app.get(&quot;\/log-in&quot;, (req, res) =&gt; {...}); app.post(&quot;\/log-in&quot;, async (req, res) =&gt; {...}); app.get(&quot;\/log-out&quot;, (req, res) =&gt; {...}); app.get(&quot;\/sign-up&quot;, async (req, res) =&gt; {...}); app.post(&quot;\/sign-up&quot;, async (req, res) =&gt; {...}); app.post(&quot;\/gaction\/fulfillment&quot;, app.oauth.authenticate(), google_actions_app); app.get('\/healthz', ((req, res) =&gt; {...})); app.listen(port, () =&gt; {    console.log(`Example app listening at port ${port}`); });<\/code><\/pre>\n<p>  \u041a\u043e\u0434\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0414\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 OAuth2, \u2014 \u044d\u0442\u043e \/oauth\/token \u0438 \/oauth\/authorize. \u041e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u0435\u043a\u0448\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 Google. \u0412\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \/gaction\/fulfillment \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 <code>google_actions_app<\/code>.<\/p>\n<p>  Google \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 Google, \u0430 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043b\u0435\u0436\u0438\u0442 \u0437\u0434\u0435\u0441\u044c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \/healthz, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \/gaction\/fulfillment \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u041f\u041e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c app.oauth.authenticate(), \u0442\u044f\u0436\u0451\u043b\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 OAuth2 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u041f\u041e. \u041e\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0442\u043e\u043a\u0435\u043d-\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c Google, \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043d\u0435 \u0438\u0441\u0442\u0451\u043a. \u0414\u0430\u043b\u0435\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0432\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 <code>google_actions_app<\/code>. <\/p>\n<p>  Google \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0443\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 Google, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c <a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-server\/blob\/main\/google_actions.js\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"javascript\">const { smarthome } = require('actions-on-google'); const mqtt = require('mqtt'); const mqtt_client = mqtt.connect(process.env.CLOUDMQTT_URL);  const model = require('.\/model'); const { getTokenFromHeader } = require('.\/util');  mqtt_client.on('connect', () =&gt; {    console.log('Connected to mqtt'); });  const updateHeight = {    &quot;preset one&quot;: (deviceId) =&gt; {        mqtt_client.publish(`\/esp32_iot_desk\/${deviceId}\/command`, &quot;1&quot;);    },    &quot;preset two&quot;: (deviceId) =&gt; {        mqtt_client.publish(`\/esp32_iot_desk\/${deviceId}\/command`, &quot;2&quot;);    },    &quot;preset three&quot;: (deviceId) =&gt; {        mqtt_client.publish(`\/esp32_iot_desk\/${deviceId}\/command`, &quot;3&quot;);    }, };  const google_actions_app = smarthome({...}); google_actions_app.onSync(async (body, headers) =&gt; {...}); google_actions_app.onQuery(async (body, headers) =&gt; {...}); google_actions_app.onExecute(async (body, headers) =&gt; {...}); module.exports = { google_actions_app };<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Google, Google \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e. \u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441: Google \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 Google \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Smart Home, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e Google \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u0430\u0448\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u2014 \u0437\u0430\u043f\u0440\u043e\u0441 \u044d\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Google \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0432\u0430\u0448\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u00ab\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u00bb (trait) \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Google Smart Home<\/h2>\n<p><\/font><br \/>  Google \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432 Google, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438: ColorSetting, Modes, OnOff, and StartStop. \u041c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u0437\u0436\u0435 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0440\u0435\u0436\u0438\u043c\u044b.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0440\u0435\u0436\u0438\u043c\u0430\u0445 \u043a\u0430\u043a \u043e \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u0433\u0434\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438\u0437 N \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u043b\u0438, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u0441\u043e\u0442\u044b. \u042f \u043d\u0430\u0437\u0432\u0430\u043b \u0441\u0432\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u00ab\u0432\u044b\u0441\u043e\u0442\u0430\u00bb, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u00ab\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0434\u0438\u043d\u00bb, \u00ab\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u0432\u0430\u00bb \u0438 \u00ab\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0440\u0438\u00bb. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u0441\u0442\u043e\u043b\u043e\u043c, \u0433\u043e\u0432\u043e\u0440\u044f: \u00ab\u042d\u0439, Google, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0432\u044b\u0441\u043e\u0442\u0443 \u043c\u043e\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043e\u0434\u0438\u043d\u00bb, \u2014 \u0438 Google \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432 \u043c\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Google <a href=\"https:\/\/developers.google.com\/assistant\/smarthome\/traits\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u041f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0434\u0435\u043b\u0435<\/h2>\n<p><\/font><br \/>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, Google Smart Home \u0438 \u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430\u0447\u0430\u043b\u0438 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Express \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"https:\/\/ngrok.com\/\">ngrok<\/a>. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f Google \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0417\u043d\u0430\u0447\u0438\u0442, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\/?ref=hackernoon.com\">Heroku<\/a> \u2014 \u044d\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a PaaS, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u041e\u0434\u043d\u043e \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 Heroku \u2014 \u0440\u0435\u0436\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439. \u0421 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c CloudMQTT \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 Postgres \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Heroku \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f. Heroku \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\/\u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0432\u0430\u0441. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u043e <a href=\"https:\/\/devcenter.heroku.com\/articles\/buildpacks?ref=hackernoon.com\">Heroku Buildpacks<\/a>. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u043a\u043e\u0434 \u0432 git remote Heroku, \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u043e\u0438 \u043f\u0430\u043a\u0435\u0442\u044b, \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u00abgit push heroku main\u00bb.<\/p>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u043a\u043e\u0432 CloudMQTT \u0438 Postgres \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043c\u043e\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0438 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u043c\u043e\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. Heroku \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u0435\u043d\u0435\u0433. \u041e\u0434\u043d\u0430\u043a\u043e CloudMQTT \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430 $5 \u0432 \u043c\u0435\u0441\u044f\u0446.<\/p>\n<p>  \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 Postgres \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043d\u043e CloudMQTT \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0418\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432 \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c. \u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h2>\n<p><\/font><br \/>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439. \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 \u0432 \u043c\u043e\u0435\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Heroku Express \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043c\u043e\u0451 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441. \u042d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u043e\u0442 \u043c\u0435\u043d\u044f \u0438\u043c\u0435\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f ESP32. ESP32 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e\u0442 Heroku. \u042d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432 \u0434\u0435\u043d\u044c.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u0434\u044b\u0440\u043e\u043a\u043e\u043b\u00bb. \u0421 \u043d\u0438\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u043e\u0432. \u0412\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u043e\u0440\u0442. \u0417\u0430\u0442\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u043e\u0440\u0442 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u043e\u0440\u0442. \u041f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c: \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u043e \u043d\u0451\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u00ab\u0434\u044b\u0440\u043e\u043a\u043e\u043b\u0430\u00bb \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e\u0435, \u0438 \u044f \u043d\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435. \u0412\u043e\u0442 \u0434\u0432\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u00ab\u0434\u044b\u0440\u043e\u043a\u043e\u043b\u00bb: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hole_punching_(net)?ref=hackernoon.com\">\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f<\/a> \u0438 <a href=\"https:\/\/bford.info\/pub\/net\/p2pnat\/?ref=hackernoon.com\">\u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 MIT, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0411\u0440\u0430\u0439\u0430\u043d\u043e\u043c \u0424\u043e\u0440\u0434\u043e\u043c \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438<\/a>.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0418\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432 \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437 IoT<\/h2>\n<p><\/font><br \/>  \u042f \u043d\u0435 \u0431\u044b\u043b \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438. \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0441\u043c\u0430\u0440\u0442-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 \u0434\u043e\u043c, \u0438 \u043c\u043d\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u043e\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0431\u0438\u0432\u043a\u0430 \u0434\u044b\u0440 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0447\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u044f \u0438\u0449\u0443, \u0438 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439 P2P. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b MQTT \u0438 \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f IoT. \u041e\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u043d\u0438\u0437\u043a\u043e\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c, \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u043e\u0432. MQTT \u2014 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0442\u0438\u043f\u0430 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\/\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u043e\u043b \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430, \u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Heroku \u2014 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Google \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 Heroku, \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u043b\u0438 \u0440\u0435\u0436\u0438\u043c. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Heroku \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 CloudMQTT, \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e\u043c \u043a\u0430\u043a \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0430 Heroku, \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u043b\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0442\u043e\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u043f\u0438\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c Heroku, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0442\u043e\u043b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c! \u0412 \u0444\u0430\u0439\u043b\u0435 googleactionsapp \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f updateHeight, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u043d\u043e\u043c\u0435\u0440 \u0432 \u0442\u043e\u043f\u0438\u043a\u0435 MQTT \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Heroku \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u0432 MQTT \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u0451 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 ESP32 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0430. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u0442\u043e\u043b\u0430 \u043d\u0438\u0436\u0435, \u0430 \u0432\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f <a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-mqtt\/blob\/master\/src\/main.cpp\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<pre><code class=\"cpp\">void setup() {  Serial.begin(115200); ...  tfminis.begin(&amp;Serial2);  tfminis.setFrameRate(0);  ...   state_machine = new StateMachine();  state_machine-&gt;begin(*t_desk_height, UP_PWM_CHANNEL, DOWN_PWM_CHANNEL);   setup_wifi();   client.setServer(MQTT_SERVER_DOMAIN, MQTT_SERVER_PORT);  client.setCallback(callback); ... }<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u043e\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f, \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 TFMini-S \u2014 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0442\u043e\u043b\u0430. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0447\u0435\u0440\u0435\u0437 MQTT, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0441\u0442\u043e\u043b\u0430, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0442\u0438 Wi-Fi, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 MQTT \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u043e \u0442\u0435\u043c\u0435 MQTT, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u044b. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">void callback(char *topic, byte *message, unsigned int length) {  ...   String messageTemp;   for (int i = 0; i &lt; length; i++)  {    messageTemp += (char)message[i];  }   if (messageTemp == &quot;1&quot;) {    state_machine-&gt;requestStateChange(ADJUST_TO_PRESET_1_HEIGHT_STATE);  }   if (messageTemp == &quot;2&quot;) {    state_machine-&gt;requestStateChange(ADJUST_TO_PRESET_2_HEIGHT_STATE);  }   if (messageTemp == &quot;3&quot;) {    state_machine-&gt;requestStateChange(ADJUST_TO_PRESET_3_HEIGHT_STATE);  } ... }<\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0432 \u0442\u0435\u043c\u0435 MQTT. \u0417\u0430\u0442\u0435\u043c \u043e\u043d \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cpp\">void loop() {  if (!client.connected())  {    reconnect();  }  client.loop();  state_machine-&gt;processCurrentState(); }<\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0438\u043a\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447: \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 MQTT, \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d. \u0417\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u043f\u0438\u043a MQTT. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u0434 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044f \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u0443 \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0435 \u0432 \u0442\u043e\u043f\u0438\u043a\u0435 MQTT.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451! \u0421\u0442\u043e\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u043c \u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 Google \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434!<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438<\/h2>\n<p><\/font><br \/>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b, \u2014 \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \/ healthz. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Google \u043e\u0436\u0438\u0434\u0430\u0435\u0442, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430, \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Heroku \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0441\u043b\u0443\u0436\u0431\u0443 ping \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \/healthz \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0436\u0431\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0439 \u0438 \u0431\u044b\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435, \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0447\u0430\u0441\u044b \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e: \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u043d\u0430 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0437\u0430 7 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\/pricing?ref=hackernoon.com\">\u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d Heroku\u2019s Hobby<\/a> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 IoT \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435. \u042f \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u0441\u0445\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0441\u0435\u0440\u0432\u0435\u0440 MQTT, \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0435\u0440\u0432\u0435\u0440 Express OAuth2 \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Google Smart Home \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u0431\u044b\u043b\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c\u0438, \u043d\u043e \u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0433\u043e \u0434\u043e\u0431\u0438\u043b\u0441\u044f! \u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 MQTT, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Express OAuth2 \u0438 Google Smart Home Actions \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0423\u043c\u043d\u044b\u0435 \u0434\u043e\u043c\u0430 \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0438 \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0435\u043f\u0435\u0440\u0442\u0443\u0430\u0440 IoT-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0432\u043a\u043b\u044e\u0447\u0438\u0432 \u0432 \u043d\u0435\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0438, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u043c\u043e\u0435\u0433\u043e \u0434\u043e\u043c\u0430 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0449\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 MQTT. \u0414\u0430\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u043e\u0447\u0432\u044b, \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0441\u0432\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <font color=\"#09b744\"><\/p>\n<h2>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h2>\n<p><\/font><br \/>  \u0412\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u043e\u043b\u0435\u0448\u043d\u0438\u0446\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043d\u0430\u0434\u0451\u0436\u043d\u043e. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432 \u0446\u0435\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u0438\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f TFMini-S. \u0417\u0430\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0432\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u043e\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043d\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0435 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0435. \u042f \u0437\u0430\u043a\u0430\u0437\u0430\u043b \u0434\u0430\u0442\u0447\u0438\u043a \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431\u043e\u0440\u043e\u0442\u044b \u0441\u0442\u0435\u0440\u0436\u043d\u044f, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u043b. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u043c\u043d\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u0435\u0435 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043d\u044f. \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e \u0432 \u043f\u043e\u0434\u0432\u0430\u043b\u0435. \u041d\u0430 \u043d\u0451\u043c \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 Mosquitto MQTT, <a href=\"https:\/\/nodered.org\/?ref=hackernoon.com\">Node-RED<\/a> \u0438 Express-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OAuth2, \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0443 \u0445\u043e\u0441\u0442\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0430\u043c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0430 \u043b\u0435\u0436\u0438\u0442 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043c\u043e\u0451\u043c \u0441\u0442\u043e\u043b\u0435. \u042f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e!<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e! \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u044e \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li><a href=\"https:\/\/www.sensorsone.com\/force-and-length-to-torque-calculator\/?ref=hackernoon.com\">Torque Calculator<\/a>  <\/li>\n<li><a href=\"https:\/\/www.ebay.com\/itm\/90-Right-Angle-Gearbox-Speed-Reducer-Transmission-Ratio-1-1-Shaft-8mm-DIY-Part\/383629813206?ssPageName=STRK%3AMEBIDX%3AIT&amp;var=652041748087&amp;_trksid=p2060353.m2749.l2649&amp;ref=hackernoon.com\">90 degree right angle gear box<\/a>  <\/li>\n<li><a href=\"https:\/\/apps.apple.com\/us\/app\/ble-terminal-bluetooth-tools\/id1511543453?ref=hackernoon.com\">BLE Terminal<\/a>  <\/li>\n<li><a href=\"http:\/\/platform.io\/?ref=hackernoon.com\">Platform.IO<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/bloveless\/tfmini-s?ref=hackernoon.com\">TFMini-S Arduino Driver<\/a>  <\/li>\n<li><a href=\"https:\/\/developers.google.com\/assistant\/smarthome\/develop\/create?ref=hackernoon.com\">Google Smart Home Actions<\/a>  <\/li>\n<li><a href=\"https:\/\/oauth2-server.readthedocs.io\/en\/latest\/?ref=hackernoon.com\">Node OAuth2 Server<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/oauthjs\/express-oauth-server?ref=hackernoon.com\">Express OAuth2 Server<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-server\/blob\/main\/model.js?ref=hackernoon.com\">ESP32 IoT Desk Server model.js<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-server\/blob\/main\/index.js?ref=hackernoon.com\">ESP32 IoT Desk Server index.js<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-server\/blob\/main\/google_actions.js?ref=hackernoon.com\">ESP32 IoT Desk Server google_actions.js<\/a>  <\/li>\n<li><a href=\"https:\/\/developers.google.com\/assistant\/smarthome\/traits?ref=hackernoon.com\">Google Smart Home Device Traits<\/a>  <\/li>\n<li><a href=\"https:\/\/ngrok.com\/?ref=hackernoon.com\">NGROK<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/bloveless\/esp32-iot-desk-mqtt\/blob\/master\/src\/main.cpp?ref=hackernoon.com\">ESP32 IoT Desk Firmware<\/a>  <\/li>\n<li><a href=\"https:\/\/nodered.org\/?ref=hackernoon.com\">Node-RED<\/a>  <\/li>\n<li><a href=\"https:\/\/www.heroku.com\/?ref=hackernoon.com\">Heroku<\/a>  <\/li>\n<li><a href=\"https:\/\/www.heroku.com\/pricing?ref=hackernoon.com\">Heroku Hobby Plan<\/a>  <\/li>\n<li><a href=\"https:\/\/devcenter.heroku.com\/articles\/buildpacks?ref=hackernoon.com\">Heroku Buildpacks<\/a>  <\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Hole_punching_(networking)?ref=hackernoon.com\">Wikipedia Hole Punching<\/a>  <\/li>\n<li><a href=\"https:\/\/pdos.csail.mit.edu\/papers\/p2pnat.pdf?ref=hackernoon.com\">MIT Paper on Hole Punching by Bryan Ford et al.<\/a>  <\/li>\n<\/ul>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <a href=\"https:\/\/skillfactory.ru\/?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_banner&amp;utm_term=regular&amp;utm_content=habr_banner\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/rn\/9d\/vvrn9dj4mojbpnjalnychbqpogw.png\" alt=\"image\"><\/div>\n<p><\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/cplus?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_CPLUS&amp;utm_term=regular&amp;utm_content=121220\">C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">E\u0449\u0435 \u043a\u0443\u0440\u0441\u044b<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/dstpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DSPR&amp;utm_term=regular&amp;utm_content=121220\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0438 Data Science<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/dataanalystpro?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DAPR&amp;utm_term=regular&amp;utm_content=121220\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0438 Data Analyst<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/cybersecurity?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_HACKER&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u042d\u0442\u0438\u0447\u043d\u044b\u0439 \u0445\u0430\u043a\u0435\u0440<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/frontend?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_FR&amp;utm_term=regular&amp;utm_content=121220\">Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_WEBDEV&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_PWS&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/ml-and-dl?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MLDL&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u043a\u0443\u0440\u0441 \u00abMachine Learning Pro + Deep Learning\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/ml-programma-machine-learning-online?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_ML&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u043f\u043e Machine Learning<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/math_and_ml?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_MATML&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438 Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/game-dev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_GAMEDEV&amp;utm_term=regular&amp;utm_content=121220\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430 Unity<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/javascript?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_FJS&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u043f\u043e JavaScript<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/java?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_JAVA&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/analytics?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_SDA&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/devops?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_DEVOPS&amp;utm_term=regular&amp;utm_content=121220\">\u041a\u0443\u0440\u0441 \u043f\u043e DevOps<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/iosdev?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_IOSDEV&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441 \u043d\u0443\u043b\u044f<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/android?utm_source=infopartners&amp;utm_medium=habr&amp;utm_campaign=habr_ANDR&amp;utm_term=regular&amp;utm_content=121220\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441 \u043d\u0443\u043b\u044f<\/a><\/li>\n<\/ul>\n<p>  <\/div>\n<\/p><\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/532688\/\"> https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/532688\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b \u0441\u0432\u043e\u0439 \u0441\u0442\u043e\u043b \u0441 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b \u0441 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c \u0432\u0435\u0449\u0435\u0439. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u043e\u0442\u043e\u0440\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e IoT \u043a Google \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Heroku \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0432\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041f\u0435\u0440\u0432\u043e\u0435: \u0441\u0442\u043e\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437 Google Smart Home \u043a Heroku \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0438 \u0432\u0442\u043e\u0440\u043e\u0435: Heroku \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0442\u043e\u043b \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439 MQTT. MQTT \u2014 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0432\u0435\u0449\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0440\u0430\u0437\u0432\u043b\u0435\u0447\u044c\u0441\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043e\u043d\u0430 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442 \u0432\u0430\u043c \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/532688\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zf\/w1\/0u\/zfw10udcdoagpewft-zbgxuo22o.jpeg\"><\/div>\n<p><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-314751","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=314751"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314751\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}