os.execute, Is this a bad idea?

os.execute("curl -d ‘stop=off’ http://10.0.1.27/stopSprinklers.htm ")

Is there a better way?
I feel I need a timeout.
How would I do this with an HTTP POST?

I have a lot of devices and am experiencing 12+ restart per day. I have been trying to pear down my unit, eliminating unnessary files, plugins, and code, as well as cleaning up code.

os.execute can lead to Vera restarting.
You definitely need to have a timeout on the curl command.
If a thread (one running os.execute) takes to long Vera will restart.

Is there a better way? - yes, use the plugin Irrigation Caddy Plugin.

http://forum.micasaverde.com/index.php/topic,15324.0.html

You may tried it before and encountered problems. This has now been resolved: Please note the need to download “http.lua” and use it to replace /usr/lib/lua/socket/http.lua to ensure the plugin functions.

If you simply want to send an HTTP request from LUA code, you can simply use the wget lua command.

For example, the following one line of code will run a scene on my second Vera box:

luup.inet.wget("http://192.168.0.51:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=54", 5, "", "")

I do not need to get a response, so I don’t.