Dimmer dimmer.1
A light with on/off and 0–100% brightness.
Use
For lights whose brightness can change, such as PWM LEDs or dimmer modules.
On the device
On connecting, the device announces this type with t= in @$ui and sends @$state whenever its state changes. Apps send commands to <cid>@.
@$name My Dimmer:Living room
@$ui t=dimmer.1
@$state on=1;level=0
State keys @$state
| Key | Values | Meaning |
|---|---|---|
on | 0 / 1 | 1 when on, 0 when off |
level | 0–100% | Brightness 0–100 (%) |
Commands <cid>@
| Command | Meaning |
|---|---|
on | Turn on |
off | Turn off |
level={v} | Set brightness to {v}% |
level=25 | Set brightness to 25% |
level=50 | Set brightness to 50% |
level=100 | Set brightness to 100% |
{v} is the slider or color value. Even for an unknown command the device should send its current state, so the app does not wait.
Implementation notes
- When level arrives while off, the device decides whether to turn on. If it does, it also sends on=1.
- While a slider is dragged, commands arrive every 150 ms. The last value is the final one.
Default picture
Without v=1 in $ui and a $view, apps use this picture. Its values name the $state keys the picture reads.
{"kind":"bulb","on":"on","level":"level"}
Examples
No Arduino example uses this type yet.
Type file
iosignal/devices/types/dimmer.1.json (rev 2) · CDN
The screen labels in the type file are in Korean; apps show them as written.