Page 1 of 1

IFTTT: How to Parameterised webhooks with google assistant ?

Posted: Monday 22 October 2018 3:04
by RapTile
I want to tell my google assistant to change my TV input channel to HDMI1 or Netflix etc.
And i want IFTTT to send the correct command to Domoticz.

How can i make this possible?
The code below wont work because Set%20Level expects a number.

If You say "change tv input chanel to $", then Make a web request:

Code: Select all

https://<username>:<password>@<URL>:<PORT>/json.htm?type=command&param=switchlight&idx=<ID>&switchcmd=Set%20Level&level={{TextField}}
The lvl expects a number instead of text so i am wondering how this could be made possible.

the above code works for changing the TV volume but not switching the input because the volume is a number but the input channel is text.
I know the numbers that are being used by the TV API but i want to tell my google home to to switch an input channel instead of a number.

Thanks in advance for the support.

Re: IFTTT: How to Parameterised webhooks with google assistant ?

Posted: Tuesday 05 February 2019 22:11
by axel2906
Did you find a solution to your problem ?

I've the same issue. I made 5 request but i want to do like you.

Re: IFTTT: How to Parameterised webhooks with google assistant ?

Posted: Tuesday 05 February 2019 22:50
by Soepgroenten
One important thing...you need to encode your username and password...otherwise domoticz wont accept it..

Please take a look here for explanation.

https://www.domoticz.com/wiki/Domoticz_ ... horization

In short:
Just encode your username and password on this link, and copy/paste the results in your URL's
https://codebeautify.org/base64-encode