File tree 5 files changed +87
-0
lines changed
5 files changed +87
-0
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,24 @@ const (
20
20
TypeWindow AccessoryType = 13
21
21
TypeWindowCovering AccessoryType = 14
22
22
TypeProgrammableSwitch AccessoryType = 15
23
+ TypeRangeExtender AccessoryType = 16
23
24
TypeIPCamera AccessoryType = 17
24
25
TypeVideoDoorbell AccessoryType = 18
25
26
TypeAirPurifier AccessoryType = 19
26
27
TypeHeater AccessoryType = 20
27
28
TypeAirConditioner AccessoryType = 21
28
29
TypeHumidifier AccessoryType = 22
29
30
TypeDehumidifier AccessoryType = 23
31
+ TypeAppleTV AccessoryType = 24
32
+ TypeSpeaker AccessoryType = 26
33
+ TypeAirport AccessoryType = 27
30
34
TypeSprinklers AccessoryType = 28
31
35
TypeFaucets AccessoryType = 29
32
36
TypeShowerSystems AccessoryType = 30
33
37
TypeTelevision AccessoryType = 31
34
38
TypeRemoteControl AccessoryType = 32
39
+ TypeWiFiRouter AccessoryType = 33
40
+ TypeAudioReceiver AccessoryType = 34
41
+ TypeTVSetTopBox AccessoryType = 35
42
+ TypeTVStick AccessoryType = 36
35
43
)
Original file line number Diff line number Diff line change
1
+ package characteristic
2
+
3
+ const TypeCurrentTransport = "22B"
4
+
5
+ type CurrentTransport struct {
6
+ * Bool
7
+ }
8
+
9
+ func NewCurrentTransport () * CurrentTransport {
10
+ char := NewBool (TypeCurrentTransport )
11
+ char .Format = FormatBool
12
+ char .Perms = []string {PermRead }
13
+
14
+ char .SetValue (false )
15
+
16
+ return & CurrentTransport {char }
17
+ }
Original file line number Diff line number Diff line change
1
+ package characteristic
2
+
3
+ const TypeWifiCapabilities = "22C"
4
+
5
+ type WifiCapabilities = struct {
6
+ * Int
7
+ }
8
+
9
+ func NewWifiCapabilities () * WifiCapabilities {
10
+ char := NewInt (TypeWifiCapabilities )
11
+ char .Format = FormatUInt32
12
+ char .Perms = []string {PermRead }
13
+
14
+ char .SetValue (1 )
15
+ return & WifiCapabilities {char }
16
+ }
Original file line number Diff line number Diff line change
1
+ package characteristic
2
+
3
+ const TypeWifiConfigurationControl = "22D"
4
+
5
+ type WifiConfigurationControl = struct {
6
+ * Bytes
7
+ }
8
+
9
+ func NewWifiConfigurationControl () * WifiConfigurationControl {
10
+ char := NewBytes (TypeWifiCapabilities )
11
+ char .Format = FormatTLV8
12
+ char .Perms = []string {PermRead , PermWrite , PermEvents }
13
+
14
+ return & WifiConfigurationControl {char }
15
+ }
Original file line number Diff line number Diff line change
1
+ package service
2
+
3
+ import (
4
+ "github.com/brutella/hc/characteristic"
5
+ )
6
+
7
+ const TypeWifiTransport = "22A"
8
+
9
+ type WifiTransport struct {
10
+ * Service
11
+
12
+ CurrentTransport * characteristic.CurrentTransport
13
+ WifiCapabilities * characteristic.WifiCapabilities
14
+ WifiConfigurationControl * characteristic.WifiConfigurationControl
15
+ }
16
+
17
+ func NewWifiTransport () * WifiTransport {
18
+ svc := WifiTransport {}
19
+ svc .Service = New (TypeWifiTransport )
20
+
21
+ svc .CurrentTransport = characteristic .NewCurrentTransport ()
22
+ svc .AddCharacteristic (svc .CurrentTransport .Characteristic )
23
+
24
+ svc .WifiCapabilities = characteristic .NewWifiCapabilities ()
25
+ svc .AddCharacteristic (svc .WifiCapabilities .Characteristic )
26
+
27
+ svc .WifiConfigurationControl = characteristic .NewWifiConfigurationControl ()
28
+ svc .AddCharacteristic (svc .WifiConfigurationControl .Characteristic )
29
+
30
+ return & svc
31
+ }
You can’t perform that action at this time.
0 commit comments