android - using RESTful API (POST,PUT,GET) on NFC tags, or how to run curl on mobile universally -
i looking place nfc tags around house in order switch on lights , other applicances have restful apis (phillips hue lights). can achieve through tasker etc, don't work people not have these apps.
i these nfc tags work phone (ios nice, feel android phones may more attainable).
i believe best route may use simple shell script such curl
.
i can run following computer, allows me control lights:
curl -x put -d '{"on":true}' http://<bridge-ip-address>/api/<username>/groups/0/action
so, question is:
how can script run whenever nfc tag read, no matter device activates it?
your question pretty vague, there endless solutions question. simplest solution use nfc tags launch url control lights/devices via locally networked web server. interface hue perl/php/etc, , nfc tags launch url, server convert url arguments commands , send them hue bridge or wherever.
you use nfc launch app. don't know android/ios app dev send commands nfc app you're launching. problem app have installed on client, platform.
Comments
Post a Comment