http command using LUA

Hi,

Sorry for the noob question. I just got a Vera Edge from my fren and I’m trying to figure out how to send http command using LUA, but i just cant figure out how.

I was trying to create a “Virtual switch” that will send a http command of let say:
http://192.168.1.123:4000/turnoff

and put the command in LUA code of the device, but I cant find something like that.

Then I try to create lua scene, but it requires a trigger which i dont have any sensor yet at the moment, is it possible for me to create a variable of lets say xxx=1. and the scene will check if xxx=1 and run the http command if it is?

I’ve spent whole day trying to look for more info, but most of the explanation is quite confusing for me as I dont code, I just want to send a simple command. Thanks so much!

It sounds like creating an app/plug-in would be quite a task if you do not have any programming experience.

If it help, if you want to call something via a url, using lua, then this is an example of code that i have that calls a second Vera to turn on a light.

The url you use could be anything with it?s own http/API - set the scene to manual and it will run on your command.

luup.inet.wget("http://192.168.1.183:3480/data_request?id=lu_action&DeviceNum=90&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0")