Library of Functions


Description


Sends a request to perform an action to the device.

Usage and Arguments


fibaro:call(deviceID, actionName, …)

  • deviceID: the ID of the device on the Home Center (not the z-wave node ID)
  • actionName: a string containing the name of the action to perform

In some cases an action will require further arguments to perform correctly.  In these cases, up to 7 more arguments can be given in addition to the deviceID and actionName.

Returned Values


None

Examples


-- Call the action 'turnoff' on the device with id = 12
fibaro:call(12, 'turnOff');
 
-- Call the action 'setValue' with one extra argument equal to '23'
fibaro:call(12, 'setValue', '23');

Automatic Conversion


It should be noted that all arguments passed to actions are strings. However, thanks to the built-in coercion mechanism, it is not required to convert numeric types to strings in the call.  See section 1.4 of A brief introduction to Lua for more details.
1
2
3
4
local a = 50
 
-- The value of the variable called a, will be automatically converted
fibaro:call(12, 'setValue', a)