{"id":414265,"date":"2024-06-29T23:39:32","date_gmt":"2024-06-29T23:39:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=414265"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=414265","title":{"rendered":"<span>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 Samsung SmartThings \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00ab\u0423\u043c\u043d\u043e\u0433\u043e \u0447\u0430\u0439\u043d\u0438\u043a\u0430\u00bb<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u00ab\u0423\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430\u00bb \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 Samsung SmartThings. \u0422\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0431\u0449\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043c\u043e\u0433\u0443\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0430\u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u00ab\u0423\u043c\u043d\u044b\u0439 \u0447\u0430\u0439\u043d\u0438\u043a\u00bb. \u041d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0430\u043c \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u00bb \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c. \u041d\u0430 \u0436\u0435\u043b\u0435\u0437\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u044f \u043e\u0431\u043e\u0448\u0435\u043b\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430 \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043a\u0430\u043a \u00ab\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438\u00bb. \u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0448\u0430\u0433\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u043b\u0430\u0442\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 ESP8266 &#8212; \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0436\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0435 Samsung, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0435\u0449\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0443\u043c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c81\/5d3\/e56\/c815d3e5663bfe5c6e139f8d7335fd8e.gif\" width=\"314\" height=\"391\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c81\/5d3\/e56\/c815d3e5663bfe5c6e139f8d7335fd8e.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u0423\u043c\u043d\u044b\u0439 \u0447\u0430\u0439\u043d\u0438\u043a\u00bb<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 SmartThings \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043b\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c \u00ab\u0443\u043c\u043d\u043e\u0433\u043e \u0447\u0430\u0439\u043d\u0438\u043a\u0430\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u043e\u043c\u00bb \u0438 \u0432\u0438\u0434\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043b\u0430\u043a\u043e SmartThings. \u041e\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SmartThings \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 &#8212; \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043e\u0431\u043b\u0430\u043a\u043e \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18c\/87d\/398\/18c87d398efa4d1286091c93526c04ef.png\" width=\"1430\" height=\"645\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18c\/87d\/398\/18c87d398efa4d1286091c93526c04ef.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043f\u043b\u0430\u0442\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 ESP8266 &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <a href=\"http:\/\/wiki.amperka.ru\/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D1%8B:troyka-wi-fi\"><u>Amperka Troyka Wi-Fi<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0445\u0446\u0432\u0435\u0442\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u044c\u0435\u0437\u043e-\u043f\u0438\u0449\u0430\u043b\u043a\u0430\/\u0437\u0443\u043c\u043c\u0435\u0440 (\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b 330 \u041e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0430 \u043f\u043e\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u0435\u00bb \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e.\u00a0<\/p>\n<p>\u041d\u0438\u0436\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b:\u00a0<\/p>\n<ul>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u0430\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ece\/72d\/37d\/ece72d37dd613ddba06176e64005ae35.png\" width=\"730\" height=\"484\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ece\/72d\/37d\/ece72d37dd613ddba06176e64005ae35.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0421\u0431\u043e\u0440\u043a\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435<\/h3>\n<p>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f0f\/00a\/fba\/f0f00afbaa353f163eb5560a6d5179c6.png\" width=\"1544\" height=\"605\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f0f\/00a\/fba\/f0f00afbaa353f163eb5560a6d5179c6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 Wi-Fi \u043f\u043b\u0430\u0442\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 &#8212; Amperka Troyka. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u043e\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430, \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0437\u0443\u043c\u043c\u0435\u0440\u0430 \u043a \u043b\u044e\u0431\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c GPIO \u043f\u0438\u043d\u0430\u043c \u043f\u043b\u0430\u0442\u044b. \u0421\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8e1\/6fe\/284\/8e16fe28481d31fd4296f43dfb5e7607.jpeg\" width=\"1600\" height=\"1200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e1\/6fe\/284\/8e16fe28481d31fd4296f43dfb5e7607.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0428\u0430\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>\u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:\u00a0<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<ul>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c SDK<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0438 (iot-core \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 bsp)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c onboarding_config.json\u00a0<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/strong><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 (2 json \u0444\u0430\u0439\u043b\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/company\/samsung\/blog\/489834\/#%D0%A7%D1%82%D0%BE%20%D0%BF%D1%80%D0%B5%D0%B4%D0%BB%D0%B0%D0%B3%D0%B0%D0%B5%D1%82%D1%81%D1%8F%20%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C\"><u>\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435<\/u><\/a>, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0439\u0442\u0438 \u0435\u0433\u043e. \u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/direct-connected\/get-started\"><u>\u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/u><\/a> \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 SmartThings.<\/p>\n<h2>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 workspace \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<ol>\n<li>\n<p>Capabilities<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f capabilities \u0438 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u041a\u043e\u0434 \u043c\u043e\u0435\u0433\u043e \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 <a href=\"https:\/\/github.com\/flisoch\/SmartThings-Smart-Kettle-Example\"><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/u><\/a> \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0431\u0435 \u0438 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441 \u043a\u043e\u0434\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. API \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 ST SDK \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 <a href=\"https:\/\/github.com\/SmartThingsCommunity\/st-device-sdk-c\/blob\/master\/doc\/APIs.md\"><u>\u044d\u0442\u043e\u0439 <\/u><\/a>\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Capability<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 &#8212; Capability. Capability &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b. Capabilities \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 SmartThings, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 capabilities. \u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e Capability \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0451 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0423 Capability \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438\u043c\u044f, \u0441\u0442\u0430\u0442\u0443\u0441, \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b\/\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u0438 \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0438 \u0432\u0438\u0434\u043d\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\/\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 Capability Thermostat Heating Setpoint. \u042d\u0442\u043e Capability \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u043e\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0433\u0440\u0435\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.\u00a0<\/p>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e Capability \u0432 \u043f\u0440\u043e\u0435\u043a\u0442. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0437\u0430 \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u044d\u0442\u043e Capability, \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043c\u0435\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/833\/f7c\/5fa\/833f7c5faccc7b5f809bb96e20975c1f.png\" width=\"1600\" height=\"799\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/833\/f7c\/5fa\/833f7c5faccc7b5f809bb96e20975c1f.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e15\/916\/4ca\/e159164ca2ddae866236c5010d394074.png\" width=\"1600\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e15\/916\/4ca\/e159164ca2ddae866236c5010d394074.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0432\u0441\u0435\u0445 \u0435\u0433\u043e capabilities. \u0421 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u0438\u0434\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 capabilities. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 &#8212; \u0432\u044b\u0431\u0440\u0430\u043d\u043e Capability Thermostat Heating Setpoint, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0437\u0430\u0434\u0430\u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043e\u0448\u043a\u0435.\u00a0<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b66\/5be\/e0e\/b665bee0e1f44e54e3c34068e23fa99e.jpeg\" width=\"720\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b66\/5be\/e0e\/b665bee0e1f44e54e3c34068e23fa99e.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041e\u043a\u043e\u0448\u043a\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c09\/2ad\/c25\/c092adc25e1da66ec02c42afbd300c1a.png\" width=\"720\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c09\/2ad\/c25\/c092adc25e1da66ec02c42afbd300c1a.png\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 Capability, \u043d\u043e \u0443\u0436\u0435 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/feb\/255\/bcb\/feb255bcbcfdcc2d628de59e9ffebd35.png\" width=\"961\" height=\"273\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/feb\/255\/bcb\/feb255bcbcfdcc2d628de59e9ffebd35.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423 Capability \u0435\u0441\u0442\u044c <em>id<\/em> = &#171;thermostatHeatingSetpoint&#187;, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <em>heatingSetpoint<\/em> \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <strong>setHeatingSetpoint(setpoint) <\/strong>\u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Capability \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438 \u043a\u0430\u043a\u0438\u043c \u0436\u0435\u043b\u0435\u0437\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439\/\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<\/p>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e Capability \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/capabilities\/capabilities\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> SmartThings.<\/p>\n<h3>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u0434 \u043d\u0435\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f esp8266 \u0438 Espressif ESP8266 RTOS SDK \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 esp. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u0432\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C.<\/p>\n<h3>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c capabilities \u0438 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0445 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412 \u043a\u0430\u0436\u0434\u043e\u0435 Capability \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u0434\u0440. \u0414\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0438\u043d\u044b \u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h3>\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430<\/h3>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <em>main.c<\/em> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f capabilities \u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439. \u0412 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0415\u0441\u0442\u044c 2 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439: \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0436\u0435\u043b\u0435\u0437\u043e\u043c\/\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430<\/h4>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435\/\u0442\u0430\u0441\u043a\u0435. \u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Capability. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u0438\u0433\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c. \u0418\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u043e\u0436\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c.\u00a0<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043e\u0431\u043b\u0430\u043a\u0430\/\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441 \u043e\u0431\u043b\u0430\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 Capability \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a\u0438. \u041a\u043e\u043b\u0431\u044d\u043a &#8212; \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Capability. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 Capability \u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0412 \u044d\u0442\u0438\u0445 \u043a\u043e\u043b\u0431\u044d\u043a-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e Capability. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e\u0434\u043e\u0433\u0440\u0435\u0432\u0430 \u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u0438\u0433\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.\u00a0<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 Smart Kettle<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/SmartThingsCommunity\/st-device-sdk-c-ref\/tree\/master\/apps\/esp8266\/switch_example\"><u>\u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/u><\/a> \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 ST SDK. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u044f, \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u041d\u043e \u0434\u0435\u043b\u0430\u044f \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044f\u0441\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0431\u044b\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b.<\/p>\n<h4>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>app_main<\/strong>, \u043d\u0430 \u043d\u0435\u0451 \u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0431\u043b\u0430\u043a\u0443 ST:<\/p>\n<pre><code class=\"cpp\">void app_main(void) {   unsigned char *onboarding_config = (unsigned char *) onboarding_config_start;   unsigned int onboarding_config_len = onboarding_config_end - onboarding_config_start;   unsigned char *device_info = (unsigned char *) device_info_start;   unsigned int device_info_len = device_info_end - device_info_start;   int iot_err;   \/\/ st_dev.h   ctx = st_conn_init(onboarding_config, onboarding_config_len, device_info, device_info_len);   if (ctx != NULL) {     iot_err = st_conn_set_noti_cb(ctx, iot_noti_cb, NULL);     if (iot_err)       printf(\"fail to set notification callback function\\n\");   } else {     printf(\"fail to create the iot_context\\n\");   } \/* . . . *\/ } <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e.\u00a0<\/p>\n<pre><code class=\"cpp\">\/\/ onboarding_config_start is null-terminated string extern const uint8_t onboarding_config_start[]   asm(\"_binary_onboarding_config_json_start\"); extern const uint8_t onboarding_config_end[]    asm(\"_binary_onboarding_config_json_end\");   \/\/ device_info_start is null-terminated string extern const uint8_t device_info_start[]    asm(\"_binary_device_info_json_start\"); extern const uint8_t device_info_end[]      asm(\"_binary_device_info_json_end\");   IOT_CTX* ctx = NULL;<\/code><\/pre>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>st_conn_set_noti_cb <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a \u0441\u0442\u043e\u0438\u0442. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0438\u0445.\u00a0<\/p>\n<pre><code class=\"cpp\">static void iot_noti_cb(iot_noti_data_t *noti_data, void *noti_usr_data) {   printf(\"Notification message received\\n\");   if (noti_data->type == IOT_NOTI_TYPE_DEV_DELETED) {     printf(\"[device deleted]\\n\");   } else if (noti_data->type == IOT_NOTI_TYPE_RATE_LIMIT) {     printf(\"[rate limit] Remaining time:%d, sequence number:%d\\n\",     noti_data->raw.rate_limit.remainingTime, noti_data->raw.rate_limit.sequenceNumber);   } } <\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438\/enum <strong>iot_noti_type<\/strong> \u0432 st_dev.h.\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 <strong>app_main<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 Capability \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, <strong>capability_init<\/strong>. \u0423 \u043d\u0430\u0441 \u0442\u0440\u0438 Capability: Switch, Temperature Measurement \u0438 Heating Setpoint. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e Capability \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043b\u0431\u044d\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 Capability.\u00a0<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f capability_init<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">static void capability_init() {   \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f   cap_switch_data = caps_switch_initialize(ctx, \"main\", NULL, NULL);   if (cap_switch_data) {     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043b\u0431\u044d\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438     cap_switch_data->cmd_on_usr_cb = cap_switch_cmd_cb;     cap_switch_data->cmd_off_usr_cb = cap_switch_cmd_cb;     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e     cap_switch_data->set_switch_value(cap_switch_data, caps_helper_switch.attr_switch.value_off);   }   \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u043f\u043e\u043a\u0430\u0437\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b   cap_temperature_data = caps_temperatureMeasurement_initialize(ctx, \"main\", NULL, NULL);   if (cap_temperature_data) {     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043c\u0435\u0440\u0443\/unit \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e     cap_temperature_data->set_temperature_unit(cap_temperature_data, caps_helper_temperatureMeasurement.attr_temperature.unit_C);     cap_temperature_data->set_temperature_value(cap_temperature_data, 0);   }   \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u043d\u0438\u044f   cap_heatingSetpoint_data = caps_thermostatHeatingSetpoint_initialize(ctx, \"main\", NULL, NULL);   if (cap_heatingSetpoint_data) {     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043b\u0431\u044d\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e     cap_heatingSetpoint_data->cmd_setHeatingSetpoint_usr_cb = cap_thermostat_cmd_cb;     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043c\u0435\u0440\u0443\/unit \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u043d\u0438\u044f     cap_heatingSetpoint_data->set_unit(cap_heatingSetpoint_data, caps_helper_thermostatHeatingSetpoint.attr_heatingSetpoint.unit_C);   } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>iot_gpio_init<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0438\u043d\u044b. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\/\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ESP8266 RTOS SDK \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 esp.\u00a0<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f iot_gpio_init<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">void iot_gpio_init(void) {     \/\/ esp sdk specific   gpio_config_t io_conf;   \/\/ \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f   io_conf.intr_type = GPIO_INTR_DISABLE;   \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0436\u0438\u043c \u043f\u0438\u043d\u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434   io_conf.mode = GPIO_MODE_OUTPUT;   \/\/ \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0438\u043d   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_OUTPUT_MAINLED;   \/\/ \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043b\u044f \u043f\u0438\u043d\u0430 pull-down    io_conf.pull_down_en = 1;   io_conf.pull_up_en = 0;   \/\/ \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0438\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430   gpio_config(&amp;io_conf);   \/\/ \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0443 \u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0435\u0435 \u0434\u043b\u044f \u043f\u0438\u043d\u0430 \u0437\u0443\u043c\u043c\u0435\u0440\u0430   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_OUTPUT_BUZZER;   \/\/ \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0438\u043d   gpio_config(&amp;io_conf);   \/\/ \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0438\u043d\u044b rgb \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_OUTPUT_RGBLED_R;   gpio_config(&amp;io_conf);   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_OUTPUT_RGBLED_G;   gpio_config(&amp;io_conf);   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_OUTPUT_RGBLED_B;   gpio_config(&amp;io_conf);   \/\/ \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0438\u043d \u043a\u043d\u043e\u043f\u043a\u0438-\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f   io_conf.intr_type = GPIO_INTR_ANYEDGE;   io_conf.mode = GPIO_MODE_INPUT;   io_conf.pin_bit_mask = 1 &lt;&lt; GPIO_INPUT_SWITCH;   io_conf.pull_down_en = 0;   io_conf.pull_up_en = 1;   gpio_config(&amp;io_conf);   \/\/ \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439   gpio_install_isr_service(0);   \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0438\u043d\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e   gpio_set_level(GPIO_OUTPUT_MAINLED, LED_GPIO_ON);   gpio_set_level(GPIO_OUTPUT_BUZZER, LED_GPIO_OFF);   gpio_set_level(GPIO_OUTPUT_RGBLED_R, LED_GPIO_OFF);   gpio_set_level(GPIO_OUTPUT_RGBLED_G, LED_GPIO_OFF);   gpio_set_level(GPIO_OUTPUT_RGBLED_B, LED_GPIO_ON); } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <strong>app_main<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u043b\u0430\u043a\u0443 ST \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>connection_start<\/strong>.<\/p>\n<pre><code class=\"cpp\">static void connection_start(void) {   iot_pin_t *pin_num = NULL;   int err;   \/\/ process on-boarding procedure. There is nothing more to do on the app side than call the API.   err = st_conn_start(ctx, (st_status_cb)&amp;iot_status_cb, IOT_STATUS_ALL, NULL, pin_num);   if (err) {     printf(\"fail to start connection. err:%d\\n\", err);   } } <\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u043e\u0442\u043e\u043a\u0430\/\u0442\u0430\u0441\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0434\u0430\u043b\u0435\u0435. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\/\u0442\u0430\u0441\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u043b\u0438 ST SDK, \u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e RTOS \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c FreeRTOS, \u043d\u043e \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>iot_os_thread_create <\/strong>\u0438\u0437 ST SDK.<\/p>\n<pre><code class=\"cpp\">void app_main(void) {   \/* . . . *\/   \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435\/\u0442\u0430\u0441\u043a\u0435   iot_os_thread_create(app_main_task, \"app_main_task\", 2048, NULL, 10, NULL); } <\/code><\/pre>\n<h4>\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430<\/h4>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u0432 \u0441\u043b\u043e\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u0437 2 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432: \u043e\u0442 \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438.\u00a0<\/p>\n<h4>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438<\/h4>\n<p>\u0412 <strong>app_main<\/strong> \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>app_main_task<\/strong> \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435\/\u0442\u0430\u0441\u043a\u0435. \u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0445 Capability, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 &#8212; \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u0436\u0430\u0442\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u201c\u043a\u0438\u043f\u044f\u0447\u0435\u043d\u0438\u044f\u201d \u0437\u0430\u043f\u0443\u0449\u0435\u043d.\u00a0 \u041c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <em>thermostat_enable<\/em> \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u0439\u043c\u0435\u0440 <strong>iot_os_timer<\/strong> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.\u00a0<\/p>\n<pre><code class=\"cpp\">if (get_button_event()) {   \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435   cap_switch_data->set_switch_value(cap_switch_data, caps_helper_switch.attr_switch.value_on);   \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f   cap_switch_data->attr_switch_send(cap_switch_data);   change_switch_state(get_switch_state());   \/\/ \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\/\u043a\u0438\u043f\u044f\u0447\u0435\u043d\u0438\u044f   thermostat_enable = true; } <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043e\u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b\/\u043e\u0431\u044a\u0435\u043a\u0442\u0430 Temperature Capability. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Capability. \u0422\u0430\u043a\u0436\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0446\u0432\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0441 \u0441\u0438\u043d\u0435\u0433\u043e \u043d\u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0439.\u00a0<\/p>\n<pre><code class=\"cpp\">\/\/ \u0415\u0441\u043b\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b if (thermostat_enable &amp;&amp; get_temperature_event(timer)) {   \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044btemperature_value =  temperature_event(temperature_value);   \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0438\u043d\u0438\u0439 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430   change_rgb_state(GPIO_OUTPUT_RGBLED_B, LED_GPIO_OFF);   change_rgb_state(GPIO_OUTPUT_RGBLED_R, LED_GPIO_ON);   \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b   cap_temperature_data->set_temperature_value(cap_temperature_data, temperature_value);   \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u043e\u0431\u043b\u0430\u043a\u043e   cap_temperature_data->attr_temperature_send(cap_temperature_data); } <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043a\u0438\u043f\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u201c\u043a\u0438\u043f\u044f\u0447\u0435\u043d\u0438\u044f\u201d \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f. \u041c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <em>thermostat_enable,<\/em> \u0446\u0432\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043d\u0430 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0438\u0449\u0430\u043d\u0438\u044f \u0437\u0443\u043c\u043c\u0435\u0440\u0430 &#8212; \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <em>buzzer_enable<\/em>.<\/p>\n<pre><code class=\"cpp\">if (thermostat_enable &amp;&amp; temperature_value >= heating_setpoint) { thermostat_enable = false; change_rgb_state(GPIO_OUTPUT_RGBLED_R, LED_GPIO_OFF); change_rgb_state(GPIO_OUTPUT_RGBLED_G, LED_GPIO_ON); temperature_value = 0; \/\/ \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0443\u043c\u043c\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c buzzer_enable = true; } <\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0443\u043c\u043c\u0435\u0440 \u043f\u0440\u043e\u043f\u0438\u0449\u0438\u0442, \u0446\u0432\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0437\u0435\u043b\u0451\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0441\u0438\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 Switch Capability \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 UI \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 app_main_task \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">static void app_main_task(void *arg) {      \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430    iot_os_timer timer = NULL;    int iot_err;    iot_err = iot_os_timer_init(&amp;timer);    if (iot_err) {        printf(\"fail to init timer: %d\\n\", iot_err);    }    iot_os_timer_count_ms(timer, TEMPERATURE_EVENT_MS_RATE);      double temperature_value = 0;      for (;;) {       \/\/ \u0435\u0441\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430    if (get_button_event()) { \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435 cap_switch_data->set_switch_value(cap_switch_data, caps_helper_switch.attr_switch.value_on); \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f       cap_switch_data->attr_switch_send(cap_switch_data);         change_switch_state(get_switch_state()); \/\/ \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\/\u043a\u0438\u043f\u044f\u0447\u0435\u043d\u0438\u044f       thermostat_enable = true;     } \/\/ \u0415\u0441\u043b\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b     if (thermostat_enable &amp;&amp; get_temperature_event(timer)) { \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b     temperature_value = temperature_event(temperature_value); \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0438\u043d\u0438\u0439 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 change_rgb_state(GPIO_OUTPUT_RGBLED_B, LED_GPIO_OFF); change_rgb_state(GPIO_OUTPUT_RGBLED_R, LED_GPIO_ON);       \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b     cap_temperature_data->set_temperature_value(cap_temperature_data, temperature_value);       \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u043e\u0431\u043b\u0430\u043a\u043e cap_temperature_data->attr_temperature_send(cap_temperature_data); } if (thermostat_enable &amp;&amp; temperature_value >= heating_setpoint) { thermostat_enable = false; change_rgb_state(GPIO_OUTPUT_RGBLED_R, LED_GPIO_OFF); change_rgb_state(GPIO_OUTPUT_RGBLED_G, LED_GPIO_ON); temperature_value = 0; \/\/ \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0443\u043c\u043c\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c buzzer_enable = true;     }     if (buzzer_enable) { \/\/ \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0443\u043c\u043c\u0435\u0440 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 beep(); \/\/ \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0443\u043c\u043c\u0435\u0440 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c buzzer_enable = false; change_rgb_state(GPIO_OUTPUT_RGBLED_G, LED_GPIO_OFF); change_rgb_state(GPIO_OUTPUT_RGBLED_B, LED_GPIO_ON); cap_switch_data->set_switch_value(cap_switch_data, caps_helper_switch.attr_switch.value_off); \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f cap_switch_data->attr_switch_send(cap_switch_data); change_switch_state(get_switch_state()); }     iot_os_delay(10); }   iot_os_timer_destroy(&amp;timer); } <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u0437 \u043e\u0431\u043b\u0430\u043a\u0430\/\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0438\u0437 \u0441\u043b\u043e\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438\u0437 \u043e\u0431\u043b\u0430\u043a\u0430\/\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0423 \u043d\u0430\u0441 \u044d\u0442\u043e \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0434\u043b\u044f Switch Capability \u0438 Thermostat Heating Setpoint Capability.\u00a0<\/p>\n<p>\u0414\u043b\u044f Switch Capability \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0449\u0435\u043b\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 wifi-\u043f\u043b\u0430\u0442\u0443 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 <em>thermostat_enable<\/em>. \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 <strong>app_main_task <\/strong>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\/\u043a\u0438\u043f\u044f\u0447\u0435\u043d\u0438\u044f.\u00a0<\/p>\n<p>\u0414\u043b\u044f Thermostat Heating Setpoint Capability \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u043c\u044b \u043c\u0438\u0433\u0430\u0435\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>heating_setpoint<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430\u0433\u0440\u0435\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">static void capability_init() {   \/* . . . *\/   cap_switch_data->cmd_on_usr_cb = cap_switch_cmd_cb;   cap_switch_data->cmd_off_usr_cb = cap_switch_cmd_cb;   \/* . . . *\/    cap_heatingSetpoint_data->cmd_setHeatingSetpoint_usr_cb = cap_thermostat_cmd_cb;   \/* . . . *\/ }   static void cap_switch_cmd_cb(struct caps_switch_data *caps_data) {   int switch_state = get_switch_state();   change_switch_state(switch_state);   thermostat_enable = !thermostat_enable; }   static void cap_thermostat_cmd_cb(struct caps_thermostatHeatingSetpoint_data *caps_data) {     \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430   heating_setpoint = caps_data->get_value(caps_data);   int led_state = get_switch_state();   \/\/ \u043c\u0438\u0433\u0430\u0435\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c   change_led_state(heating_setpoint, led_state); } <\/code><\/pre>\n<h4>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439<\/h4>\n<p>\u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <em>device_control.h<\/em> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 <em>device_control.c<\/em>. \u0412 <em>device_control.h<\/em> \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0438\u043d\u043e\u0432 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0438\u043d \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0449\u0430\u043d\u0438\u044f \u0437\u0443\u043c\u043c\u0435\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">#define GPIO_INPUT_SWITCH 5 #define BUZZER_SOUND_DURATION 3000<\/code><\/pre>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438 rgb \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0438 \u0437\u0443\u043c\u043c\u0435\u0440. \u0421 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0438\u043d\u0430, \u0430 \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b. \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u041a\u043d\u043e\u043f\u043a\u0430<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>get_button_event<\/strong> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0438\u043d\u0430 \u0438, \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 1, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043e\u0442 \u043a\u043d\u043e\u043f\u043a\u0438.\u00a0<\/p>\n<pre><code class=\"cpp\">int get_button_event() { static uint32_t button_last_state = 0;   uint32_t gpio_level = 0;     gpio_level = gpio_get_level(GPIO_INPUT_SWITCH);   if (button_last_state != gpio_level) {  \/\/ \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 IOT_DELAY(BUTTON_DEBOUNCE_TIME_MS);     gpio_level = gpio_get_level(GPIO_INPUT_SWITCH); if (button_last_state != gpio_level) { printf(\"Button event, val: %d, \\n\", gpio_level); button_last_state = gpio_level;               } return 1; } return 0; }<\/code><\/pre>\n<h4>RGB \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>change_rgb_state <\/strong>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0438\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0438\u043d\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043f\u0438\u043d\u0443 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cpp\">void change_rgb_state(int pin, int value) { if (pin == GPIO_OUTPUT_RGBLED_R) { gpio_set_level(GPIO_OUTPUT_RGBLED_R, value); }   else if (pin == GPIO_OUTPUT_RGBLED_G) { gpio_set_level(GPIO_OUTPUT_RGBLED_G, value);   }   else if (pin == GPIO_OUTPUT_RGBLED_B) { gpio_set_level(GPIO_OUTPUT_RGBLED_B, value);   } } <\/code><\/pre>\n<h4>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>change_switch_state <\/strong>\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434.<\/p>\n<pre><code class=\"cpp\">void change_switch_state(int switch_state) { if (switch_state == SWITCH_OFF) { gpio_set_level(GPIO_OUTPUT_MAINLED, LED_GPIO_OFF);   } else { gpio_set_level(GPIO_OUTPUT_MAINLED, LED_GPIO_ON);   } } <\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>blink_led <\/strong>\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u043c\u0438\u0433\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.<\/p>\n<pre><code class=\"cpp\">void blink_led(double heating_setpoint, int led_state) { \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u0438\u0433\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443   int blinks = 0;   if (heating_setpoint &lt;= 10) { blinks = 1;   }   else if (heating_setpoint &lt;= 30) { blinks = 2;   }   else if (heating_setpoint &lt;= 50) { blinks = 3;   }   else if (heating_setpoint &lt;= 100) { blinks = 4;   }   else { printf(\"heating setpoint > 100 or &lt; 0!\\nPlease, set correct number\");   }   for (int i = 0; i &lt; blinks; i++) { change_switch_state(1 - led_state); iot_os_delay(BLINK_DURATION); change_switch_state(led_state); iot_os_delay(BLINK_DURATION);   } } <\/code><\/pre>\n<h4>\u0417\u0443\u043c\u043c\u0435\u0440<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>beep <\/strong>\u043f\u043e\u0434\u0430\u0451\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d \u0441 \u0437\u0443\u043c\u043c\u0435\u0440\u043e\u043c \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0430\u0447\u0443 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f.\u00a0\u00a0<\/p>\n<pre><code class=\"cpp\">void beep() { change_buzzer_state(BUZZER_ON);   IOT_DELAY(BUZZER_SOUND_DURATION);   change_buzzer_state(BUZZER_OFF); }   void change_buzzer_state(int buzzer_state) {   if (buzzer_state == BUZZER_OFF) { gpio_set_level(GPIO_OUTPUT_BUZZER, BUZZER_OFF);   } else { gpio_set_level(GPIO_OUTPUT_BUZZER, BUZZER_ON);   } } <\/code><\/pre>\n<p>\u00a0<\/p>\n<p>\u042d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>get_temperature_event <\/strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043f\u0440\u043e\u0448\u043b\u043e \u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b. \u0415\u0441\u043b\u0438 \u0442\u0430\u0439\u043c\u0435\u0440 \u0438\u0441\u0442\u0435\u043a, \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u0441\u0447\u0435\u0442\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f 1, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043e\u0442 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b.\u00a0<\/p>\n<pre><code class=\"cpp\">int get_temperature_event(iot_os_timer timer) { if (iot_os_timer_isexpired(timer)) { iot_os_timer_count_ms(timer, TEMPERATURE_EVENT_MS_RATE); return 1;   }   else { return 0;   } } <\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>temperature_event <\/strong>\u044d\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u0442 \u0434\u0430\u0442\u0447\u0438\u043a\u0430, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430 5.<\/p>\n<pre><code class=\"cpp\">double temperature_event(double temperature_value) {    return temperature_value + 5; } <\/code><\/pre>\n<h4>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f Capability\u00a0<\/h4>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 Capability \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <strong>caps_{capabilityName}_data_t<\/strong>. \u042d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 Capability \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 Capability \u0432 \u043e\u0431\u043b\u0430\u043a\u043e ST. \u0411\u044b\u0432\u0430\u044e\u0442 Capability \u0431\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0411\u044b\u0432\u0430\u044e\u0442 Capability \u0431\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u0435\u043b\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 <em>caps_{capabilityName}<\/em><strong><em>.h<\/em> <\/strong>\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 <em>caps_{capabilityName}<\/em><strong><em>.\u0441<\/em><\/strong>.\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Switch Capability.\u00a0<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 Switch Capability<\/h4>\n<p>Switch Capability &#8212; \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f: \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d.\u00a0<\/p>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 main \u0441\u043e\u0437\u0434\u0430\u043d\u044b <em>caps_switch.c<\/em> \u0438 <em>caps_switch.h.<\/em>\u00a0<\/p>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/722\/c17\/3ac\/722c173ac51d6aeb33ab45e1d37d6322.png\" width=\"139\" height=\"70\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/722\/c17\/3ac\/722c173ac51d6aeb33ab45e1d37d6322.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 caps_switch.h<\/h4>\n<p>\u0412 <em>caps_switch.h<\/em> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <strong>caps_switch_data_t<\/strong> \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>caps_switch_initialize<\/strong>.\u00a0<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <strong>caps_switch_data_t<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435 <em>switch_value<\/em> \u0442\u0438\u043f\u0430 <strong>char<\/strong>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 Switch Capability. \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 Capability \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>int<\/strong>. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 Capability \u0435\u0441\u0442\u044c <em>unit<\/em> &#8212; \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u043b\u0435.\u00a0<\/p>\n<pre><code class=\"cpp\">typedef struct caps_switch_data {    char *switch_value;    \/* . . . *\/ } caps_switch_data_t;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0435\u0441\u0442\u044c \u0433\u0435\u0442\u0442\u0435\u0440 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <em>switch_value<\/em> \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>attr_switch_send<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <em>switch_value<\/em> \u0432 \u043e\u0431\u043b\u0430\u043a\u043e ST, \u0447\u0442\u043e\u0431\u044b \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f UI \u043a\u043d\u043e\u043f\u043a\u0438\/\u0441\u0432\u0438\u0442\u0447\u0430.\u00a0<\/p>\n<pre><code class=\"cpp\">typedef struct caps_switch_data {    \/* . . . *\/    const char *(*get_switch_value)(struct caps_switch_data *caps_data);    void (*set_switch_value)(struct caps_switch_data *caps_data, const char *value);    void (*attr_switch_send)(struct caps_switch_data *caps_data);    \/* . . . *\/ } caps_switch_data_t;<\/code><\/pre>\n<p>\u0415\u0449\u0451 \u0435\u0441\u0442\u044c 2 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043b\u0431\u044d\u043a\u0438: <strong>cmd_on_usr_cb<\/strong> \u0438 <strong>cmd_off_usr_cb<\/strong>. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0449\u0435\u043b\u043a\u043d\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<pre><code class=\"cpp\">typedef struct caps_switch_data {    \/* . . . *\/    void (*cmd_on_usr_cb)(struct caps_switch_data *caps_data);    void (*cmd_off_usr_cb)(struct caps_switch_data *caps_data); } caps_switch_data_t;<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">typedef struct caps_switch_data {    IOT_CAP_HANDLE* handle;    void *usr_data;    void *cmd_data;      char *switch_value;      const char *(*get_switch_value)(struct caps_switch_data *caps_data);    void (*set_switch_value)(struct caps_switch_data *caps_data, const char *value);    int (*attr_switch_str2idx)(const char *value);    void (*attr_switch_send)(struct caps_switch_data *caps_data);      void (*init_usr_cb)(struct caps_switch_data *caps_data);      void (*cmd_on_usr_cb)(struct caps_switch_data *caps_data);    void (*cmd_off_usr_cb)(struct caps_switch_data *caps_data); } caps_switch_data_t; <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412 \u041e\u041e\u041f-\u044f\u0437\u044b\u043a\u0430\u0445 \u043c\u044b \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043f\u0440\u044f\u043c\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e. \u0412 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438 \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0430\u043c \u201c\u043e\u0431\u044a\u0435\u043a\u0442\u201d \u0432 \u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.\u00a0<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>caps_switch_initialize<\/strong> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412 \u0442\u0430\u043a\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<pre><code class=\"cpp\">caps_switch_data_t *caps_switch_initialize(IOT_CTX *ctx, const char *component, void *init_usr_cb, void *usr_data); <\/code><\/pre>\n<h4>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 caps_switch.\u0441<\/h4>\n<p>\u0412 <em>caps_switch<\/em>.<em>c<\/em> \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 <em>caps_switch.h<\/em>.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>caps_switch_initialize<\/strong>, \u0442.\u043a. \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 3 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f <strong>caps_switch_data_t<\/strong> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u0431\u044d\u043a\u043e\u0432. \u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0438 \u043a\u0430\u043a\u0438\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0 caps_switch_initialize<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">caps_switch_data_t *caps_switch_initialize(IOT_CTX *ctx, const char *component, void *init_usr_cb, void *usr_data) { \/\/ \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438   caps_switch_data_t *caps_data = NULL;   int err;   caps_data = malloc(sizeof(caps_switch_data_t));   if (!caps_data) { printf(\"fail to malloc for caps_switch_data\\n\"); return NULL;   }   memset(caps_data, 0, sizeof(caps_switch_data_t));     caps_data->init_usr_cb = init_usr_cb;   caps_data->usr_data = usr_data; \/\/ \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439   caps_data->get_switch_value = caps_switch_get_switch_value;   caps_data->set_switch_value = caps_switch_set_switch_value;   caps_data->attr_switch_send = caps_switch_attr_switch_send; \/\/ \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u0431\u044d\u043a\u043e\u0432   if(ctx) { caps_data->handle = st_cap_handle_init(ctx, component, caps_helper_switch.id, caps_switch_init_cb, caps_data);   }   if(caps_data->handle) { err = st_cap_cmd_set_cb(caps_data->handle, caps_helper_switch.cmd_on.name, caps_switch_cmd_on_cb, caps_data); if (err) {       printf(\"fail to set cmd_cb for on of switch\\n\"); } err = st_cap_cmd_set_cb(caps_data->handle, caps_helper_switch.cmd_off.name, caps_switch_cmd_off_cb, caps_data); if (err) { printf(\"fail to set cmd_cb for off of switch\\n\"); }   }   else { printf(\"fail to init switch handle\\n\");   }   return caps_data; } <\/code><\/pre>\n<\/div>\n<\/details>\n<p><em>\u0413\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b<\/em>\u00a0<\/p>\n<p>\u0412 \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u0445 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 Capability \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 <em>NULL<\/em>. \u0414\u0430\u043b\u0435\u0435 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <em>switch_value<\/em>, \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e.\u00a0<\/p>\n<pre><code class=\"cpp\">static const char *caps_switch_get_switch_value(caps_switch_data_t *caps_data) {   if (!caps_data) {     printf(\"caps_data is NULL\\n\");     return NULL;   }   return caps_data->switch_value; }   static void caps_switch_set_switch_value(caps_switch_data_t *caps_data, const char *value) { if (!caps_data) {     printf(\"caps_data is NULL\\n\");     return;   }   if (caps_data->switch_value) {     free(caps_data->switch_value);   }   caps_data->switch_value = strdup(value); } <\/code><\/pre>\n<p>\u00a0<\/p>\n<p><em>\u0424\u0443\u043d\u043a\u0446\u0438\u044f caps_switch_attr_switch_send<\/em><\/p>\n<p>\u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 switch. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043c\u0438\u043c\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <strong>ST_CAP_SEND_ATTR_STRING <\/strong>\u0438\u0437 SDK. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ST_CAP_SEND_ATTR_<strong>STRING<\/strong>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432 Capability \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 temperature, \u0442\u043e \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c ST_CAP_SEND_ATTR_<strong>NUMBER<\/strong>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u0438\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u0432 \u043c\u0430\u043a\u0440\u043e\u0441 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c unit &#8212; \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b.<\/p>\n<pre><code class=\"cpp\">static void caps_switch_attr_switch_send(caps_switch_data_t *caps_data) {   int sequence_no = -1;    if (!caps_data || !caps_data->handle) {     printf(\"fail to get handle\\n\");     return;   }   if (!caps_data->switch_value) {     printf(\"value is NULL\\n\");     return;   }    ST_CAP_SEND_ATTR_STRING(caps_data->handle,                           (char *)caps_helper_switch.attr_switch.name,                           caps_data->switch_value,                           NULL,                           NULL,                           sequence_no);    if (sequence_no &lt; 0)     printf(\"fail to send switch value\\n\");   else     printf(\"Sequence number return : %d\\n\", sequence_no); } <\/code><\/pre>\n<p><em>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u0431\u044d\u043a\u043e\u0432<\/em><\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e Capability \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043b\u0431\u044d\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 Capability. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">if(ctx) {   caps_data->handle = st_cap_handle_init(ctx, component, caps_helper_switch.id, caps_switch_init_cb, caps_data); }<\/code><\/pre>\n<p>\u0410 \u0434\u0430\u043b\u0435\u0435 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043b\u0431\u044d\u043a. \u0412 \u043d\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>init_usr_cb<\/strong> \u0438\u0437 \u0441\u043b\u043e\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u0438\u0437 Capability. <\/p>\n<pre><code class=\"cpp\">static void caps_switch_init_cb(IOT_CAP_HANDLE *handle, void *usr_data) {   caps_switch_data_t *caps_data = usr_data;   if (caps_data &amp;&amp; caps_data->init_usr_cb)     caps_data->init_usr_cb(caps_data);   caps_switch_attr_switch_send(caps_data); } <\/code><\/pre>\n<p><em>\u041a\u043e\u043b\u0431\u044d\u043a\u0438 caps_switch_cmd_off_cb \u0438 caps_switch_cmd_on_cb<\/em><\/p>\n<p>\u041a\u043e\u043b\u0431\u044d\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0449\u0435\u043b\u043a\u043d\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043a\u043e\u043b\u0431\u044d\u043a\u0438. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Capability \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">if(caps_data->handle) {   err = st_cap_cmd_set_cb(caps_data->handle, caps_helper_switch.cmd_on.name, caps_switch_cmd_on_cb, caps_data);   if (err) {     printf(\"fail to set cmd_cb for on of switch\\n\");   }   err = st_cap_cmd_set_cb(caps_data->handle, caps_helper_switch.cmd_off.name, caps_switch_cmd_off_cb, caps_data);   if (err) {     printf(\"fail to set cmd_cb for off of switch\\n\");   } } else {   printf(\"fail to init switch handle\\n\"); }<\/code><\/pre>\n<p>\u0410 \u0434\u0430\u043b\u0435\u0435 \u0441\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043b\u0431\u044d\u043a\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441 \u043e\u0431\u043b\u0430\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 Capability &#8212; \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u201c\u0432\u043a\u043b\u201d \u0438\u043b\u0438 \u201c\u0432\u044b\u043a\u043b\u201d. \u0412 \u043a\u043e\u043b\u0431\u044d\u043a\u0435 \u043c\u044b \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <strong>caps_switch_data_t<\/strong> <em>*caps_data<\/em>, \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u0438 \u0432 UI \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>cmd_on_usr_cb <\/strong>\u0438\u043b\u0438<strong> cmd_off_usr_cb<\/strong> \u0438\u0437 \u0441\u043b\u043e\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f, \u0438 \u043e\u043d\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 &#8212; \u043f\u043e\u043c\u0438\u0433\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 UI \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u0431\u044d\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 UI \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439.\u00a0\u00a0<\/p>\n<pre><code class=\"cpp\">static void caps_switch_cmd_on_cb(IOT_CAP_HANDLE *handle, iot_cap_cmd_data_t *cmd_data, void *usr_data) {   caps_switch_data_t *caps_data = (caps_switch_data_t *)usr_data;   const char* value = caps_helper_switch.attr_switch.values[CAP_ENUM_SWITCH_SWITCH_VALUE_ON];    printf(\"called [%s] func with num_args:%u\\n\", __func__, cmd_data->num_args);    caps_switch_set_switch_value(caps_data, value);   if (caps_data &amp;&amp; caps_data->cmd_on_usr_cb)     caps_data->cmd_on_usr_cb(caps_data);   caps_switch_attr_switch_send(caps_data); }   static void caps_switch_cmd_off_cb(IOT_CAP_HANDLE *handle, iot_cap_cmd_data_t *cmd_data, void *usr_data) {   caps_switch_data_t *caps_data = (caps_switch_data_t *)usr_data;   const char* value = caps_helper_switch.attr_switch.values[CAP_ENUM_SWITCH_SWITCH_VALUE_OFF];    printf(\"called [%s] func with num_args:%u\\n\", __func__, cmd_data->num_args);    caps_switch_set_switch_value(caps_data, value);   if (caps_data &amp;&amp; caps_data->cmd_off_usr_cb)     caps_data->cmd_off_usr_cb(caps_data);   caps_switch_attr_switch_send(caps_data); } <\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 Capability<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 capabilities \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 Switch Capability. \u0418\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438 \u0441 \u043a\u0430\u0436\u0434\u044b\u043c Capability:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043f\u043e\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443: \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043b\u0431\u044d\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043b\u0431\u044d\u043a-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043b\u043e\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<p>\u041e \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 Capability \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/capabilities\/capabilities-reference\"><u>\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> SmartThings, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 capabilities.<\/p>\n<h3>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 Capability<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e Capability \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f, ST \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 Capability. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c Thermostat Heating Setpoint, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 UI \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u043b\u0438\u0448\u044c \u0434\u043e 40 \u00b0C.\u00a0<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u0430 Capability \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0434\u043b\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043e\u0431\u043e\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b. \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 Capability \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Oven Setpoint, \u0433\u0434\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u043d\u043e \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u0432 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0447\u0430\u0439\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0436\u0435, \u043f\u0440\u043e \u0434\u0443\u0445\u043e\u0432\u043a\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Capability.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3e8\/d7a\/37d\/3e8d7a37d56860b0550ae055dd871298.png\" width=\"576\" height=\"1280\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e8\/d7a\/37d\/3e8d7a37d56860b0550ae055dd871298.png\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0435 Capability \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435, \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c Capability \u0438 Capability Presentation \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b smartthings-cli<\/p>\n<\/li>\n<li>\n<p>\u0412 Workspace \u0432 \u041f\u0440\u043e\u0444\u0438\u043b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 Capability<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 Thermostat Heating Setpoint Capability \u043d\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c Capability \u0435\u0441\u0442\u044c <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/capabilities\/custom-capabilities\"><u>\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/u><\/a> \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 <a href=\"https:\/\/community.smartthings.com\/t\/custom-capability-and-cli-developer-preview\/197296\"><u>\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b<\/u><\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 ST. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a \u043d\u0438\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b.\u00a0<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability<\/h4>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c 2 \u0444\u0430\u0439\u043b\u0430: \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Capability \u0438 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e UI-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e Capability \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 capabilities, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442. \u042f \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b Thermostat Heating Setpoint Capability, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 40 \u00b0C, \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 custom-capability.\u00a0<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability:<\/p>\n<ol>\n<li>\n<p>C\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 smartthings-cli \u0441 <a href=\"https:\/\/github.com\/SmartThingsCommunity\/smartthings-cli\/releases\"><u>\u0433\u0438\u0442\u0445\u0430\u0431\u0430<\/u><\/a> SmartThingsCommunity. \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f Capability \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 custom-capability \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0433\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Capability:<\/p>\n<p><code>$.\/smartthings capabilities:create -j -i heatingCustom.json<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c json \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e Capability, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e json \u0444\u0430\u0439\u043b\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u0432\u0435\u0440\u0441\u0438\u0435\u0439. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b <em>heatingCustomPresentation.json<\/em> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c UI-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Capability \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>$.\/smartthings capabilities:create -j -i heatingCustomPresentation.json<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u044d\u0442\u0438 \u0448\u0430\u0433\u0438, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0435 Capability, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 Thermostat Heating Setpoint Capability \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u043d\u0438\u044f \u0432 UI \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b, \u043b\u0435\u0433\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0447\u0430\u0441\u0442\u0438, \u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0444\u0430\u0439\u043b\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 Capability. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b smartthings \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b Thermostat Heating Setpoint Capability:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c json Thermostat Heating Setpoint Capability \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b <em>custom.json<\/em><\/p>\n<p><code>$.\/smartthings capabilities thermostatHeatingSetpoint 1 -j -o custom.json<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c json UI-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f Thermostat Heating Setpoint Capability \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b <em>customPresentation.json<\/em><\/p>\n<p><code>$.\/smartthings capabilities:presentation thermostatHeatingSetpoint 1 -j -o customPresentation.json<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f UI-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041e\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3 \u0447\u0430\u0441\u0442\u0435\u0439: Dashboard, Detail View \u0438 Automation. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability \u0432 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435 \u0438 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0447\u0430\u0441\u0442\u0438 Detail View. Detail View \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e Capability. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c, \u0441\u043f\u0438\u0441\u043e\u043a, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438 \u0434\u0440. \u0423 \u043d\u0430\u0441 \u044d\u0442\u043e stepper, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0430\u043c +\/- \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0433\u0440\u0435\u0432\u0430. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 stepper\u2019\u0430 \u0437\u0430\u0434\u0430\u043d \u043e\u0442 0 \u0434\u043e 100 &#8212; \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0438 \u0431\u044b\u043b\u043e \u043d\u0430\u0448\u0435\u0439 \u0446\u0435\u043b\u044c\u044e.\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Detail View \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/capabilities\/display-types\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> capabilities.\u00a0\u00a0<\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/h4>\n<p>\u0412 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Capability \u0438 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0430\u0441\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0431\u043e\u0440 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 Capability. \u041d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043c\u043e\u0436\u043d\u043e, \u043e\u0442\u043c\u0435\u0442\u0438\u0432 \u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0435 \u201cMy capabilities\u201d \u0432\u043c\u0435\u0441\u0442\u043e \u201cSmartThings\u201d:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18c\/fd8\/2d8\/18cfd82d8e5511359fcf4824842ecde8.png\" width=\"798\" height=\"732\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18c\/fd8\/2d8\/18cfd82d8e5511359fcf4824842ecde8.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438\u00a0\u00a0<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 capabilities \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 capabilities. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434. \u0421 \u044d\u0442\u0438\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438. \u041a\u0430\u0436\u0434\u043e\u043c\u0443 Capability \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0430\u0439\u043b-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>iot_caps_helper_{capabilityName}.h<\/em>. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Capability. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443 Capability, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b\u043e\u043c-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e Capability \u043c\u044b \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043e\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e Capability. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430 <em>iot_caps_helper_thermostatHeatingSetpoint.h<\/em> \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c, \u0438\u043c\u0435\u043d\u0435\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<pre><code class=\"cpp\">enum {   CAP_ENUM_THERMOSTATHEATINGSETPOINT_HEATINGSETPOINT_UNIT_F,   CAP_ENUM_THERMOSTATHEATINGSETPOINT_HEATINGSETPOINT_UNIT_C,   CAP_ENUM_THERMOSTATHEATINGSETPOINT_HEATINGSETPOINT_UNIT_MAX };   const static struct iot_caps_thermostatHeatingSetpoint {   const char *id;   const struct thermostatHeatingSetpoint_attr_heatingSetpoint {     const char *name;     const unsigned char property;     const unsigned char valueType;     const char *units[CAP_ENUM_THERMOSTATHEATINGSETPOINT_HEATINGSETPOINT_UNIT_MAX];     const char *unit_F;     const char *unit_C;     const double min;     const double max;   } attr_heatingSetpoint;   const struct thermostatHeatingSetpoint_cmd_setHeatingSetpoint { const char* name; } cmd_setHeatingSetpoint; } caps_helper_thermostatHeatingSetpoint = {   \/\/ \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0438\u043c   \/\/ .id = \"thermostatHeatingSetpoint\",   .id = \"titledouble20168.heatingSetpoint\",   .attr_heatingSetpoint = {     \/\/ \u0415\u0441\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c Capability \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c     \/\/ .name = \"heatingSetpoint\",     .name = \"temperature\",     .property = ATTR_SET_VALUE_MIN | ATTR_SET_VALUE_MAX | ATTR_SET_VALUE_REQUIRED | ATTR_SET_UNIT_REQUIRED,     .valueType = VALUE_TYPE_NUMBER,     .units = {\"F\", \"C\"},     .unit_F = \"F\",     .unit_C = \"C\",     .min = -460,     .max = 10000,   },   \/\/ \u0415\u0441\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c Capability \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c   \/\/ .cmd_setHeatingSetpoint = { .name = \"setHeatingSetpoint\" },   .cmd_setHeatingSetpoint = { .name = \"setTemperature\" }, }; <\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#171;\u0423\u043c\u043d\u044b\u0439 \u0447\u0430\u0439\u043d\u0438\u043a&#187; \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 SmartThings. \u041c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0443\u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c Capability \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e Capability \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430 \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 SmartThings, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0438\u0434\u0435\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/611cbaedabf7c98fe8a33429\" data-style=\"\" id=\"611cbaedabf7c98fe8a33429\" width=\"\"><\/div>\n<h2>\u041e\u0431 \u0430\u0432\u0442\u043e\u0440\u0435<\/h2>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/550\/d55\/81d\/550d5581de624b267cf99718ae20169e.png\" width=\"919\" height=\"1280\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/550\/d55\/81d\/550d5581de624b267cf99718ae20169e.png\"\/><figcaption><\/figcaption><\/figure>\n<p><em>\u041d\u0438\u0435\u0437 \u042e\u043b\u0434\u0430\u0448\u0435\u0432 &#8212; \u0421\u0442\u0443\u0434\u0435\u043d\u0442 \u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u0442\u0443\u0440\u044b \u0418\u0422\u0418\u0421 \u041a\u0424\u0423 \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u044f (\u043f\u0440\u043e\u0444\u0438\u043b\u044c: \u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 FinTech),\u00a0 \u0441\u0442\u0430\u0436\u0451\u0440 \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 Samsung.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/573514\/\"> https:\/\/habr.com\/ru\/articles\/573514\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u00ab\u0423\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430\u00bb \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 Samsung SmartThings. \u0422\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0431\u0449\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043c\u043e\u0433\u0443\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0430\u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u00ab\u0423\u043c\u043d\u044b\u0439 \u0447\u0430\u0439\u043d\u0438\u043a\u00bb. \u041d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0430\u043c \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u00bb \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c. \u041d\u0430 \u0436\u0435\u043b\u0435\u0437\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u044f \u043e\u0431\u043e\u0448\u0435\u043b\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430 \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043a\u0430\u043a \u00ab\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438\u00bb. \u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0448\u0430\u0433\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u043b\u0430\u0442\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 ESP8266 &#8212; \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0436\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0435 Samsung, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0435\u0449\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0443\u043c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u0423\u043c\u043d\u044b\u0439 \u0447\u0430\u0439\u043d\u0438\u043a\u00bb<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 SmartThings \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043b\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c \u00ab\u0443\u043c\u043d\u043e\u0433\u043e \u0447\u0430\u0439\u043d\u0438\u043a\u0430\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u043e\u043c\u00bb \u0438 \u0432\u0438\u0434\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043b\u0430\u043a\u043e SmartThings. \u041e\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SmartThings \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 &#8212; \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043e\u0431\u043b\u0430\u043a\u043e \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:\u00a0<\/p>\n<ul>\n<li>\n<p>\u043f\u043b\u0430\u0442\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 ESP8266 &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <a href=\"http:\/\/wiki.amperka.ru\/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D1%8B:troyka-wi-fi\"><u>Amperka Troyka Wi-Fi<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0445\u0446\u0432\u0435\u0442\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u044c\u0435\u0437\u043e-\u043f\u0438\u0449\u0430\u043b\u043a\u0430\/\u0437\u0443\u043c\u043c\u0435\u0440 (\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b 330 \u041e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0438 \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0430 \u043f\u043e\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u0435\u00bb \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e.\u00a0<\/p>\n<p>\u041d\u0438\u0436\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b:\u00a0<\/p>\n<ul>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u00ab\u0447\u0430\u0439\u043d\u0438\u043a\u0430\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0421\u0431\u043e\u0440\u043a\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435<\/h3>\n<p>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 Wi-Fi \u043f\u043b\u0430\u0442\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 &#8212; Amperka Troyka. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u043e\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430, \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0437\u0443\u043c\u043c\u0435\u0440\u0430 \u043a \u043b\u044e\u0431\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c GPIO \u043f\u0438\u043d\u0430\u043c \u043f\u043b\u0430\u0442\u044b. \u0421\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0428\u0430\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>\u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:\u00a0<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<ul>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c SDK<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0438 (iot-core \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 bsp)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c onboarding_config.json\u00a0<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/strong><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 (2 json \u0444\u0430\u0439\u043b\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/company\/samsung\/blog\/489834\/#%D0%A7%D1%82%D0%BE%20%D0%BF%D1%80%D0%B5%D0%B4%D0%BB%D0%B0%D0%B3%D0%B0%D0%B5%D1%82%D1%81%D1%8F%20%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C\"><u>\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435<\/u><\/a>, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0439\u0442\u0438 \u0435\u0433\u043e. \u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/direct-connected\/get-started\"><u>\u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/u><\/a> \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 SmartThings.<\/p>\n<h2>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 workspace \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<ol>\n<li>\n<p>Capabilities<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f capabilities \u0438 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u041a\u043e\u0434 \u043c\u043e\u0435\u0433\u043e \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 <a href=\"https:\/\/github.com\/flisoch\/SmartThings-Smart-Kettle-Example\"><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/u><\/a> \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0431\u0435 \u0438 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441 \u043a\u043e\u0434\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. API \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 ST SDK \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 <a href=\"https:\/\/github.com\/SmartThingsCommunity\/st-device-sdk-c\/blob\/master\/doc\/APIs.md\"><u>\u044d\u0442\u043e\u0439 <\/u><\/a>\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Capability<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 &#8212; Capability. Capability &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b. Capabilities \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 SmartThings, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 capabilities. \u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e Capability \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0451 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0423 Capability \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438\u043c\u044f, \u0441\u0442\u0430\u0442\u0443\u0441, \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b\/\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u0438 \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0438 \u0432\u0438\u0434\u043d\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\/\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 Capability Thermostat Heating Setpoint. \u042d\u0442\u043e Capability \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u043e\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0433\u0440\u0435\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.\u00a0<\/p>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e Capability \u0432 \u043f\u0440\u043e\u0435\u043a\u0442. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0437\u0430 \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u044d\u0442\u043e Capability, \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043c\u0435\u0435\u0442.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0432\u0441\u0435\u0445 \u0435\u0433\u043e capabilities. \u0421 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u0438\u0434\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 capabilities. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 &#8212; \u0432\u044b\u0431\u0440\u0430\u043d\u043e Capability Thermostat Heating Setpoint, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0437\u0430\u0434\u0430\u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u043e\u043a\u043e\u0448\u043a\u0435.\u00a0<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041e\u043a\u043e\u0448\u043a\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 Capability, \u043d\u043e \u0443\u0436\u0435 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 Capability \u0435\u0441\u0442\u044c <em>id<\/em> = &#171;thermostatHeatingSetpoint&#187;, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <em>heatingSetpoint<\/em> \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <strong>setHeatingSetpoint(setpoint) <\/strong>\u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Capability \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438 \u043a\u0430\u043a\u0438\u043c \u0436\u0435\u043b\u0435\u0437\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439\/\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<\/p>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e Capability \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/developer-preview.smartthings.com\/docs\/devices\/capabilities\/capabilities\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> SmartThings.<\/p>\n<h3>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u0434 \u043d\u0435\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f esp8266 \u0438 Espressif ESP8266 RTOS SDK \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 esp. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u0432\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C.<\/p>\n<h3>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c capabilities \u0438 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0445 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412 \u043a\u0430\u0436\u0434\u043e\u0435 Capability \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u0434\u0440. \u0414\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0438\u043d\u044b \u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h3>\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430<\/h3>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <em>main.c<\/em> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f capabilities \u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439. \u0412 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0415\u0441\u0442\u044c 2 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439: \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0436\u0435\u043b\u0435\u0437\u043e\u043c\/\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430<\/h4>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435\/\u0442\u0430\u0441\u043a\u0435. \u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Capability. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u0438\u0433\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c. \u0418\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u043e\u0436\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c.\u00a0<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043e\u0431\u043b\u0430\u043a\u0430\/\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441 \u043e\u0431\u043b\u0430\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 Capability \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a\u0438. \u041a\u043e\u043b\u0431\u044d\u043a &#8212; \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Capability. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 Capability \u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0412 \u044d\u0442\u0438\u0445 \u043a\u043e\u043b\u0431\u044d\u043a-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e Capability. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e\u0434\u043e\u0433\u0440\u0435\u0432\u0430 \u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u0438\u0433\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.\u00a0<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 Smart Kettle<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/SmartThingsCommunity\/st-device-sdk-c-ref\/tree\/master\/apps\/esp8266\/switch_example\"><u>\u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/u><\/a> \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 ST SDK. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u044f, \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u041d\u043e \u0434\u0435\u043b\u0430\u044f \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044f\u0441\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0431\u044b\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b.<\/p>\n<h4>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>app_main<\/strong>, \u043d\u0430 \u043d\u0435\u0451 \u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0431\u043b\u0430\u043a\u0443 ST:<\/p>\n<pre><code class=\"cpp\">void app_main(void) {   unsigned char *onboarding_config = (unsigned char *) onboarding_config_start;   unsigned int onboarding_config_len = onboarding_config_end - onboarding_config_start;   unsigned char *device_info = (unsigned char *) device_info_start;   unsigned int device_info_len = device_info_end - device_info_start;   int iot_err;   \/\/ st_dev.h   ctx = st_conn_init(onboarding_config, onboarding_config_len, device_info, device_info_len);   if (ctx != NULL) {     iot_err = st_conn_set_noti_cb(ctx, iot_noti_cb, NULL);     if (iot_err)       printf(\"fail to set notification callback function\\n\");   } else {     printf(\"fail to create the iot_context\\n\");   } \/* . . . *\/ } <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e.\u00a0<\/p>\n<pre><code class=\"cpp\">\/\/ onboarding_config_start is null-terminated string extern const uint8_t onboarding_config_start[]   asm(\"_binary_onboarding_config_json_start\"); extern const uint8_t onboarding_config_end[]    asm(\"_binary_onboarding_config_json_end\");   \/\/ device_info_start is null-terminated string extern const uint8_t device_info_start[]    asm(\"_binary_device_info_json_start\"); extern const uint8_t device_info_end[]      asm(\"_binary_device_info_json_end\");   IOT_CTX* ctx = NULL;<\/code><\/pre>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>st_conn_set_noti_cb <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a \u0441\u0442\u043e\u0438\u0442. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0438\u0445.\u00a0<\/p>\n<pre><code class=\"cpp\">static void iot_noti_cb(iot_noti_data_t *noti_data, void *noti_usr_data) {   printf(\"Notification message received\\n\");   if (noti_data->type <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-414265","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414265","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=414265"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414265\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=414265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=414265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=414265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}