close

Applies to: blind

Description:

Closes a blind.

Usage:

This action takes no arguments.

Example:

1
2
-- Close the blind with the device ID of 94
fibaro:call(94, "close")

open

Applies to: blind

Description:

Opens a blind.

Usage:

This action takes no arguments.

Example:

1
2
-- Open the blind with the device ID of 94
fibaro:call(94, "open")

pressButton

Applies to: virtual_device

Description:

Triggers a virtual device button press.

Usage:

This action takes one argument.

  • The number of the button to be pressed.  Each element of a virtual device has a unique number starting from 1.  If your virtual device has two labels followed by two buttons, the buttons will be numbered 3 and 4.

Example:

1
2
3
-- Trigger a button press of button 3 of
-- the virtual device with an ID of 358
fibaro:call(358, "pressButton", "3")

sendDefinedEmailNotification

Applies to: HC_user

Description:

Sends a notification to the email address associated with a user.

Usage:

This action takes one argument.

  • The id of the notification to be sent.

Example:

1
2
3
-- Send notification 2 via email to the
-- address associated with user 107.
fibaro:call(107, "sendDefinedEmailNotification", "2")

sendDefinedPushNotification

Applies to: iOS_device

Description:

Sends a push notification to a device.

Usage:

This action takes one argument.

  • The id of the notification to be sent.

Example:

1
2
-- Send notification 2 via push to modile device number 10.
fibaro:call(10, "sendDefinedPushNotification", "2")

sendDefinedSMSNotification

Applies to: HC_user

Description:

Sends an SMS notification to a phone number.

Usage:

This action takes two arguments.

  • The phone number to send the message to.
    This should be in the form xxyyyyyyyyy where xx = country code and yyyyyyyyy = phone number.
  • The id of the notification to be sent.

Example:

1
2
-- Send notification 3 via SMS to device number +441234567890.
fibaro:call(2, "sendDefinedSMSNotification", "441234567890", "3")

sendEmail

Applies to: HC_user

Description:

Sends an email to the email address associated with a user.

Usage:

This action takes two arguments.

  • The subject of the email.
  • The message body of the email.

Example:

1
2
3
4
-- Send an email to the email address associated with user 2.
local subject = "This is the subject of the email."
local message = "This is the body of the email.\nWith a line break."
fibaro:call(2, "sendEmail", subject, message)

sendPhotoToEmail

Applies to: IP_camera

Description:

Sends a still image from a camera to a specified email address.

Usage:

This action takes one argument.

  • The email address to send the image to.

Example:

1
2
-- Send an image from camera 120 to [email protected].
fibaro:call(120, "sendPhotoToEmail", "[email protected]")

sendPhotoToUser

Applies to: IP_camera

Description:

Sends a still image from a camera to the email address associated with a user.

Usage:

This action takes one argument.

  • The id number of the user to send the image to.

Example:

1
2
3
-- Send an image from camera 120 to
-- the email address associated with user 2.
fibaro:call(120, "sendPhotoToUser", "2")

sendPush

Applies to: iOS_device

Description:

Sends a push notification to an iOS device.

The device must have connected with the Home Centre recently, however once this connection has been made the app can be closed.

Usage:

This action takes one argument.

  • The message to be pushed to the device.

Example:

1
2
-- Send a push notification to the iOS device with the ID of 10
fibaro:call(10, 'sendPush', 'This is the message to be pushed.')

setArmed

Applies to: motion_sensor, door_sensor, window_sensor, smoke_sensor

Description:

Arms or disarms a device.

Usage:

This action takes one argument.

  • The armed state of the device. 0 = disarmed, 1 = armed.

Example:

1
2
3
4
5
-- Arm the door sensor with device ID of 174
fibaro:call(174, "setArmed", "1")
 
-- Disarm the door sensor with device ID of 174
fibaro:call(174, "setArmed", "0")

setB

Applies to: rgb_driver

Description:

Sets the brightness of the blue channel of an rgb_driver.

Usage:

This action takes one argument.

  • The brightness (0-99) of the channel.

Example:

1
2
-- Set the brightness of the blue channel of device 81 to 56%
fibaro:call(81, "setB", "56")

setColor

Applies to: rgb_driver

Description:

Sets the colour of an rgb_driver.

This is done by setting the brightness of the red, green, blue and white channels.

Usage:

This action takes four arguments.

  • The brightness (0-99) of the red channel.
  • The brightness (0-99) of the green channel.
  • The brightness (0-99) of the blue channel.
  • The brightness (0-99) of the white channel.

