by anyone » Sun May 15, 2022 10:43 am
I do not mind at all because it gives me the perfect opportunity to share a little more about the solution. Sorry in advance if this is TMI.
These are the tags I bought:
https://www.amazon.com/dp/B075CFXY8V?ref=ppx_yo2ov_dt_b_product_details&th=1All you need are the NFC tags, no additional hardware is needed other than an iOS device. As I type this, these tags are $8.99 for 10 with one day delivery. You will be able to read and write to these tags which is a plus, but the automation I described does not require writing to them.
What I discovered since my initial post is when the Personal Automation is created on the individual iPhones to learn the Tag, you can specific an "Input" value. I now use that to pass the name of the tag. (i.e. FrontDoor, FamilyRoom, NightStand, etc.) to the iOS Shortcut.
So the iOS shortcut I use, now reads the name of device which scanned the tag; "Anyone's iPhone 13", converting that to an alphanumeric value with RegEx so it can be used within Indigo as a variable name. (i.e. "AnyonesiPhone13"). It then updates
that variable in Indigo with the Input value passed to it, which is the name of the Tag.
- Code: Select all
2022-05-10 21:19:59.528 Web Server request to set variable "AnyonesiPhone13" value to "FrontDoor" from ###.#.##.####
Doing it this way allows you too easily know who scanned the tag, and create automations based on that. You just need to set triggers to monitor the different device name variables you setup and look for changes to them.
As an example, when the "SpousesiPhoneSE" variable changes, I perform the automation my spouse wants for that NFC Tag which may or may not be different from the automation I want.
Here is an example of the shortcut I use:
https://www.icloud.com/shortcuts/38d9659127e141ae8f741a3d3e9b6fd2Unfortunately you can't share Automations associated with the Tags, but mine are simple, its
Vibrate Device, Text and Run Shortcut (with Input of Text)You can share the shortcut just as I've done above between iOS devices, so you don't have to recreate it for each device. The shortcut is reusable so this only needs to be done once. After that's done, you just need to create Automation for each tag you want to use.
Here is a tutorial, if needed, on how to setup NFC Tags:
https://9to5mac.com/2022/02/04/homekit-weekly-how-to-create-nfc-automations-for-homekit-using-shortcuts-and-1-tags/
I do not mind at all because it gives me the perfect opportunity to share a little more about the solution. Sorry in advance if this is TMI.
These are the tags I bought: [url]https://www.amazon.com/dp/B075CFXY8V?ref=ppx_yo2ov_dt_b_product_details&th=1[/url]
All you need are the NFC tags, no additional hardware is needed other than an iOS device. As I type this, these tags are $8.99 for 10 with one day delivery. You will be able to read and write to these tags which is a plus, but the automation I described does not require writing to them.
What I discovered since my initial post is when the Personal Automation is created on the individual iPhones to learn the Tag, you can specific an "Input" value. I now use that to pass the name of the tag. (i.e. FrontDoor, FamilyRoom, NightStand, etc.) to the iOS Shortcut.
So the iOS shortcut I use, now reads the name of device which scanned the tag; "Anyone's iPhone 13", converting that to an alphanumeric value with RegEx so it can be used within Indigo as a variable name. (i.e. "AnyonesiPhone13"). It then updates [b]that[/b] variable in Indigo with the Input value passed to it, which is the name of the Tag.
[code]2022-05-10 21:19:59.528 Web Server request to set variable "AnyonesiPhone13" value to "FrontDoor" from ###.#.##.####[/code]
Doing it this way allows you too easily know who scanned the tag, and create automations based on that. You just need to set triggers to monitor the different device name variables you setup and look for changes to them.
As an example, when the "SpousesiPhoneSE" variable changes, I perform the automation my spouse wants for that NFC Tag which may or may not be different from the automation I want.
Here is an example of the shortcut I use: [url]https://www.icloud.com/shortcuts/38d9659127e141ae8f741a3d3e9b6fd2[/url]
Unfortunately you can't share Automations associated with the Tags, but mine are simple, its [b]Vibrate Device, Text and Run Shortcut (with Input of Text)[/b]
You can share the shortcut just as I've done above between iOS devices, so you don't have to recreate it for each device. The shortcut is reusable so this only needs to be done once. After that's done, you just need to create Automation for each tag you want to use.
Here is a tutorial, if needed, on how to setup NFC Tags: [url]https://9to5mac.com/2022/02/04/homekit-weekly-how-to-create-nfc-automations-for-homekit-using-shortcuts-and-1-tags/[/url]