Using NFC tag to toggle alarm system on/off

I just set up my Hubitat-based home alarm system and would like to know if it is possible to use a single NFC tag near my door to toggle on/off my alarm system. Ideally, I'd like to tap my phone to the tag on the way out to "arm" the system, then tap the same NFC tag on my return to "disarm" the system. I've not been able to write a single Apple Shortcut app that will seem to do this, but I'm blaming this on my "newbie" status. Is it possible to use one NFC tag that will toggle the state armed/disarmed back and forth whenever touched? (If it is helpful, I have also set up Homebridge to use, if need be...) Thanks!

This may help:

Vettester, thanks for that recommendation. I have looked at that video. It does guide you through setting up a routine where scanning a tag will ARM the system. I'm guessing it is possible to set up a NFC tag so that the SAME tag triggers a toggling of the switch from on to off, and vice versa. I just can't figure out exactly how to do that....

I have a bunch of nfc tags laying around. Let me configure one to do what you want and I’ll get back to you.

I've seen that on web some years back, you can find some video on youtube.
I think they all use Tasker and Sharptools (Smartthings only?)

NFC tag unlock door- smartthings - YouTube
How far can we go with automation? (Integrating NFC tags with SmartThings) - Devices & Integrations - SmartThings Community

Do the toggling in rule machine.

So after playing with this for a bit I found there are several ways to accomplish what you are trying to do. The simplest way is to create a personal shortcut based on the state of Hubitat's HSM with the trigger being the NFC tag. First you'll want to get the state and then use an if statement to set HSM. In the example below the flow goes as follows:

  1. Get the current HSM state
  2. If the state is away set HSM to off
  3. Otherwise set HSM to on

For a noob.
I have an NFC capable android phone. Would I have the NFC tag instruct the phone to send a Maker API call to the hub to activate a virtual switch? Then use the rule machine to toggle HSM based on current state as suggested by Vertester?

1 Like

Vettester, Thank you so much for this! I had something similar that I was trying to get to work, but couldn't figure out all the right steps! Obviously, I've still got a lot to learn about what commands are available.

Sorry for the (no doubt!) really dumb question, but I can't find where the "Set HSM" command that you have used here is located. Can you please give me the steps to find it?

Thank again for your help. You save me a ton of time!

Sorry, it's been a long time since I set this up. I should have mentioned that HSM is actually a keypad device in Hubitat. When a Hubitat keypad is included in homebridge it replicates Hubitat's HSM (Hubitat Safety Monitor).

Edit: You may find this thread useful:

I don't use iPhone or have homebridge. Just Android phone and a HE, but I think you could do this with any NFC capable phone.

I did a little playing around and was able to do what I think you wanted with two rules.
I made a virtual presence sensor (Test Presence)
Set the 1st rule (Toggle Presence Sensor) to trigger with a Local Endpoint that you can trigger with the NFC tag. Then toggle present or not based on current state.


The 2nd rule (Control HSM) is triggered by the change in status of the virtual sensor.

Of course you could do more IF statements or ELSE statement to set away mode or chose to run any of your predefined HSM rules.

I'm a noob at this too.

This is a test... this is only a test... Had this been an actual :slight_smile:

you might need a go between, like "tasker". Tasker is not easy but plenty of how-to videos.

I use an app HTTP Shortcuts to send endpoints up to now. Icons with shortcuts on the phone but haven't tried to trigger it from a tag yet. Waiting for my tags to arrive so I can play.

Finally received some ntags from aliexpress, pretty quick this time like less than 2 weeks.
Did a quick test to use the tag to unlock my kwikset lock (or configure any task form RM)
I use Android apps NFC Tasks for executing tasks and NFC Tools for writing tasks to tags.
Everything Free and very simple to use, unless you want to use advanced tasks.

  1. Create a local end point rule in RM (how to was already posted above by others)
  2. In NFC Tools, create a task to open an url using the local endpoint url
  3. Write the tasks to the tag.
  4. Scan the tag and NFC Tasks will open the local endpoint in the browser and run the rule

It's not exactly clean solution since there is a browser opened up.
Can pay for advanced task that can do a HTTP GET request instead or use the task to open a file (which contains the url) of certain file type and write a very simple Android app that open that file type and issue a silent HTTP request.

I'm using the same apps for my solution. I added the android app Macrodriod (also the free version)
I explained what I did here
Creative NFC Tag Ideas

Hi guys,

Anybody know how to eliminate browser opening? Is very unpleasant every time to open.

Thk,

Are you using tasker? Browser should not open if you use tasker.....

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.