Hass NFC - Control Home Assistant with NFC tags

Hm that sounds interesting. Since I can’t root my phone, would it be ‘reproducible’ to have a normal phone with the screen on, and scan a tag with a specific setting that requires fingerprint auth? I’ll have to see if I can make a little pop-up that prompts you to do this. Not sure if this works if your screen is not on in your case though…

I’ll put it on my list. Hopefully I can come up with something nice for you.

Sounds like a cool use case!

The rooted scenario I don’t think needs to be addressed at all. It’s totally sufficient to have normal phone, screen on/unlocked, and upon successful scan the app prompt the fingerprint popup. The fingerprint popup I think is built-in to Android – same one used by bank logins, cash apps, etc.

Like this:
image

Here’s a random link I found regarding adding to app (hope it helps): https://medium.com/commencis/integrate-fingerprint-authentication-into-your-android-apps-dcb977b2e846

1 Like

Ah yes, finally someone that accepts the possibility of rooting their phone. I wasn’t going to mention it explicitly…every time I mention rooting to people they brush me off :man_shrugging:

Anyways, not sure if simply rooting will grant you this, or if it’s a simple settings change. For me, it’s a built-in setting in Superman Rom for Galaxy S7 G930F. Perhaps you can find a patch somewhere, or a rom to use.

Cheers, that should help me for sure! I’m hoping to look into it tomorrow. Hopefully it works with an Android emulator so I don’t have to use my phone all the time.

I’ll keep you guys posted!

I’m glad to test, lemme know.

Thanks btw!!

I have just pushed Hass NFC 1.1.0 to the Play Store. In this release I’ve added basic fingerprint protection, and started working on translations. For now I’ve added Dutch (since it’s my main language). If you would like to see Hass NFC in your own language please let me know so you can help me translate.

To get the fingerprint protection to work, you will have to write the tag again. Sorry about that, but I couldn’t think of a better solution. There’s a switch you can enable for both write and advanced write. Only Hass NFC 1.1.0 and higher will read the extra setting. Older versions of the app will simply ignore it.

Let me know what you guys think! It might not look that great right now, but I can finish that later. I didn’t manage to get only a dialog to pop up, it always has a white page behind it for some reason. I hope that’s something I can fix later on.

I’ve been able to test it on Android 8 and 9 only, so if you happen to have Android 6-7 I’d like to know if it works. Android 5 and lower will not support the fingerprint detection.

edit: Just uploaded 1.1.1 with improved Dutch translations.

ralfaro, Klagio Let me know what you guys think if you get the chance to try it out this weekend. :slight_smile:

It works! Used it today :sunglasses: I do have a suggestion though. On the fingerprint screen, add a cancel button and/or allow the phone’s back button to cancel and leave that screen.

Good to hear it works. That’s indeed a good idea. I’ll work on that.

Looks like a great App! I would like to help you translate the app into the German language.
If you are interested I will be glad to help you :slightly_smiling_face:

Great, thanks! Could you send me a PM with an email address I can reach you on? I will then send a file you can translate. I hope you don’t mind working in an XML file. Shouldn’t be too difficult though. :wink:

If I do not need the fingerprint can I use the tag as they were before (basicaly do nothing)?

The default value for ‘old’ tags is no NFC authentication. So your existing tags should work just fine.

Just released Hass NFC 1.1.2 with German translations thanks to @FrozenFinn ! No further changes for those that don’t speak German. :stuck_out_tongue:

Not sure how far you want to take this, but another interesting feature would be preference to toggle/set/unset local phone Bluetooth or WiFi, etc.

Apps like this exist like Trigger, but they don’t integrate the Hass nfc aspect. Is there any current solution for device tracker or Hass to control my mobile settings when arriving home or not?

I think it kinda goes beyond the point of the app in its current form, but it sounds interesting. What exactly would the use case be? You want to run something in HASS and your phone with geofencing?

If there are others that are interesting I can always expand this app (and rename it if needed), or create a new app.

Something like that…In the past I’ve used Android app ‘Trigger’ for changing phone settings based on phone sensors (gps) or reading an NFC tag. I prefer the non-gps approach because 1) it’s simple to scan nfc tag, 2) gps is sometimes slow or unreliable. I’d scan a tag, and that sets a custom “profile”.

Example: Tag name “Enter Car”

  • adjust brightness/screen timeout
  • turn off wifi
  • turn on bluetooth
  • open google music app

Example: Tag name “At Work”

  • adjust brightness/screen timeout
  • turn on wifi
  • turn off bluetooth
  • close google music app
  • send a text that “I’m at work”

I mentioned this only because the fingerprint nfc tag I use is for my front door lock when I arrive home. It be great to have my wifi/ble toggle accordingly without GPS.

Lastly, I was simply curious if such a solution exists where HASS would somehow invoke changes on the mobile remotely, since HASS knows where I’m at, etc.

Interesting. So it should be able to do multiple things like control your phone in some way (not related to HASS right?), and it should be possible that some actions would happen after HASS sends some kind of signal to your phone?

I think the first option would be best with another app since it doesn’t have anything to do with HASS (unless I’m mistaken).

The second option is interesting. So any event could trigger an action on your phone right? For instance when you enter/leave a zone you do action X on your phone? I could have a look to see what the options are for that.

You’re right, the first option, even though simple should remain in another app as that approach had nothing to do with Hass.

The second however, yes, is interesting because Hass would still be the central controller. If it detects enter exit a zone, trigger an automation that could change a mobile device’s setting. The only reason this would be awesome is because… all automation, etc. still would be contained in Hass – one place to handle everything.

Perhaps this would be a new app with a component in Hass and…Hass nfc could be a feature within this app and could continue to live as own app??

… Food for thought. I’m down to help on Hass side btw