I had a few NFC tags (cards, wrist bands, ketchains) laying around, and I purchased a new Android phone with NFC. So I was thinking, wouldn’t it be fun and easy to control Home Assistant with those tags?!
I’ve done some searching, and it’s already possible, but the current solutions are not working the way I like. You need to have 2-3 apps installed to configure the tags, and read them, and send a signal to Home Assistant.
So that’s why I’ve been working on Hass NFC; an Android app that reads specific tags (with a certain mimetype so only those trigger my app and nothing else) and fires a script on Home Assistant. Setting up the tags is very easy. All you need to write on it is the name of the script you would like to trigger.
When Hass NFC finds a NFC tag it sends a signal to the Home Assistant API and turns on the script that’s written on the tag.
Hass NFC securely saves your Home Assistant URL and API password which it uses for every call.
A good purpose for this app is to for example turn off your lights when you go to bed. Put a NFC tag on your bed table and simply put your phone on it when you go to sleep. The app then calls a Home Assistant script which turns off your lights.
Obviously the purposes are endless because you decide what happens in the script that you trigger.
Sounds great. How about making this an open source project at GitHub? There you could also publish the APKs for everybody to download at no cost. Just like the WallPanel project for example.
That’s a good idea indeed. I’m not sure yet though. I also like the idea of putting it in the store for a buck or two so I make small cash for my efforts… I’ll have to think about it!
Cool. I’ve sent Craig an .apk to test. I’ll continue tomorrow on the app I think and maybe put it in the store or upload the .apk somewhere. Not sure what I’m gonna do right now.
I’m interested in this as well. I’ve experimented with Tasker with an NFC plugin, but it’s relatively fiddly and it would be nice to have a single app that made it easier.
I also think you could combine the Play store with having it on Github.
Some users will be willing to sideload an APK they’ve downloaded, but I’m sure most would prefer to use the Play store. I know I’m reluctant to open up my phone to sideloaded apps - even if I trust the particular app I’ve done that for, changing the setting opens up a potential security hole for other apps to exploit.
The Play store also makes it easier to keep the app updated automatically, so I think even if you publish it on Github you’ll still get interest via the Play Store as well.
Hi guys, thanks for your interest in this. I’ve been working with Craig and fixed some bugs and added some features.
I am planning to release it in the store soon, so you will be able to try it out there.
What would you be comfortable paying for it? I’m thinking about 0.99 or 1.99, or maybe for free with limited features and some kind of unlocker for a few bucks. I’m mainly trying to get the Google play costs out of it, so I’m not planning to sell it for 10 bucks or something, don’t worry.
About making it open-source, not sure about that. I’m first planning to release it in the store and gathering some feedback before I continue.
I’ve entered my url (I have no port in my public url, is that ok??) and password. I enabled api component. I have some shell scripts inside my scripts folder.
In the Android app, I don’t see any scripts in the drop down, also when I manually write a name, nothing happens I can tell aside from a toast message “sent”.
If you have no port in your public URL that should be fine. Do you see the scripts in your HASS main page?
Have you also entered the password that you also have in your HTTP component? Or when you go to https://yourpublic-url.com/dev-state do you see any entities starting with ‘script.’?
if you see nothing in the dropdown there’s a big chance it will not work manually either. The dropdown should load all scripts that it can find. Also check your HASS log for errors about a wrong password for example.
Haven’t tried it out yet, but sounds promising. Reading the description there’s one thing that can be worked around, but could be nicer with native implementation: calling services along with the JSON payload, just like on the dev-site of Home Assistant. It would annoy me to create wrapper-scripts for simple things.
That may already be on your agenda. In that case: is there an agenda so we can follow what can be expected in the future?