Home Assistant: NFC Enabled Garage Door

Now that I’ve installed WiFi controller for my Garage Door I’d though to add some advanced features on it..

Too many times I’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 NFC tag to open it? (Thanks to my neighbour for the idea).

So.. I go to the garage, get a phone off my pocket and tap it to the door frame and the door magically opens!

Requirements

For this automation you need:

Automation

For the automations you need to actually create two. One to open the door when it’s closed and another one to close the door when it’s open.

But first, write a new NFC Tag with your Home Assistant app by going to “Menu -> App Configuration -> NFC Tags -> WRITE NFC TAG”. After writing you should get your “Tag Id” so make sure to write it down.

Now go to Home Assistant (Computer preferred) and go to “Configuration -> Tags -> + ADD TAG” and create a new tag with your Tag ID.

Now to the fun part, create the automation!

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 🙂

- id: '1627225410558'
  alias: 'Garage door tag is scanned (closed)'
  description: ''
  trigger:
  - platform: tag
    tag_id: d22ad2ea-1da1-43e0-9acf-1d086c460214
  condition:
  - condition: device
    device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7
    domain: cover
    entity_id: cover.garage_door
    type: is_closed
  action:
  - device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7
    domain: cover
    entity_id: cover.garage_door
    type: open
  mode: single

- id: '1627225442700'
  alias: 'Garage door tag is scanned (open)'
  description: ''
  trigger:
  - platform: tag
    tag_id: d22ad2ea-1da1-43e0-9acf-1d086c460214
  condition:
  - condition: device
    device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7
    domain: cover
    entity_id: cover.garage_door
    type: is_open
  action:
  - device_id: 81bcc36ea8c14cea06f5b3ac9ed7d9a7
    domain: cover
    entity_id: cover.garage_door
    type: close
  mode: single

Security concerns?

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.

Also the tag scanning won’t work unless your phone is unlocked. So no-one can just take your phone and tap it to the tag with phone locked.

I’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 🙂

Leave a Reply

Your email address will not be published.