This is my first post and I come from a non - tech background so kindly bear with me. I am not even sure if this would be possible.
I am using the Tinxy 4 Switch Node. I have been looking for ways such that I could use an NFC tag as a trigger to toggle the light switch on and off. Based on my limited understanding, what I could find was that I need to use Tasker to set the NFC tag as a trigger. Further I need to integrate it with IFTTT which could toggle the light on and off. Now IFTTT integrations are available for popular brands like Philips etc. I could not find one for Tinxy.
Am I missing something? If not, is there an alternative solution possible? All I want to do is tap my phone on an NFC tag so that it switches off the light. Opening the app and manually switching off is too cumbersome.
Also, just in case if it helps, I have added Tinxy in the Google Home app (just the app, I do not own a Google Home device). So I have Tinxy integrated over there. If there is any way to use this Google Home integration to achieve my resolution, I am open to that too.
Actually I am not from a tech background. So I don’t know how to work with APIs or any coding for that matter. Is there any other way out or is there a pre written code available which I could use
I read through the responses and all of them seem very useful. I think because you are new to this, I’ll try to explain it as simple as I can on how I would do it.
There are mainly two parts to your problem:
Trigger IFTTT by scanning NFC Tag
Trigger Tinxy from IFTTT
Solution for 1st Problem
For tackling the 1st problem, as you suggested you can use Tasker, or even Automate, which is a free alternative available on android which works similar to tasker. You can use either of them to scan NFC Tag. Next, you can send a request to IFTTT via webhook. You can refer to this video link to see how to create a webhook. Eg: https://maker.ifttt.com/trigger/TRIGGER_NAME/with/key/YOUR_KEY, need to replace TRIGGER_NAME and YOUR_KEY.
Now your workflow will be like: Android Phone → NFC Scan → Trigger Webhook
Solution for 2nd Problem
As for tackling the 2nd problem, you can make use of IFTT webhooks (make a web request). Firstly you need to find out your tinxy device’s id, this can be done with the help of APIs provided by tinxy. You can download the json from this link and import it in Postman. NOTE: API Token can be retrieved from Tinxy app (open app → click on top-left → click on API Token → get token) and should be used in the Authorization header.
Now with the help of Device Toggle API, you can toggle the state of the device by creating a webhook in IFTTT. Eg:
Method: POST
Content Type: Application/Json
Url: https://backend.tinxy.in/v2/devices/YOUR_DEVICE_ID/toggle
Header: Authorization: Bearer *YOUR_API_TOKEN*
Payload:
The complete flow will look like: Android Phone → NFC Scan → Trigger Webhook(receive a web request) → Webhook (make web request to tinxy) → toggle switch on/off