Page 1 of 1

Domoticz REST API with LUA OpenURL

Posted: Wednesday 10 May 2023 21:19
by Filip
Hi,
I don't succeed in figuring out my problem... I want to enable/disable a timer from a LUA script...
If I use on the command line curl "http://username:[email protected]:8 ... r&idx=xxxx", I got an OK back.

However when in the LUA script I use commandArray['OpenURL'] = 'http://username:[email protected]:8 ... r&idx=xxxx', I receive always an error Error opening url: "http://username:[email protected]:8 ... r&idx=xxxx".

Any help?

Re: Domoticz REST API with LUA OpenURL

Posted: Wednesday 10 May 2023 21:58
by waltervl
Is the IP addres of the server in the trusted networks setting? As a lua call will be called from the server.
Or perhaps if you use a Docker environment you have to use the internal IP adress of docker.

Re: Domoticz REST API with LUA OpenURL

Posted: Thursday 11 May 2023 15:39
by Filip
Hi Walter,
if I use it with the command prompt ("curl") on the server where Domoticz is running, it works.
That's why I am a bit frustrated not finding the reason...
F

Re: Domoticz REST API with LUA OpenURL

Posted: Friday 12 May 2023 22:08
by Filip
If i am using the local host IP address, it works.
http://username:[email protected]:8080 ... r&idx=xxxx.
Topic closed.