Hi, I want to include the Simple Control activities in Fibaro Home Center 2. — A member replied: “The LUA code is: [code] http = Net.FHttp("111.222.333.444", 47147); response, status, errorCode = http:POST("/api/v1/runactivity", [[ {"activity_uuid":"12345678-1234-1234-1234-1234567890"} ]] ); if errorCode == 0 then fi”
Hi,
I want to include the Simple Control activities in Fibaro Home Center 2. I have created a Virtual Device in HC2 and added a few buttons for all activities. What LUA code do I have to enter to the VD button?
[attachment=0]<!-- ia0 -->vd.jpg<!-- ia0 -->[/attachment]
In this pdf, simplecontrol.com/wp-conten ... erface.pdf, I have found the code below to run a activity:
$ curl -X POST 'http://[color=#FF0000]IPADDRESS[/color]:47147/api/v1/runactivity' -d
‘{
"activity_uuid" : "[color=#FF0000]53B7B23B-F70F-498D-A128-477FCBD05A58[/color]" }'
{
"status" : "success",
"data" : {
},
"code" : 200
}
The IPADDRESS is the Hub IP (iPad)
I have found the activity_uuid in IPADDRESS:47147/api/v1/activities
Thank you in advance