How-To: Program NFC Tags/Stickers For Automations In Hubitat

Thank you sooooo much. Very much appreciated.

Great explanations and easy to follow.

1 Like

Thank you!
If possible come back and share your use case, so others can learn from it.

I assume on iOS you can do a “get contents of url” Siri shortcut for the end point?

You are correct, I just tried it on my iPad by creating a simple automation using my wifi connection, When my iPad joins "WIFI1" get contents of URL, and it triggered a light.

This :point_up_2:t2:.

Just made the $2.99 purchase and there seems to be no change in the apps functionality. I've sent a support request to the developer to see if maybe I'm doing something wrong... Likely looking to get refunded.

Just tried this and it works! :tada:

The below assumes you already have your endpoint and automation created in Hubitat. Also, you don't need to program the NFC tag to actually do anything, iOS just needs to detect the tag. :+1:t2:

The steps are as follows:

  1. On your iPhone with iOS 13 or greater, open the Shortcuts app

  2. On the Automation tab, select the :heavy_plus_sign: button in the top right corner of the screen

  3. Select Create Personal Automation

  4. Select NFC

  5. On the next page, tap the Scan button, and place the tag near the top of your iPhone to read the tag

  6. Name the tag in the text field that shows after scanning

  7. In the top right of the screen, tap Next to set up the automation you wish to run when this tag is scanned

  8. Select Add Action

  9. Search for and select URL

  10. Paste the endpoint URL into the field

  11. If Get Contents of URL is one of the suggestions, select that, else search for URL again and select

  12. It should look like the above pic if you've done things in this order (it needs to be after the URL and "linked"

  13. Tap Next

  14. Disable Ask Before Running (if you don't want to be asked)

  15. Select Done

  16. Tap your phone on the tag

  17. Profit

@moh FYI

5 Likes

Very nice! And much, much more secure than writing a URL into the NFC tag.

Very nice writeup! That should help some iOS users for sure!

2 Likes

@Hubirat sounds like you have an excellent write-up there, would you mind if I pinned it to my original post so other users can find it quickly?

1 Like

@Hubirat , thank you so much (and great documentation as well)! Unfortunately, I had already tried to do this via my own research on this back when I posted my original question. Although I am on iOS 15.7.1 (and so according to Apple should work since this is supposed to work with iOS 13, if you can believe it, I am still going strong with my iPhone7plus (I know, try not to laugh too loud, LOL)! In the shortcuts menu automation tab, the NFC tag option does not show up under the Create Personal Automation button. Works on my wife and son’s iPhone 13s but not on my “ancient” 7. Should probably upgrade but I use my phone as a utility tool/appliance, and it works just fine for my purposes (except of course in the case of shortcuts linked to NFC automations).

All that being said, thank you for your excellent documentation. This is exactly the procedure I used for my wife’s phone but I did not go through the trouble (as you graciously did) to document this. Many in the Community will benefit from your excellent notes. Thank you on behalf of all that will find this useful!

1 Like

you must use a device (iPhone, iPad, android) that has a NCF chip inside. The oldest list I see that has NFC is the iPhone 11 and it's brethren (SE, Xs...).

Hi @moh, this chart shows what iPhones are NFC-enabled?

image

1 Like

Thanks @william2 , I believe your chart is correct. I think that since the 7+ does not allow reading in the background, it therefore cannot use shortcuts which would then allow for performing tasks without having to have them exposed on the tag itself? I was disappointed since the 7+ was advertised as being NFC enabled (not knowing that it was only NFC enabled through third party apps). Oh well. Just have to wait until the battery life starts to fail. Thanks for the info and your help!

When using the NFC tag, does a web browser have to open in order to trigger it, or do i have some setting wrong? I put my phone to the NFC tag, my browser opens, and the automation runs. I dont' have to interact with my phone, other than to eventually close the browser with the end point.

Hi, if you are using NFC Tools you need to go to the networks and choose HTTP GET, otherwise it will open your browser.

I was just editing my post when i noticed yours. I'm using a different(free) app, and that's likely why i can't do it the same. HTTP Get isn't an option, and i'm not sure i want to buy the Pro version of NFC Tools at this time. So, i might be out of luck.

Not necessarily, what app are you using?

NFC Toolkit (android)

I've been testing several NFC programs in trying to find one that allows http GET, but I haven't been successful.

Are you using an iPhone? If so, have you tried using iOS Shortcuts?

Nope, I'm on Andriod, my comment was for @sahamilton9864

1 Like