NFC(Near-Field Communication) has been around for a long time and I have not given its application to the smart home much thought until I came across the Handy Home Assistant NFC Automations video post by MarkWattTech some months back. To summarise, you have the ability to scan these NFC tags and integrate them with Home Assistant to create different automations around the house of office.
What Type of Automations?
Yes, this may seem like we are reinventing the wheel as the Home Assistant Application itself or smart switches and PIR sensors around the house can also perform the same function but in all honesty, I have just found it so convenient for a lot of the smaller mundane automations around the house.
- Play your favourite music playlist on a preferred speaker around the house.
- Dogfood container. So that when empty and scanned to add it to the shopping list.
- Announce present messages via Google Home. (Kids, Noise Levels Down; Shower Time; Supper Time)
- Activate your morning and night routines.
- Open or close your Automated Garage Door or Gate.
- Turn a lamp with a smart bulb on or off.
Is it secure?
The NFC tag itself does not store any sensitive information so placing them around the home to create simple automations does not pose any risk of making your Home Assistance instance vulnerable. For example, if you had to place a tag at the entrance of your family room to start a music playlist it would only be possible to do so with an approved phone which is registered to your Home Assistant instance. Your Apple or Android phones also need to be unlocked first to scan the tags which adds another layer of security. There is still a risk of someone potentially trying to re-write one of your tags to create other actions outside of Home Assistant but hopefully we can rely on our guests not to do so. For this there may also be the option of overcoming by write protecting the tags. I have not researched on that front but perhaps this can be a future update to this post to confirm. So, with this all said let us get started with the extensive list of hardware requirements you will need for this project…
You will need this
- Home Assistant – https://www.milney.co.za/collections/the-milney/products/milney-hub
- Home Assistant sidekick application install on your Smartphone – https://www.home-assistant.io/integrations/mobile_app
- A smartphone capable of reading NFC tags. (For Apple. iPhone XS, XR iPhone 11, 12 or later support background NFC tag reading.)
- NFC Tags
Then Program the NFC Tag
Ensure that you have your Home Assistant application installed at this stage and logged in with your Home Assistant Credentials.
- Open The Home Assistant Application followed by navigating to Configuration.
- Select Tags
- Add a new Tag
- Generate a Name for your Tag.
- Scan Tag
- Confirmation of Tag Written
For my automation example with the scanned Tag I will be using it to toggle a LED light
- Select the Create Automation option
- The Trigger is set by default so I will navigate to Action.
- Actions is set to Call Service
- Service is set to Light.Toggle
- Select the Entity which you choose to control with the tag.