Closed laxmru closed 4 years ago
" api_key":"my key from webhook
API key is from Sinric Pro not IFTTT key. You can create an API key from credentials
On Sun, 14 Jun 2020 at 9:27 PM laxmru notifications@github.com wrote:
I am following the steps mentioned for Google Home and IFTTT for my TV device which already set up for Alexa.
I am unable to run onPowerState event. Below mentioned code I am using in IFTTT app.
"payload" :{ " api_key":"my key from webhook", "device_id":"my device ID from Sinric Pro", "action":"onPowerState", "value":{ "state":"On" } }
It will be really helpful if you can provide me code for other events as I don't know json.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVJ3ET6SPMMMKDDOY3RWTM6RANCNFSM4N5PEWOQ .
" api_key":"my key from webhook
API key is from Sinric Pro not IFTTT key. You can create an API key from credentials
On Sun, 14 Jun 2020 at 9:27 PM laxmru notifications@github.com wrote:
I am following the steps mentioned for Google Home and IFTTT for my TV device which already set up for Alexa.
I am unable to run onPowerState event. Below mentioned code I am using in IFTTT app.
"payload" :{ " api_key":"my key from webhook", "device_id":"my device ID from Sinric Pro", "action":"onPowerState", "value":{ "state":"On" } }
It will be really helpful if you can provide me code for other events as I don't know json.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVJ3ET6SPMMMKDDOY3RWTM6RANCNFSM4N5PEWOQ .
I have made the changes as suggested by you. However, it is not running.
Please note this is already link with Alexa which is working fine.
Also as your Sinric Pro tv example, I am using "onPowerState". Hope that is correct. On Google home I say "turn on tv" which is not working. However, it works fine with Alexa
action is wrong it should be "setPowerState",
{ "api_key":"API key from Portal -> Credentails -> API Key", "device_id":"device id from Portal -> Devices", "action":"setPowerState", "value":{ "state":"On" } }
Will I require to create App secret. Because, the program doesn't accept appy key alone?
I have tried correct action as it is by just replacing api key and device id. Also created new api key with api secret. However, it is not working
I am adding some screenshot of your understanding
Hi, sorry about the late response.
Your IFTTT configurations looks correct. Just make sure API key is correct in IFTTT.
CURL:
curl --location --request POST 'https://ifttt.sinric.pro/v1/actions' \ --data-raw '{ "api_key" : "xxxx", "device_id": "xxx", "action": "setPowerState", "value": { "state": "On" } }'
POSTMAN
Hi
I have tried this in POSTMAN. Below mentioned is the result
{ "success": false, "message": "API Key is invalid or unauthorized!" }
Let me explain my set up
1. How I set up IFTTT ? Ans : Webbook key is updated in API integration. Rest of the things as mentioned in screenshot in my previous comment.
2. When my TV devices in in Sinric Pro Dashboard shows online? Ans: In Arduino IR TV example code I have used API key and API secret from "Your App Keys and Secrets" in Credentials section in https://portal.sinric.pro/credential/list
3. Why I have created one more API key (which does not have API secret)? Ans : This is done because it is shown in documentation in IFTTT documentation.
4. Which API Key I am using in IFTTT body? Ans : I have used API key from "Your API Keys" in Credentials section in https://portal.sinric.pro/credential/list
seems your API key is wrong.
{ "api_key" : "aa3b98f2-xxxxxxxx-48c93200537c", "device_id": "5eexxxxa", "action": "setPowerState", "value": { "state": "On" } }
This works. I just tried it
Hi There is nothing wrong in API key. I tried using "Copy" button beside API key. Also I have tried selecting and copying This I tried in POSTMAN also. Please note this Key in not my Arduino sketch.
Hi This is just worked now. I did two things.
Due to inactivity I assume that the problem has been solved. For this reason, the issue will be closed now. If there are still errors or questions related to this topic, please reopen this issue.
I am following the steps mentioned for Google Home and IFTTT for my TV device which already set up for Alexa.
I am unable to run onPowerState event. Below mentioned code I am using in IFTTT app.
"payload" :{ " api_key":"my key from webhook", "device_id":"my device ID from Sinric Pro", "action":"onPowerState", "value":{ "state":"On" } }
It will be really helpful if you can provide me code for other events as I don't know json.