FIBARO Intercom API

Table of contents

  1. Account
  2. Relay
  3. Sensors

FIBARO Intercom uses JSON-RPC 2.0 protocol for its API service. See https://www.jsonrpc.org/ for more information about the protocol.

WebSocket client must be used to make calls to Intercom API.

Account

Type: method

Description:
Acquires token used to authenticate other calls of JSON API

Required permissions: none

Parameters

Type: object

Name Type Description Required Default value
user string User’s name YES
pass string JSON WEB token or user’s local access password YES

Result

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
exp_time string Expiration time in milliseconds (ms) YES

Example

Function logins to Intercom and retrieves token needed for other API calls.


Type: method

Description:
Logs out current user

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Resets token expiration time

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
exp_time string Expiration time in milliseconds (ms) YES

Type: method

Description:
Adds new PIN user to the system

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
user string User’s name [max length: 64] YES
pass string User’s local access password (NOTE: empty – no local access to WSAPI) [max length: 255] YES
pin string User’s PIN in ‘4-digit’ format (EXAMPLE: ‘1234’) YES
is_admin boolean Administrative privileges option (NOTE: ‘true’ – Admin status will be enabled) YES false
uuid string (OPTIONAL) Unique user’s ID [max length: 36] NO

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Gets all users (NOTE: Non-admin privileges restrict user to his own account’s management)

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: array of objects

Description: List of users
Name Type Description Required Default value
user string User’s name YES
pin string User’s PIN in ‘4-digit’ format (EXAMPLE: ‘1234’) YES
is_admin boolean User’s administrator privileges (NOTE: ‘true’ – Admin status is enabled) YES
avatar_uri string URI to user’s avatar YES
uuid string Unique user’s ID YES
confirmed boolean Unique user’s ID confirmation status in group YES

Type: method

Description:
Removes existing user

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
user string Name of user to be removed YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Changes existing user’s data (NOTE: Non-admin privileges restrict user to his own account’s management. Additionally, current user cannot modify its own ‘admin’ property)

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
user string Name of user to be modified [max length: 64] YES
pass string (OPTIONAL) New user’s local access password [max length: 255] NO
pin string (OPTIONAL) New user’s PIN in ‘4-digit’ format (EXAMPLE: ‘1234’) NO
is_admin boolean (OPTIONAL) Administrative privileges option (NOTE: ‘true’ – Admin status will be enabled) NO false
uuid string (OPTIONAL) Unique user’s ID [max length: 36] NO

Result

Type: integer

Description: ‘0’ – Success

Relay

Type: method

Description:
Gets relay’s state

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
relay integer Relay’s ID. [min: 0; max: 1] YES

Result

Type: object

Name Type Description Required Default value
opened boolean State indicator (NOTE: ‘true’ – relay is open) YES

Type: method

Description:
Gets default timeout for relay’s open time

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
relay integer Relay’s ID. [min: 0; max: 1] YES

Result

Type: object

Name Type Description Required Default value
timeout integer Relay’s ‘open time’ timeout in milliseconds (ms) YES

Type: method

Description:
Opens relay instantly

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
relay integer Relay’s ID. [min: 0; max: 1] YES
timeout integer (OPTIONAL) Relay’s ‘open time’ timeout in milliseconds (ms) [min: 250; max: 30000] NO

Result

Type: integer

Description: ‘0’ – Success

Example

Function opens second relay.


Type: method

Description:
Sets default timeout for relay’s open time

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
relay integer Relay’s ID. [min: 0; max: 1] YES
timeout integer New relay’s ‘open time’ timeout in milliseconds (ms) [min: 250; max: 30000] YES

Result

Type: integer

Description: ‘0’ – Success

Type: signal

Description:
Signal emitted on relay’s state change

Notify

Type: object

Name Type Description Required Default value
relay integer Relay’s ID (NOTE: Available values are [‘0’, ‘1’]) YES
opened boolean Relay’s state (NOTE: ‘true’ – Relay is in ‘open’ state) YES
method string Method (NOTE: Available values are [‘PIN-ENTERED’, ‘WS_API’, ‘BLE’, ‘DTMF’, ‘NO/NC’, ‘TIMEOUT’]) YES
user string User’s name (NOTE: User is determined from PIN value, BLE ID or login depending on the method. For NO/NC and TIMEOUT methods user cannot be determined (thus empty value should be returned). YES

Sensors

Type: method

Description:
Sets video options

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
hdr boolean HDR usage option (NOTE: ‘true’ – HDR will be enabled) YES true
dewarping boolean Dewraping usage option (NOTE: ‘true’ – Dewraping will be enabled) YES false
framerate integer Hz, 50 – 50Hz, 60 – 60Hz YES 50

Result

Type: integer

Description: ‘0’ – Success

Type: signal

Description:
Signal emitted on DayNight sensor’s mode change

Notify

Type: object

Name Type Description Required Default value
mode string DayNight mode indicator YES

Type: method

Description:
Gets Day/Night mode

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
mode string Day/Night mode setting (NOTE: Allowed values are [‘day’, ‘night’, ‘night IR ext’, ‘auto’, ‘auto IR ext’]) YES

Type: method

Description:
Sets high threshold (NOTE: Day/Night mode changes to Day when above it)

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
high_threshold integer High threshold level in lux (lx) YES

Type: method

Description:
Gets low threshold (NOTE: Day/Night mode changes to Night when below it)

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
low_threshold integer Low threshold level in lux (lx) YES

Type: method

Description:
Gets detected light’s luminosity

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
luminosity integer Detected luminosity in lux (lx) YES

Type: method

Description:
Sets Day/Night mode

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
mode string New Day/Night mode setting (NOTE: Allowed values are [‘day’, ‘night’, ‘night IR ext’, ‘auto’, ‘auto IR ext’]) [min length: 3; max length: 12] YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Sets high threshold (NOTE: Day/Night mode changes to Day when above it)

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
high_threshold integer New high threshold in lux (lx) (EXAMPLE: ’20’) YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Sets low threshold (NOTE: Day/Night mode changes to Night when below it)

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
low_threshold integer New low threshold in lux (lx) (EXAMPLE: ‘4’) YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Gets sensitiviy of IR Proximity sensor.

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
sensitivity string IR Proximity sensor sensitivity. One of values: LOW, MEDIUM, HIGH.) YES

Type: method

Description:
Gets timeout for IR proximity sensor

Required permissions: user

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES

Result

Type: object

Name Type Description Required Default value
timeout integer IR Proximity sensor timeout (in milliseconds) YES

Type: method

Description:
Sets sensitiviy of IR Proximity sensor

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
sensitivity string IR Proximity sensor sensitivity. One of values: LOW, MEDIUM, HIGH. YES

Result

Type: integer

Description: ‘0’ – Success

Type: method

Description:
Sets timeout for IR proximity sensor

Required permissions: admin

Parameters

Type: object

Name Type Description Required Default value
token string String representation of authentication token YES
timeout integer IR Proximity sensor timeout (in milliseconds) YES

Result

Type: integer

Description: ‘0’ – Success

Type: signal

Description:
Signal emitted on proximity sensor’s state change

Notify

Type: object

Name Type Description Required Default value
state boolean Proximity sensor’s state (NOTE: ‘true’ – detected object in sensor’s range) YES

March 8, 2019   6064    Tutorials    
Total 6 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Comments are closed.