Skip to main content

Fan fan.1

A fan with on/off, speed 1–10 and swing.

← Device types

Use​

For devices that control motor speed and swing.

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 Fan:Living room
@$ui t=fan.1
@$state on=1;speed=1;swing=1

State keys @$state​

KeyValuesMeaning
on0 / 11 when on, 0 when off
speed1–10Speed 1–10
swing0 / 11 while swinging, 0 when fixed

Commands <cid>@​

CommandMeaning
onTurn on
offTurn off
speed={v}Set speed to {v}
swing=1Start swing
swing=0Stop swing

{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​

  • Keep speed and swing while off and use them when turning on, so the app screen matches.

Default picture​

Without v=1 in $ui and a $view, apps use this picture. Its values name the $state keys the picture reads.

{"kind":"fan","on":"on","speed":"speed"}

Examples​

No Arduino example uses this type yet.

Type file​

iosignal/devices/types/fan.1.json (rev 3) · CDN

The screen labels in the type file are in Korean; apps show them as written.