Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Virtual sensor

Device class

Description

function_test_failure

problem

Indicates whether last function test failed or not

“ON” means that function test has failed.

duration_test_failure

problem

Indicates whether last duration test failed or not

“ON” means that the duration test has failed.

System groups

Most of the local systems in Glamox Connect make use of light groups. If this is set up in your local system you can also get this in your API, showing which devices are in the group and being able to send commands to the group

Group discovery

Similar to device discovery, to get a list of all the groups in your system you need to send a message to the group discovery topic <API ID>/groups/search ex: connect/groups/search

You will then receive a payload containing a list of all groups on topic <API ID>/group/<GROUP ID>/config

Group discovery payload

In the group discovery payload you will get a list of all groups as objects containing id and name.

Name will depend on the local system and name given to the group and will be the field for you to identify which group you are looking at.

The ID is Connect internal and is to be used for commands and similar

Code Block
languagejson
[
  {"id": "ee87e78b-23a2-4b87-996f-9f2d10ea409e", "name": "A group"},
  {"id": "85a168bb-aec2-42e7-acbc-a13d9ab2728c", "name": "Another group"},
  {"id": "c509a026-7c6d-4e79-957a-fbab81b06e2a", "name": "Lsst group"},
]

Group commands

To send commands to the groups you do this using a group specific topic, and the standard payload format in the same way as for devices.

To send commands to group, use the following topic

<API ID>/group/<Group ID>/set

As an example, if your API is “connect” and you want to turn on and set 80% brightness for group “A group" in the list above, you send the following payload to connect/group/ee87e78b-23a2-4b87-996f-9f2d10ea409e/set

Code Block
languagejson
{
  "brightness": 80,
  "state": "ON"
}