Even if the device is in RGB mode, the white channel needs to be specified – in this case, just use 0.

Example:

1
2
3
-- Set the colour of device 81 to a blue-indigo colour
-- (60% red, 23% green, 99% blue, 0% white)
fibaro:call(81, "setColor", "60", "23", "99", "0")

setG

Applies to: rgb_driver

Description:

Sets the brightness of the green channel of an rgb_driver.

Usage:

This action takes one argument.

  • The brightness (0-99) of the channel.

Example:

1
2
-- Set the brightness of the green channel of device 81 to 56%
fibaro:call(81, "setG", "56")

setProperty

Applies to: virtual_device

Description:

Sets value of the elements of a virtual device (labels and sliders).

Usage:

This action takes two arguments.

  • The name of the element.
  • The value to set the element to.

Example:

1
2
3
4
5
-- Set the content of Label1 in virtual device 1170 to 'program 1'
fibaro:call(1170, "setProperty", "ui.Label1.value", "program 1")
 
-- Set the value of Slider1 in virtual device 1170 to 45
fibaro:call(1170, "setProperty", "ui.Slider1.value", "45")

setR

Applies to: rgb_driver

Description:

Sets the brightness of the red channel of an rgb_driver.

Usage:

This action takes one argument.

  • The brightness (0-99) of the channel.

Example:

1
2
-- Set the brightness of the red channel of device 81 to 56%
fibaro:call(81, "setR", "56")

setSlider

Applies to: virtual_device

Description:

Triggers a change in the value of a virtual device slider.

Usage:

This action takes two arguments.

  • The number of the slider to be changed.  Each element of a virtual device has a unique number starting from 1.  If your virtual device has two labels followed by two buttons and then a slider, the slider will be numbered 5.
  • The value (0-99) to set the slider to.

Example:

1
2
3
-- Set the slider with an ID of 2 of the
-- virtual device with an ID of 334 to 50%
fibaro:call(334, "setSlider", "2", "50")

setTargetLevel

Applies to: thermostat_setpoint

Description:

Sets the target temperature of a thermostat_setpoint.

Usage:

This action takes one argument.

  • A temperature in degrees.

Example:

1
2
-- Set the target temperature of device 117 to 18 degrees.
fibaro:call(117, "setTargetLevel", "18")

setTime

Applies to: thermostat_setpoint

Description:

Sets the value of the timeStamp property of the thermostat_setpoint.

Usage:

This action takes one argument.

  • A timestamp.

Example:

1
2
3
-- Set the timeStamp of the thermostat_setpoint
-- with device ID of 117 to 2 hours from now.
fibaro:call(117, "setTime", tonumber(os.time()) + 120*60)

setValue

Applies to: dimmable_light, blind, rgb_driver

Description:

Sets the brightness of a dimmable_light or rgb_driver or sets the position of a blind.

When changing the brightness of rgb_drivers, all channels are set to the same level (white light).

Usage:

This action takes one argument.

  • A value (0-99) representing the brightness of the light or position of the blind.
    For a blind, 0 = fully closed, 99 = fully open.

Example:

1
2
3
4
5
-- Set the brightness of the light with device ID of 68 to 25%.
fibaro:call(68, "setvalue", "25")
 
-- Set the position of the blind with the device ID of 94 to 75% open.
fibaro:call(94, "setvalue", "75")

setW

Applies to: rgb_driver

Description:

Sets the brightness of the white channel of an rgb_driver.

Usage:

This action takes one argument.

  • The brightness (0-99) of the channel.

Example:

1
2
-- Set the brightness of the white channel of device 81 to 56%
fibaro:call(81, "setW", "56")

startProgram

Applies to: rgb_driver

Description:

Instruct the rgb_driver to play one of the preconfigured colour programmes.

Usage:

This action takes one argument.

  • The light programme number to run.

Example:

1
2
-- Start programme number 2 ("storm") on device number 81
fibaro:call(81, "startProgram", "2")

stop

Applies to: blind

Description:

Stops the movement of a blind.

Usage:

This action takes no arguments.

Example:

1
2
-- Stop the blind with the device ID of 94
fibaro:call(94, "stop")

turnOff

Applies to: binary_light, dimmable_light, rgb_driver

Description:

Turns off a device.

Usage:

This action takes no arguments.

Example:

1
2
-- Turn off device number 58.
fibaro:call(58, "turnOff")

turnOn

Applies to: binary_light, dimmable_light, rgb_driver

Description:

Turns on a device.

Usage:

This action takes no arguments.

Example:

1
2
-- Turn on device number 58.
fibaro:call(58, "turnOn")