Skip to main content

Event Message Info

Event messages contain information about the state of specific device or related network. This information is supplemental to data received from REST API even though in some parts it may overlap. Let's look a bit closer what kind of details are available through device specific unitChanged event messages. See the example message below.

note

Each event is specific to that current state of the device and does not contain information from previous events. If one wants to keep "history" of events and related details then those should be stored per each event on client side.

{
"controls": [
{
"type": "Dimmer",
"value": 0.5
}, {
"source": "XY",
"type": "Colorsource"
}, {
"type": "Color",
"x": 0.368343917,
"y": 0.13,
"rgb": "rgb(255, 143, 255)"
}, {
"min": 2700,
"max": 6000,
"type": "CCT",
"value": 6000,
"level": 1
}
],
"method": "unitChanged",
"priority": 15,
"id": 45,
"groupId": 0,
"position": 2,
"address": "df89c844c301",
"name": "Example Luminaire",
"fixtureId": 1234,
"type": "Luminaire",
"condition": 0,
"wire": 10,
"sensors": {},
"online": true,
"activeSceneId": 0,
"dimLevel": 0.5,
"details": {
"DALI": {
"SERIAL.4456935198821319392": {
"GTIN": "8718696698181",
"ODM": "Philips",
"address": "0",
"device_type": "6:SR",
"energy_resettable": 900,
"energy_total": 1.5,
"energy_ts": 1560345734.924028,
"lamp_time": 79,
"model": "Xitanium 60W 0.08-0.35A 300V SR 230V",
"operating_time": 16685,
"output_power": 300,
"serial": "4456935198821319392",
"status": "02",
"system_starts": 45
}
},
"OEM": "Casambi",
"fixture_model": "ExampleXY"
},
"status": "ok"
}

id — Identifier of this device.

name — Name of this device.

on — Either device is ON or it is not. Naturally if device is OFF it won't be sending events to the network but in most cases server/gateway will detect these situations.

online — Either device is Online or Offline. Naturally if device is Offline it won't be sending events to the network but in most cases server/gateway will detect these situations.

condition — Numeric presentation of status of the device. If condition is 0, 128 or 160 then status is "ok" otherwise device is experiencing some failure situation.

status — Textual presentation of the status of the device. If all is good then status is "ok" and if not then status will have text description about the current failure condition. Below a list of known failure statuses.

"overheated" => activation of thermal protection
"thermal_overload" => ~ thermal derating, includes thermal shutdown state
"lamp_failure" => reported by output module
"hw_failure" => reported by output module
"driver_failure" => DALI: reported by gear
"io_error" => the I/O system has flagged excessive communication errors
"incompatible_hw" => Mismatch between expected capabilities of DALI gear
"hw_not_found" => Missing gear (not detectable, possibly not addressed yet)
"configuration_failed" => Casambi code for start-up state (it's error if it stays)
"overload" => current limit (OCP - overcurrent protection)
"short_circuit"
"open_circuit"

groupId — ID of the related group if any. If this device is not part of any group then will be set to 0.

activeSceneId — ID of the scene that is currently active related to this specific luminaire. If "activeSceneId" is not set or is set to 0 then no scene is currently active related to this device.

dimLevel — The current level of dimming (0..1) of this specific luminaire.

fixtureId — ID of the related fixture.

type — Type name of this device, usually "Luminaire".

position — Position of this device within Casambi App view. Position of grouped items refers to position within the group. Position numbers may or may not be linear.

image — Identifier of related device icon/image. By default not set.

details — Holds information about the hardware and related fixture including fixture ID. For example in case of DALI activated device here will be some DALI specific information about the device.

priority — Numeric type identifier of the active device priority. Device can have multiple priority levels based on if it is switch, sensor or time controlled through a scene or animation. Below is listed different priority values.

1 emergency
3 manual
5 date
6 weekday
8 presence sensor
11 timer/date
12 timer/weekday
15 startup animation

controls — Holds information about the state of the device depending on the type of device (Luminaire, Sensor, etc.). For example luminaires have Dimmer value between 0 .. 1, if value is 0 light is OFF and if it is 1 light is ON. Or if light is dimmed then the value will be something between 0 and 1.

In control with type "Color" there will be information about the color of the light (XY or Hue/Sat) and related rgb color string.

In addition there can be information about the light temperature (CCT) and other "control" specific data like the state of the switch or sensor event. Basically information in "controls" list presents the "state" of the device.