Fibaro Home Center 2 Programming

Fibaro Home Center 2 – Command: fibaro:call

10 views November 10, 2019 November 10, 2019 bicobro 0

With the command fibaro:call you can send a request to a specific device: e.g. a switch, shutter, dimmer etc… The most simple example is the call to turn on or turn off a device.

format: fibaro:call(deviceId, action, parameters)

Example:

fibaro:call(11, "turnOn")   -- Turn on device with id 11
fibaro:call(12, 'setValue', '23') -- Set parameter "param" to value "23" for device 12

The following fibaro:call methods are available for specific devices.

Use fibaro:call for Regular Switches

fibaro:call(deviceId, "turnOn") -- Turn on the device
fibaro:call(deviceId, "turnOff") -- Turn off the device

Use fibaro:call for Shutter Switches

fibaro:call(deviceId, "close") -- Close the shutter 
fibaro:call(deviceId, "open") -- Open the shutter
fibaro:call(deviceId, "setValue", 50) -- Open the shutter a specific amount
fibaro:call(deviceId, "stop") -- Stop opening or closing the shutter

Use fibaro:call for Virtual Devices

fibaro:call(deviceId, "pressButton", "1") 
fibaro:call(deviceId, "setProperty", "propertyname", "value") 
fibaro:call(deviceId, "setSlider", "slidernumber", "value")

Use fibaro:call for Motion, Door, Window or Smoke Devices

fibaro:call((deviceId,"setArmed","0") -- Disarm the device
fibaro:call((deviceId,"setArmed","1") -- Arm the device

Use fibaro:call for RGBW Devices

fibaro:call(deviceId, "setR", "99") -- set red color (0-99)
fibaro:call(deviceId, "setG", "99") -- set green color (0-99)
fibaro:call(deviceId, "setB", "99") -- set blue color (0-99)
fibaro:call(deviceId, "setW", "99") -- set white color (0-99) 
fibaro:call(deviceId, "setValue", "50") -- set brightness
fibaro:call(deviceId, "setColor", "0", "10", "20", "30") -- set red  (0-99), green  (0-99), blue  (0-99) and white  (0-99) color
fibaro:call(deviceId, "turnOn") -- Turn on the device
fibaro:call(deviceId, "turnOff") -- Turn off the device 
fibaro:call(deviceId, "startProgram", "program id") -- Set light program

Use fibaro:call for Thermostats

fibaro:call(deviceId, "setTargetLevel", "20") -- Set temperature
fibaro:call(deviceId, "setTimeā€, tonumber(os.time())+120*60) -- Set the time

Use fibaro:call for Dimmers

fibaro:call(deviceId, "setValue", "50") -- Set the dimmer value (0-99)
fibaro:call(deviceId, "turnOn") -- Turn on the dimmer
fibaro:call(deviceId, "turnOff") -- Turn off the dimmer

Use fibaro:call for Users

fibaro:call(userid, "sendDefinedEmailNotification","1") -- send email notification with id 1
fibaro:call(mobiledeviceid, "sendDefinedPushNotification","2") -- send push notification with id 2 to the given mobiledeviceid 
fibaro:call(userid, "sendDefinedSMSNotification","32xxxxxxxx","3") -- send SMS notification with id 3 to the phone number "32xxxxxxx"
fibaro:call(userid, "sendEmail", subject, message) -- send an email with the subject: "subject" and "message" message
fibaro:call(IOSDeviceId, "sendPush", "pushmessage") -- send a push message "pushmessage" to the device id IOSDeviceId

Use fibaro:call for Cameras

fibaro:call(cameraid, "sendPhotoToEmail", "email address") -- Send photo from camera with the given id to the given email address
fibaro:call(cameraid, "sendPhotoToUser", "userid") -- Send photo from camera with the given id to the given user

Was this helpful?