post data to a web site

Hi I am using os.execute("curl to post data to a web site. It works just fine until there is some extenal issue (web site down).

When this happens, vera reboots. I have tried coding a pcall. This doesn’t help.Can someone dump some code to resolve this please?

If there are alternatives, please can you provide examaples.

Two main options:

  1. luup.inet.wget - http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#Module:_luup.inet

  2. Luasocket library: http.request - LuaSocket: HTTP support

Thanks for fror your switft reply but

That second option is far too complicated for my skill set… however after months trying to fix this I had a eureka moment… all I needed to do was code -m 5 on my curl staement.

This allows 5 secs for a response… now I will not get anymore vera reboots when the web site is down, or there are some other comms issues.

[quote=“mbaker171, post:1, topic:189283”]Hi I am using os.execute("curl to post data to a web site. It works just fine until there is some extenal issue (web site down).

When this happens, vera reboots. I have tried coding a pcall. This doesn’t help.Can someone dump some code to resolve this please?

If there are alternatives, please can you provide examaples.[/quote]

Hi there,
Can you post a small example(step-by-step) or tutorial, how you send the data?
I had a Razzbery for my z-wave network which i configured to post data to my website, but I am not sure how to do the same with the vera. Where should I put my code, what kind of code etc…
I will really appreciate it.