HTTP GET retry count

206 views
Skip to first unread message

vbs

unread,
Feb 24, 2014, 3:46:29 AM2/24/14
to tas...@googlegroups.com
Hi guys,

I am totally new to this so I hope this has not been asked before (could not find anything about it):
Is there a way to set a retry count for the HTTP GET task? I am using it for home automation and sometimes the HTTP GET task returns a SocketException. I think it happens when the mobile phone is just about to switch networks or something (UMTS <-> GSM). When I trigger the task manually right after it failed, then it works.
Or any other ideas how to workaround this?

Big thanks in advance,
vbs

Pent

unread,
Feb 24, 2014, 7:21:30 AM2/24/14
to tas...@googlegroups.com

Is there a way to set a retry count for the HTTP GET task? I am using it for home automation and sometimes the HTTP GET task returns a SocketException. I think it happens when the mobile phone is just about to switch networks or something (UMTS <-> GSM). When I trigger the task manually right after it failed, then it works.

First disable Menu / Prefs / UI / Beginner Mode.

In the HTTP Get action, enable Continue On Error and give it a label (e.g. query)

After the HTTP Get action, you can then do something like:

Task / If %HTTPR < 200
   Variable Add, %retries, 1
   Task / Goto, label, query If %retries < 3

Pent
Reply all
Reply to author
Forward
0 new messages