ON action url in switched is changed by domoticz

Moderator: leecollings

Post Reply
hagroot
Posts: 2
Joined: Monday 19 September 2016 8:34
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

ON action url in switched is changed by domoticz

Post 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?
four2six
Posts: 53
Joined: Wednesday 24 February 2016 9:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NRW, Germany
Contact:

Re: ON action url in switched is changed by domoticz

Post by four2six »

oopee
Posts: 40
Joined: Monday 12 August 2013 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.x
Location: Finland
Contact:

Re: ON action url in switched is changed by domoticz

Post by oopee »

Maybe related to my problem with on action scripts? http://www.domoticz.com/forum/viewtopic.php?f=6&t=13389
hagroot
Posts: 2
Joined: Monday 19 September 2016 8:34
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: ON action url in switched is changed by domoticz

Post by hagroot »

That seems to do the trick! Thanks!
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: ON action url in switched is changed by domoticz

Post 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.'
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest