Skip to main content

8 switches switch8.1

Eight switches.

← Device types

Use​

Mostly for an eight-switch state that several boards share on a group channel.

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 8 switches:Living room
@$ui t=switch8.1
@$state s1=1;s2=1;s3=1;s4=1;s5=1;s6=1;s7=1;s8=1

State keys @$state​

KeyValuesMeaning
s10 / 1Switch 1: 1 when on
s20 / 1Switch 2
s30 / 1Switch 3
s40 / 1Switch 4
s50 / 1Switch 5
s60 / 1Switch 6
s70 / 1Switch 7
s80 / 1Switch 8

Commands <cid>@​

CommandMeaning
s1=1Turn switch 1 on
s1=0Turn switch 1 off
s2=1Turn switch 2 on
s2=0Turn switch 2 off
s3=1Turn switch 3 on
s3=0Turn switch 3 off
s4=1Turn switch 4 on
s4=0Turn switch 4 off
s5=1Turn switch 5 on
s5=0Turn switch 5 off
s6=1Turn switch 6 on
s6=0Turn switch 6 off
s7=1Turn switch 7 on
s7=0Turn switch 7 off
s8=1Turn switch 8 on
s8=0Turn switch 8 off
all=1Turn all on
all=0Turn all off

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

  • On a group channel, every member sends the same $name and $ui (t=…) so they show as one card.

Default picture​

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

{"kind":"relays","keys":["s1","s2","s3","s4","s5","s6","s7","s8"]}

Examples​

  • iris-group — example page on arduino.iosignal.net

Type file​

iosignal/devices/types/switch8.1.json (rev 2) · CDN

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