openhab / openhab-android

openHAB client for Android
https://play.google.com/store/apps/details?id=org.openhab.habdroid
Eclipse Public License 2.0
599 stars 315 forks source link

Trigger action on arbitrary NFC #3292

Open nicholascioli opened 1 year ago

nicholascioli commented 1 year ago

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

I have a few amiibos laying around and would love to be able to use them to trigger events in openhab. The existing NFC functionality seems to work by writing a tag, but I would prefer to not overwrite my amiibos. It would be nice if you could add app-local tasks that run on reading arbitrary NFS tags.

Describe alternatives you've considered

You could probably use tasker in conjunction with the intent launcher to get the same functionality, but it requires installing tasker separately from OpenHAB just for reading a few amiibos.

It might also be possible to just have unknown NFC tags pass through to the server, similarly to how phone calls and other device information get sent. If the device identifier prefix is set up, then it could trigger individual actions based on the phone scanning the tag.

Additional context

None.

mueller-ma commented 1 year ago

I'm not sure if a setting can be implemented as the scheme has to be written to the manifest before building the app: https://github.com/openhab/openhab-android/blob/main/mobile/src/main/AndroidManifest.xml#L273

Currently it's set to openhab, so the app only accepts tags with openhab://<more information>.