Skip to content

Datapoint Value Definition for Lights

Kai Kramer edited this page Nov 26, 2017 · 2 revisions

Datapoint Value Definition for Lights

Switchable Light

The simplest form of a value for lights is on/off. All lamps support this value. This value is represented as a boolean value of true or false.

A bridge should normalize other values like 0/1/on/off to boolean values.

Datapoint

  • value: boolean

Metadata

  • type: Light

Example: Light on

{val:true}

Example: Light off

{val:false}

Dimmable Lights

Lamps that can change their brightness via dimmers. The value range goes from 0-100% and is represented as a floating point value between 0 and 1.0.

Dimmable lamps can also be controlled with Boolean values. With false the value for the brightness is set to 0 and with 1 the lamp is switched on again. When switching on, the lamp can either be set to 100% or the last brightness value set. This also depends on the support of the device.

A bridge should normalize other values like 0..100, 0..254,... to a float between 0 and 1.0.

Datapoint

  • value: float 0..1.0

Metadata

  • type: "Light"
  • dimmable: true
  • dimmUnit? Optional or force boolean 0..1.0?

Example: Light 50%

{val:0.5}

Example: Set Light to on === true, Device supports switching to the last brightness

=> device/set/lamp true

<= device/state/lamp
{val:0.5}

Optional Datapoint: Color Temperature

Some lights like Hue allows to change the color temperature. The color temperature is an additional for lights and is represented as another field in the status. The temperature can also be set individually.

Common Field for Color Temperature

  • ct: Color temperature normalized to in kelvins. (Or mired the Hue default?)

Metadata

  • type: "Light"
  • dimmable: true (optional)
  • adjustableColorTemperature: true
  • colorTemperatureUnit: "K" oder "Mired" ? Optional or force one Unit?

Example: State of a light at 50% brightness and a color temperature of 6500K

{val:0.5, ct: 6500}

Optional Datapoint: Color

Common Field for Color

  • hue:
  • sat:

Metadata

  • type: "Light"
  • dimmable: true (optional)
  • adjustableColor: true
  • hue
    • default: 0
    • type: int
    • min: 0
    • max: 360
    • unit: "°"
  • set: ...