Page 1 of 1

IFTTT interface with Domoticz

Posted: Tuesday 04 December 2018 18:33
by Craigarran
Version: 4.10252
Platform: Raspi
Plugin/Hardware: RFXCom

I have been successfully using IFTTT to respond to HTTP commands from Domoticz and also to generate Webhooks from IFTTT to activate devices in Domoticz however, I have discovered that if the Domoticz device has an IDX number higher or equal to 1365 then no action is taken by Domoticz and the log records an "Unauthorized switch command". Has anyone else come across this limitation? Is it a design flaw? Is it a designed limitation?
I would be grateful for any insight anyone can provide.

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 17:41
by Craigarran
I received no replies to this post. Have I posted in the wrong place or failed to observe some protocol. My apologies if that is the case, perhaps someone can offer some guidance. However, the problem identified still exists and is causing me some problems. I notice the limit does seem to have increased as it is now at 1742 an IDX of 1741 works just fine but anything higher gets the error message. Another solution would be to renumber the "switches" in Domoticz database. Is there anyone that can help me with this please?

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 18:29
by waaren
Craigarran wrote: Monday 08 June 2020 17:41 I received no replies to this post. Have I posted in the wrong place or failed to observe some protocol. My apologies if that is the case, perhaps someone can offer some guidance. However, the problem identified still exists and is causing me some problems. I notice the limit does seem to have increased as it is now at 1742 an IDX of 1741 works just fine but anything higher gets the error message. Another solution would be to renumber the "switches" in Domoticz database. Is there anyone that can help me with this please?
Just tested this on build domoticz build 12130 with Alexa as "this" and webhook as "that" with a testdevice with idx 3085 without a problem.

webhook

Code: Select all

https://mydomainName:443/json.htm?username=xxxxxxxxx&password=xxxxxxxxx/type=command&param=switchlight&idx=3085&switchcmd=On
domoticz log

Code: Select all

2020-06-08 18:19:51.502  Status: User: IFTTTxx initiated a switch command (3085/iftttSwitch/On)
2020-06-08 18:19:51.509  (Virtual) Light/Switch (iftttSwitch)
2020-06-08 18:19:51.519  Status: Incoming connection from: 3.86.114.107
so first question is do you see anything in the log

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 18:46
by Craigarran
Thanks for the reply Warren. This is strange. Below you can see two webhooks using IDX 1742 and then 1741 with the log messages. incidentally , if I use either in a browser they will work.

webhook:
http://user:password@domainname:8080/js ... tchcmd=Set Level&level= {{NumberField}}


message in log:
2020-06-08 14:38:14.299 Error: User: IFTTT initiated a Unauthorized switch command!

webhook:
http://user:password@domainname:8080/js ... tchcmd=Set Level&level= {{NumberField}}


message in log:
2020-06-08 17:41:00.808 Status: User: xxxx initiated a switch command (1741/Lounge Video/Set Level)

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 18:58
by waaren
Craigarran wrote: Monday 08 June 2020 18:46 message in log:
2020-06-08 14:38:14.299 Error: User: IFTTT initiated a Unauthorized switch command!
Don't know if it's related but I need to replace a space with %20 in the webhook to get it to work.

Code: Select all

http://user:password@domainname:8080/json.htm?type=command&param=switchlight&idx=1742&switchcmd=Set%20Level&level=25
I see that you running a previous release. I only tested with latest release. Don think it wil change anything but if everything else is the same?
Anyway, I would first try to just switch on/off and see if that works

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 19:07
by Craigarran
Have tried the %20 substitute for space and also simplifying to On/Off, no change. I am running the latest Stable release 2020.2(build12075). Will try latest Beta.

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 19:20
by waaren
Craigarran wrote: Monday 08 June 2020 19:07 Have tried the %20 substitute for space and also simplifying to On/Off, no change. I am running the latest Stable release 2020.2(build12075). Will try latest Beta.
Other differences are that I use https and my placement of username password in the URL

Re: IFTTT interface with Domoticz

Posted: Monday 08 June 2020 19:34
by Craigarran
Upgraded to 2020.2(build12130) it seems to be okay although I'm getting error 404 returned when using IDX numbers for dimmer type switches. But all others okay and I get the same from a browser or IFTTT so not the original problem, that seems to be solved. So very many thanks for your help.