Page 1 of 1

ON action url in switched is changed by domoticz

Posted: Monday 19 September 2016 8:42
by hagroot
I have a switch that contains an url in the ON action.
Image
Image

When the switch is turned on , i get this error in the log files.

Code: Select all

2016-09-16 08:11:13.908 Error: Error opening url: https://mijn.fqdn.nl:8443/json.htm?type=command¶m=switchscene&idx=3&switchcmd=On
It seems like domoticz is changing this part of the url

Code: Select all

&param=switchscene
|
to

Code: Select all

¶m=switchscene
So its changing to the paragraph sign.
I',m now running version 3.5641 , but had this issue also on older versions.
It is running on Synology.
Anyone an idea?

Re: ON action url in switched is changed by domoticz

Posted: Monday 19 September 2016 14:13
by four2six

Re: ON action url in switched is changed by domoticz

Posted: Monday 19 September 2016 14:28
by oopee
Maybe related to my problem with on action scripts? http://www.domoticz.com/forum/viewtopic.php?f=6&t=13389

Re: ON action url in switched is changed by domoticz

Posted: Monday 19 September 2016 18:59
by hagroot
That seems to do the trick! Thanks!

Re: ON action url in switched is changed by domoticz

Posted: Monday 19 September 2016 19:04
by bizziebis
Maybe it's just the log which is screwing up the characters and the real problem is with the inability to resolve your hostname. It doesn't make any sense to use your external domain name and port to switch a local switch on the same system.

You should use

Code: Select all

http://127.0.0.1:8080/json etc
There is no security issue as you are directly piping the command to localhost and it doesn't leave the system.

Furthermore should you add 127.0.0.1 to the accepted networks in domoticz settings.

I really can't imagine https://mijn.fqdn.nl doesn't need authentication, so there's your second problem. You let Domoticz execute the command to open that URL, it makes an request to your domain which routes it back to your IP and shows up as remote access to Domoticz. It can't successfully do that because there is no username and password supplied.

If you have the possibility, login to your NAS with SSH and execute

Code: Select all

wget https://[your URL]
I expect something like

'HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.'