Page 1 of 1
openUrl timeout?
Posted: Friday 14 May 2021 23:09
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!
Re: openUrl timeout?
Posted: Friday 14 May 2021 23:29
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)
Re: openUrl timeout?
Posted: Friday 14 May 2021 23:36
by dbrb2
Thanks - I will try that - though 90 seconds should in fact be long enough!
Cheers
Re: openUrl timeout?
Posted: Saturday 15 May 2021 0:30
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