{"id":298099,"date":"2020-02-02T21:00:22","date_gmt":"2020-02-02T21:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298099"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-02-02T21:00:22","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298099","title":{"rendered":"\u0414\u0430\u0442\u0447\u0438\u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432\u0438\u0434\u0435\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 Home Assistant \u043d\u0430 Raspberry pi"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486654\/\">\u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Home Assistant (\u0434\u0430\u043b\u0435\u0435 \u2013 HA) \u043d\u0430 Raspberry pi \u0438 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0432\u0438\u0434\u0435\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0441\u043d\u0438\u043c\u043a\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u201c\u043e\u0445\u0440\u0430\u043d\u044b\u201d.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u0447\u0442\u043e \u0436\u0435 \u044f \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u201c\u043f\u043e\u043d\u0430\u0434\u0435\u043b\u0430\u043b \u043d\u0435 \u0442\u0430\u043a\u201d, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u043f\u0443\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430: \u201c\u0431\u0435\u0437 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0435\u043a\u201d, \u201c\u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439\u201d \u0438 \u201c\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439\u201d. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u044b, \u0441\u043a\u0430\u0447\u0430\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/ViaMyBox.com\/downloadpage\" rel=\"nofollow\">https:\/\/ViaMyBox.com\/downloadpage<\/a> \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 Raspberry pi, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c zip \u0441 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0441 \u0433\u0438\u0442\u0445\u0430\u0431 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0440\u043e\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c HA docker \u043e\u0431\u0440\u0430\u0437 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 (sudo via-setup.sh), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0443\u0442\u044c \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u201c\u0432\u0441\u0435 \u043f\u043e-\u0441\u0432\u043e\u0435\u043c\u0443\u201d: \u0432\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0441 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 githab \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u043b\u0438 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 Home Assistant (HA). \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f yaml \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0449\u0438\u0445 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u201c\u043e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430\u201d \u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f. \u0418 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, Home Assistant \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0441\u043d\u0438\u043c\u043a\u0438 \u043f\u043e \u043f\u043e\u0447\u0442\u0435. \u042f \u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e yaml \u0438\u043b\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f Home Assistant, \u043d\u043e, \u0441\u043b\u0435\u0434\u0443\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u0435\u0439 \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f, \u044f \u0432\u044b\u043b\u043e\u0436\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0434\u0435\u0441\u044c \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 bash \u0438\u043b\u0438 python \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0422\u043e\u043b\u044c\u043a\u043e Home Assistant. \u041d\u043e \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u2014 \u0412\u0435\u043b\u043a\u0430\u043c!<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u0443 \u043c\u0435\u043d\u044f \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a (\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435):<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3u\/ol\/s8\/3uols87hy7mnocdgbj-k-mfbp-a.jpeg\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/v9\/ib\/8s\/v9ib8sthumy5p5hphabioyvr1ie.jpeg\"><\/p>\n<p>  \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Raspberry pi \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0418 \u043c\u043e\u0439 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u044d\u0442\u043e \/usr\/share\/hassio\/homeassistant\/. \u041f\u0443\u0442\u044c \u043a \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043c\u043e\u0435\u0433\u043e \u043f\u0443\u0442\u0438. \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u044f\u043b Home Assistant 0.101.3. \u041d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438: configuration.yaml \u0438 automation.yaml.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0435\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 Home Assistant dashboard -&gt; Configuration -&gt; Server Controls -&gt; Check Config. \u0418 \u0437\u0430\u0442\u0435\u043c, \u0442\u0430\u043c \u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u043c Reload Automations \u0438 Reload Scripts, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0418, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f, \u2014 Server Management restart \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0442\u043e\u0447\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f HC-SR501 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a GPIO \u0448\u0438\u043d\u0435 Raspberry pi. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u043a GPIO, \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0434\u0430\u0442\u0447\u0438\u043a \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438. \u0414\u0430\u0442\u0447\u0438\u043a \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430: \u043f\u0438\u0442\u0430\u043d\u0438\u0435 gcc(+), \u043d\u043e\u043b\u044c gnd(-), \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 (data). \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c GPIO, \u044f \u043a \u0441\u0432\u043e\u0435\u0439 \u043c\u0430\u043b\u0438\u043d\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041a GPIO \u0440\u0430\u0437\u044a\u0435\u043c\u0443 \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b hc-sr501: pin#2 \u2013 5.5vvcc; pin#26 (13\u0440\u044f\u0434) \u2013 data \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0438 pin#6 \u2013 gnd(-) \u0434\u0430\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0444\u043e\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043b\u0438\u0431\u043e usb \u043a\u0430\u043c\u0435\u0440\u0443, \u043b\u0438\u0431\u043e csi \u043a\u0430\u043c\u0435\u0440\u0443 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 mjpg-streamer. \u041a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c mjpg-streamer \u043d\u0430 Raspberry pi, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u0438\u043d\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 <a href=\"https:\/\/github.com\/cncjs\/cncjs\/wiki\/Setup-Guide:-Raspberry-Pi-%7C-MJPEG-Streamer-Install-&amp;-Setup-&amp;-FFMpeg-Recording\" rel=\"nofollow\">\u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u0422\u0430\u043c \u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0438 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u0442\u043e\u0441\u043d\u0438\u043c\u043a\u043e\u0432 \u0438 \u0432\u0438\u0434\u0435\u043e. \u0412\u0435\u0434\u044c \u043a\u0430\u043a\u043e\u0439 bash \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a HA, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435, \u0440\u0435\u0448\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043c.<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0432 configuration.yaml, \u0441\u043a\u0430\u0436\u0435\u043c \u0442\u0430\u043a, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"plaintext\">sudo nano \/usr\/share\/hassio\/homeassistant\/configuration.yaml<\/code><\/pre>\n<p>  \u0445\u043e\u0442\u044f \u0447\u0435\u0440\u0435\u0437 notepad++ \u0441 winscp \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435\u2026<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043b\u044f HC-SR501 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">binary_sensor:   - platform: rpi_gpio     #name: HC-SR501     ports:       7: Sensor HC-SR501     invert_logic: false <\/code><\/pre>\n<p>  \u041d\u0430\u0434\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0433\u0440\u0430\u044e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c (data) \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432: pin#7<\/p>\n<p>  ports:<\/p>\n<p>  7: Sensor HC-SR501<\/p>\n<p>  \u0412 Home Assistant \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430. \u041e\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c configuration.yaml, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c: <a href=\"https:\/\/www.home-assistant.io\/integrations\/manual\/\" rel=\"nofollow\">www.home-assistant.io\/integrations\/manual<\/a><\/p>\n<pre><code class=\"plaintext\">alarm_control_panel:   - platform: manual     name: Home Alarm     pending_time: 60      delay time 40      triggered:     pending_time: 0     code: 1234 <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 60 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0434\u043e\u043c\u0430 (\u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f), \u0438 40 \u0441\u0435\u043a\u0443\u043d\u0434 \u2014 \u0434\u043b\u044f \u0435\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c 1234) \u043f\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0434\u043e\u043c\u043e\u0439. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0443\u0445\u043e\u0434\u0438\u0448\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0448\u044c.)<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u043c configuration.yaml (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 switch \u2013 command_line \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/www.home-assistant.io\/integrations\/switch.command_line\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"plaintext\"> - platform: command_line    switches:       start_stop_motion_rec_timelapse:         friendly_name: 'Record motion timelapse video'         command_on: 'curl http:\/\/localhost\/start_mjpgstrm.php  &amp;&amp; curl http:\/\/localhost\/\/rec-motion-mjpg.php'         command_off: 'curl http:\/\/localhost\/stop_mjpgstrm.php &amp;&amp; curl http:\/\/localhost\/rec-motion-mjpg-stop.php'  <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0432\u044f\u0437\u0430\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f command_on \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f command_off \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0441 \u043a\u0430\u043c\u0435\u0440\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f command_on \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e 2 \u0441\u043a\u0440\u0438\u043f\u0442\u0430. \u042d\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a mjpg-streamer \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0443 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 php \u0444\u0430\u0439\u043b \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 Raspberry pi. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b nginx \u0438 web \u0434\u043e\u0441\u0442\u0443\u043f, \u0438 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 http:\/\/&lt;ip \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0439 Raspberry pi&gt;\/start_mjpgstrm.php \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448 php \u0441\u043a\u0440\u0438\u043f\u0442. \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a mjpg-streamer-\u0430.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 web \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c. \u041e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u043e, \u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f HA \u043d\u0430 docker, \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f docker \u0441\u0440\u0435\u0434\u0430 \u0438 \u201c\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440\u201d \u041e\u0421 \u044f \u043c\u043e\u0433\u0443 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043e\u0431\u0440\u0430\u0442\u0438\u0432\u0448\u0438\u0441\u044c \u0447\u0435\u0440\u0435\u0437 php \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0430\u0439\u0442\u0443. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0435\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0432\u0435\u0440\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043e\u0442 docker \u0438\u043b\u0438 HA \u0433\u0443\u0440\u0443. \u041f\u0438\u0448\u0438\u0442\u0435, \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c!<\/p>\n<p>  \u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u043f\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0435\u0439, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 Home Assistant.<\/p>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 start_stop_motion_rec_timelapse \u041e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448\u0438\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j4\/jb\/kz\/j4jbkzlnslehtgai7ak93blgqnm.jpeg\"><\/p>\n<p>  \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0435 Home Assistant -&gt; Overwiew, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0432 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u0440\u0435\u0436\u0438\u043c\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Configure UI<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s5\/r8\/31\/s5r831pi5yqbp6zpph6gy_yen2g.jpeg\"><\/p>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 HA \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u201cConfiguration -&gt; Server Control\u201d \u0434\u043b\u044f \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e configuration.yaml.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0436\u0435\u043b\u0442\u044b\u0439 \u043f\u043b\u044e\u0441 \u0432\u043d\u0438\u0437\u0443 \u043e\u043a\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443 Entities \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a \u043a\u0430\u0440\u0442\u0430\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/t5\/6c\/i_\/t56ci_fwyo5z_vojj6iywesnwno.png\"><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 sensor. \u041e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hi\/h-\/9d\/hih-9d8acqpf9lxmub8pqpxbm2y.jpeg\"><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u0435 entity \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c: switch.start_stop_motion_rec_timelapse.<\/p>\n<p>  \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0443 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u201d\u043e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430\u201d. \u0418, \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u043e\u043d \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>  \u041d\u0443 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, alarm panel \u043a\u0430\u0440\u0442\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m-\/om\/ob\/m-omobeh7bj-auliurl9abujbhw.png\"><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Home Assistant \u043a\u0430\u043a docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430. \u0412\u0435\u0434\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 docker \u0442\u043e\u043c\u0430. \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a: \u041f\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: \/config\/scripts\/ \u041f\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u041e\u0421: \/usr\/share\/hassio\/homeassiatnt\/scripts. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u044d\u0442\u0438 \u0442\u043e\u043c\u0430 \u0432 \u043f\u043e\u043b\u0435 Binds. \u0415\u0441\u043b\u0438 HA \u0443 \u0432\u0430\u0441 \u0442\u0430\u043c.<\/p>\n<pre><code class=\"plaintext\">sudo docker inspect homeassistant|less <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430: \u044f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (timelapse snapshots), \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e \u0431\u044b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0438 \u0441\u043d\u0438\u043c\u043e\u043a. \u042f \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0444\u043e\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (timelapse snapshots) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e mjpg-streamer curl <a href=\"http:\/\/localhost\/start_mjpgstrm.php\" rel=\"nofollow\">localhost\/start_mjpgstrm.php<\/a>, \u0441\u0442\u0430\u0440\u0442\u0443\u044e php: \u0441url <a href=\"http:\/\/localhost\/rec-motion-mjpg.php\" rel=\"nofollow\">http:\/\/localhost\/rec-motion-mjpg.php<\/a>. \u041e\u043d, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 python script mov.py. \u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u0432\u044f\u0437\u043a\u0438 \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0418 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 takeSnapshotWebcam.sh \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043d\u0438\u043c\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043e\u0442\u0441\u044b\u043b\u0430\u044e \u0432 \u043f\u0438\u0441\u044c\u043c\u0435. \u042d\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0432 \u043d\u0430\u0448\u0435\u043c configuration.yaml \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">shell_command: #\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u043d\u0438\u043c\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438   take_snapshot_webcam: '\/config\/scripts\/takeSnapshotWebcam.sh' #\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u043d\u0430\u0448 mjpg-streamer    start_mgpg_streamer: 'curl http:\/\/localhost\/start_mjpgstrm.php' #\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c mjpg-streamer   stop_mgpg_streamer: 'curl http:\/\/localhost\/stop_mjpgstrm.php' #\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u043d\u0438\u043c\u043a\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 5 \u0441\u0435\u043a   start_motion_rec: 'curl http:\/\/localhost\/rec-motion-mjpg.php' #\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e   stop_motion_rec: 'curl http:\/\/localhost\/rec-motion-mjpg-stop.php' <\/code><\/pre>\n<p>  \u0422\u0430\u043c \u0436\u0435 \u0432 configuration.yaml \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<pre><code class=\"plaintext\">notify:   - name: ha_sendmail     platform: smtp #\u0435\u0441\u043b\u0438 \u043f\u043e\u0447\u0442\u0430 \u043d\u0430  gmail     server: smtp.gmail.com     port: 587     timeout: 15 #\u043e\u0442 \u043a\u043e\u0433\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c     sender: user@gmail.com     encryption: starttls     username: user@gmail.com     password: passwd #\u043a\u043e\u043c\u0443 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c (\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u044f\u0449\u0438\u043a \u0438 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442)     recipient:       - user@gmail.com     sender_name: My Home Assistant <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442! \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 HA \u0441\u043c\u043e\u0433 \u0437\u0430\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u0430 (\u043f\u043e\u043b\u0435 sender), \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0430 gmail \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c \u044f\u0449\u0438\u043a\u043e\u043c \u043d\u0430\u0448\u0435\u043c\u0443 HA \u0441\u0435\u0440\u0432\u0438\u0441\u0443. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/myaccount.google.com\/lesssecureapps\" rel=\"nofollow\">myaccount.google.com\/lesssecureapps<\/a><\/p>\n<p>  \u0418 \u0434\u0430\u043b\u0435\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0430\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 home_alarm \u0432 automation.yaml:<\/p>\n<pre><code class=\"plaintext\">#\u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (alias) \u201c\u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0443, \u0435\u0441\u043b\u0438 \u043e\u0445\u0440\u0430\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430\u201d - alias: 'Trigger alarm while armed away' #alias \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u0442\u0447\u0438\u043a \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u201con\u201d   trigger:      - platform: state       entity_id: binary_sensor.sensor_hc_sr501       to: 'on' #\u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0445\u0440\u0430\u043d\u044b \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043b\u044e\u0434\u0435\u0439 \u0434\u043e\u043c\u0430 \u201carmed away\u201d   condition:     - condition: state       entity_id: alarm_control_panel.home_alarm       state: armed_away #\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435    action: #\u0417\u0430\u043f\u0443\u0441\u043a mjpg-streamer (\u0435\u0441\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d)     - service: shell_command.start_mgpg_streamer #\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0440\u0438\u043f\u0442\u0430, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0441 \u043a\u0430\u043c\u0435\u0440\u044b     - service: shell_command.start_motion_rec #\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u201c\u041e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430 \u201d \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 HA \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u201c\u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u201d     - service: alarm_control_panel.alarm_trigger       entity_id: alarm_control_panel.home_alarm <\/code><\/pre>\n<p>  C\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u2014 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u201c\u043e\u0445\u0440\u0430\u043d\u044b\u201d \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e:<\/p>\n<pre><code class=\"plaintext\">- alias: 'Send notification when alarm is Disarmed'   trigger:     - platform: state       entity_id: alarm_control_panel.home_alarm       to: 'disarmed'   action:     - service: shell_command.stop_mgpg_streamer     - service: shell_command.stop_motion_rec     - service: persistent_notification.create       data:        message: The alarm is Disarmed at {{ states('sensor.date_time') }}&quot; <\/code><\/pre>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u0432\u044f\u0437\u043a\u0430 \u2013 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u0444\u043e\u0442\u043e:<\/p>\n<pre><code class=\"plaintext\">- alias: 'Send notification when alarm triggered'   trigger:     - platform: state      entity_id: alarm_control_panel.home_alarm      to: 'triggered'   action:     - service: persistent_notification.create       data:        message: Notification when alarm triggered. Motion sensor HC-SR501 detected.     - delay:        seconds: 4 #\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430     - service: script.webcam_snapshot #\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0432 configuration.yaml: notify.ha_sendmail     - service: notify.ha_sendmail       data:         title: 'Intruder alert'         message: '{{now().strftime(&quot;%H:%M %Y-%m-%d&quot;)}}:Notification when alarm triggered. Motion sensor HC-SR501 detected.'         data:            images: # \u0441\u0441\u044b\u043b\u043e\u0447\u043a\u0430 \u043d\u0430 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c script.webcam_snapshot  \u0441\u043d\u0438\u043c\u043e\u043a               - \/config\/camera\/snapshot.jpg <\/code><\/pre>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 yaml \u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u0430\u0436\u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0441\u0442\u0440\u043e\u043a, \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0438\u0433\u0440\u0430\u044e\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430, \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 yaml \u0447\u0435\u0440\u0435\u0437 Home Assistant (\u0434\u0430\u043b\u0435\u0435 HA) Configuration -&gt; Server Controls -&gt; Check Config.<\/p>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0432\u0441\u0435, \u0438 \u0432\u0430\u0448 Raspberry pi \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0435 \u2026 \u0435\u0441\u043b\u0438 \u043c\u043e\u043b\u043d\u0438\u044e \u043d\u0435 \u0437\u0430\u0435\u043b\u043e!)<\/p>\n<p>  \u0412\u043e\u0442 \u043e\u043d\u0430 \u2013 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f HA, \u041d\u0410\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438! \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043c\u043d\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443!<\/p>\n<p>  \u0418, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <a href=\"https:\/\/viamybox.com\/downloadpage\" rel=\"nofollow\">https:\/\/viamybox.com\/downloadpage<br \/>  <\/a><br \/>  <a href=\"https:\/\/github.com\/viatc\/viamybox\" rel=\"nofollow\">https:\/\/github.com\/viatc\/viamybox<\/a><\/p>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0434\u0435\u0441\u044c: <br \/>  <a href=\"https:\/\/viamybox.com\/en\/files-post-movsensalrm-2-2\" rel=\"nofollow\">automation.yaml, configuration.yaml, takeSnapshotWebcam.sh, rec-motion-mjpg.php, mov.py<\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/486654\/\"> https:\/\/habr.com\/ru\/post\/486654\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486654\/\">\u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Home Assistant (\u0434\u0430\u043b\u0435\u0435 \u2013 HA) \u043d\u0430 Raspberry pi \u0438 \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0432\u0438\u0434\u0435\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0445\u0440\u0430\u043d\u044b \u0434\u043e\u043c\u0430 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0441\u043d\u0438\u043c\u043a\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u201c\u043e\u0445\u0440\u0430\u043d\u044b\u201d.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u0447\u0442\u043e \u0436\u0435 \u044f \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u201c\u043f\u043e\u043d\u0430\u0434\u0435\u043b\u0430\u043b \u043d\u0435 \u0442\u0430\u043a\u201d, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u043f\u0443\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430: \u201c\u0431\u0435\u0437 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0435\u043a\u201d, \u201c\u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439\u201d \u0438 \u201c\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439\u201d. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u044b, \u0441\u043a\u0430\u0447\u0430\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/ViaMyBox.com\/downloadpage\" rel=\"nofollow\">https:\/\/ViaMyBox.com\/downloadpage<\/a> \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 Raspberry pi, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c zip \u0441 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0441 \u0433\u0438\u0442\u0445\u0430\u0431 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0440\u043e\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c HA docker \u043e\u0431\u0440\u0430\u0437 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 (sudo via-setup.sh), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0443\u0442\u044c \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u201c\u0432\u0441\u0435 \u043f\u043e-\u0441\u0432\u043e\u0435\u043c\u0443\u201d: \u0432\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0441 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 githab \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u043b\u0438 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298099","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298099","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=298099"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298099\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}