openUrl timeout?

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

openUrl timeout?

Post by dbrb2 »

Apologies if this is a RTFM query - but I can't seem to find the answer!

I am using openURL in a dzVents script to call a url. It takes 25 seconds to return, which is expected - but by this point the request has generally timed out at domoticz.

Is the timeout configurable?

Cheers!
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: openUrl timeout?

Post by waaren »

dbrb2 wrote: Friday 14 May 2021 23:09 I am using openURL in a dzVents script to call a url. It takes 25 seconds to return, which is expected - but by this point the request has generally timed out at domoticz.
Is the timeout configurable?
No it is not. Connection timeout is set at 10 seconds and max time for the total call is set at 90 seconds in httpclient/HTTPClient.cpp

If you use a recent version you could build your own curl command (with the timeout values you need) using the executeShellCommand() in dzVents and return the result back to your script with a callback to shellCommandResponses. (see the wiki)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

Re: openUrl timeout?

Post by dbrb2 »

Thanks - I will try that - though 90 seconds should in fact be long enough!

Cheers
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

Re: openUrl timeout?

Post by dbrb2 »

Ah - found the problem I think:

It wasn't timing out, but the call returned no data - which was interpreted by domoticz as an error.
I've added a response to the call, and it seems fine now
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest