{"id":577,"date":"2021-07-27T11:31:56","date_gmt":"2021-07-27T11:31:56","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=577"},"modified":"2021-07-27T11:31:56","modified_gmt":"2021-07-27T11:31:56","slug":"home-assistant-nfc-enabled-garage-door","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2021\/07\/27\/home-assistant-nfc-enabled-garage-door\/","title":{"rendered":"Home Assistant: NFC Enabled Garage Door"},"content":{"rendered":"\n<p>Now that I&#8217;ve installed <a href=\"https:\/\/www.creatingsmarthome.com\/index.php\/2021\/07\/26\/meross-msg100-garage-door-opener\/\" data-type=\"URL\" data-id=\"https:\/\/www.creatingsmarthome.com\/index.php\/2021\/07\/26\/meross-msg100-garage-door-opener\/\">WiFi controller for my Garage Door<\/a> I&#8217;d though to add some advanced features on it..<\/p>\n\n\n\n<p>Too many times I&#8217;ve gone to the garage and forgot to take the original remote control with me. However, I usually have a phone in my pocket so why not use a Home Assistant app to open the garage door? or even better use an <strong>NFC tag<\/strong> to open it? (Thanks to my neighbour for the idea).<\/p>\n\n\n\n<p>So.. I go to the garage, get a phone off my pocket and tap it to the door frame and the door magically opens!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Requirements<\/h2>\n\n\n\n<p>For this automation you need:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> <a href=\"https:\/\/www.creatingsmarthome.com\/index.php\/2021\/07\/26\/meross-msg100-garage-door-opener\/\" data-type=\"URL\" data-id=\"https:\/\/www.creatingsmarthome.com\/index.php\/2021\/07\/26\/meross-msg100-garage-door-opener\/\">Garage door controllable by Home Assistant<\/a><\/li><li> <a rel=\"noreferrer noopener\" href=\"https:\/\/www.amazon.de\/Sticker-Compatible-Commands-Homekit-Smartphone-White\/dp\/B06XH2R5ZP\/ref=sr_1_1_sspa?dchild=1&amp;keywords=nfc+sticker&amp;qid=1627366684&amp;sr=8-1-spons&amp;psc=1&amp;spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFUR1BNUFpMRkZMTjYmZW5jcnlwdGVkSWQ9QTA2NTI2MTIzMDkzWDJQUjFUN09BJmVuY3J5cHRlZEFkSWQ9QTAzMjQ1NDkzT0w3QUQwNE9ZWUdXJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==\" target=\"_blank\">a NFC sticker<\/a> <\/li><li> Home Assistant app in your Android or iPhone.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"1008\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2021\/07\/20210726_162409.jpg\" alt=\"\" data-id=\"592\" data-full-url=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2021\/07\/20210726_162409.jpg\" data-link=\"https:\/\/www.creatingsmarthome.com\/?attachment_id=592#main\" class=\"wp-image-592\"\/><figcaption class=\"blocks-gallery-item__caption\">NFC Tag glued on the wall<\/figcaption><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"1008\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2021\/07\/20210727_094805.jpg\" alt=\"\" data-id=\"590\" data-full-url=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2021\/07\/20210727_094805.jpg\" data-link=\"https:\/\/www.creatingsmarthome.com\/?attachment_id=590#main\" class=\"wp-image-590\"\/><figcaption class=\"blocks-gallery-item__caption\">Bag of NFC Tags<\/figcaption><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Automation<\/h2>\n\n\n\n<p>For the automations you need to actually create two. One to open the door when it&#8217;s closed and another one to close the door when it&#8217;s open. <\/p>\n\n\n\n<p>But first, write a new NFC Tag with your Home Assistant app by going to &#8220;Menu -&gt; App Configuration -&gt; NFC Tags -&gt; WRITE NFC TAG&#8221;. After writing you should get your &#8220;Tag Id&#8221; so make sure to write it down.<\/p>\n\n\n\n<p>Now go to Home Assistant (Computer preferred) and go to &#8220;Configuration -&gt; Tags -&gt; + ADD TAG&#8221; and create a new tag with your Tag ID.<\/p>\n\n\n\n<p>Now to the fun part, create the automation!<\/p>\n\n\n\n<p>Create new automation and add trigger (scan tag), condition (garage door open\/close) and action (open\/close garage door). Or copy paste these in your automations.yaml and just change the device_id and tag_id \ud83d\ude42<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- id: '1627225410558'\n  alias: 'Garage door tag is scanned (closed)'\n  description: ''\n  trigger:\n  - platform: tag\n    tag_id: d22ad2ea-1da1-43e0-9acf-1d086c460214\n  condition:\n  - condition: device\n    device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7\n    domain: cover\n    entity_id: cover.garage_door\n    type: is_closed\n  action:\n  - device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7\n    domain: cover\n    entity_id: cover.garage_door\n    type: open\n  mode: single\n\n- id: '1627225442700'\n  alias: 'Garage door tag is scanned (open)'\n  description: ''\n  trigger:\n  - platform: tag\n    tag_id: d22ad2ea-1da1-43e0-9acf-1d086c460214\n  condition:\n  - condition: device\n    device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7\n    domain: cover\n    entity_id: cover.garage_door\n    type: is_open\n  action:\n  - device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7\n    domain: cover\n    entity_id: cover.garage_door\n    type: close\n  mode: single\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Security concerns?<\/h2>\n\n\n\n<p>How about security then? For the tag to work the opening person need to have Home Assistant client connected to your Home Assistant server with authenticated user.<\/p>\n\n\n\n<p>Also the tag scanning won&#8217;t work unless your phone is unlocked. So no-one can just take your phone and tap it to the tag with phone locked.<\/p>\n\n\n\n<p>I&#8217;m also restricting access to my Home Assistant from WAN so basically user also has to be connected in my WiFi network for it to work. So I would not be concerned about the security at all \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that I&#8217;ve installed WiFi controller for my Garage Door I&#8217;d though to add some advanced features on it.. Too many times I&#8217;ve gone to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":589,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,100,2],"tags":[105,108,7,111],"class_list":["post-577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guide","category-home-assistant","category-inspiration","tag-automation","tag-garage-door","tag-home-assistant","tag-nfc","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2021\/07\/20210726_162420-2.jpg","author_info":{"display_name":"Toni","author_link":"https:\/\/www.creatingsmarthome.com\/index.php\/author\/topsy\/"},"_links":{"self":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/comments?post=577"}],"version-history":[{"count":12,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/577\/revisions"}],"predecessor-version":[{"id":596,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/577\/revisions\/596"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/589"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}