-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.proto
197 lines (178 loc) · 4.35 KB
/
plugin.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
syntax = "proto3";
package plugin;
option go_package = "github.com/pyxiscloud/cloud.pyxis.plugin";
message Plugin {
string name = 1;
bool ableUploadDevices = 2;
map<string, string> stringValues = 3;
map<string, int32> numberValues = 4;
map<string, float> floatValues = 5;
reserved 6 to max;
}
message SubtypeOneOf {
oneof subtype {
float value = 1;
bool on = 2;
DIMMER dimmer = 3;
HSL hsl = 4;
uint32 hue = 5;
uint32 saturation = 6;
RGB rgb = 7;
uint32 red = 8;
uint32 green = 9;
uint32 blue = 10;
string state = 11;
double temperature = 12;
double currentTemp = 13;
uint32 heatCoolState = 14;
double targetTemp = 15;
uint32 batterylevel = 16;
bool batterylow = 17;
float rotate = 18;
string anytext = 19;
uint32 playStop = 20;
uint32 volume = 21;
uint32 operation = 22;
uint32 fanMode = 23;
THERMOSTAT thermostat = 24;
Flip flip = 25;
uint32 airqualityPm = 26;
float currentState = 27;
float targetState = 28;
bool lockControls = 29;
uint32 limitValue = 30;
uint32 chargingState = 31;
uint32 linkQuality = 32;
uint32 colorTemp = 33; //140 - 500
SubtypeOneOf lastStatus = 34;
bool getListBaseTopics = 35;
bool setListBaseTopics = 36;
bool actListBaseTopics = 37;
//После добавления надо добавить в BusParser в main.go, SendToPyxisBus
}
reserved 38 to max;
}
message Subtype {
float value = 1;
bool on = 2;
DIMMER dimmer = 3;
HSL hsl = 4;
uint32 hue = 5;
uint32 saturation = 6;
RGB rgb = 7;
uint32 red = 8;
uint32 green = 9;
uint32 blue = 10;
string state = 11;
double temperature = 12;
double currentTemp = 13;
uint32 heatCoolState = 14;
double targetTemp = 15;
uint32 batterylevel = 16;
bool batterylow = 17;
float rotate = 18;
string anytext = 19;
uint32 playStop = 20;
uint32 volume = 21;
uint32 operation = 22;
uint32 fanMode = 23;
THERMOSTAT thermostat = 24;
Flip flip = 25;
uint32 airqualityPm = 26;
float currentState = 27;
float targetState = 28;
bool lockControls = 29;
uint32 limitValue = 30;
uint32 chargingState = 31;
uint32 linkQuality = 32;
uint32 colorTemp = 33;
SubtypeOneOf lastStatus = 34;
bool getListBaseTopics = 35;
bool setListBaseTopics = 36;
bool actListBaseTopics = 37;
reserved 38 to max;
}
enum Flip {
Flip_90 = 0;
Flip_180 = 1;
Flip_270 = 2;
Flip_360 = 3;
reserved 4 to 360;
}
message DIMMER {
uint32 value = 1;
bool on = 2;
uint32 colorTemp = 3;
// uint32 lastBrightnes = 4;
reserved 5 to max;
//при добавлении добавлять в main.go SetActualValues
}
message THERMOSTAT {
double currentTemp = 1;
uint32 heatCoolState = 2;
double targetTemp = 3;
uint32 fanMode = 4;
reserved 5 to max;
//при добавлении добавлять в main.go SetActualValues
}
message HSL {
uint32 hue = 1;
uint32 saturation = 2;
uint32 lightness = 3;
uint32 colorTemp = 4;
// uint32 lastBrightnes = 5;
bool on = 6;
reserved 7 to max;
//при добавлении добавлять в main.go SetActualValues
}
message RGB {
uint32 red = 1;
uint32 green = 2;
uint32 blue = 3;
uint32 alpha = 4;
reserved 5 to max;
//при добавлении добавлять в main.go SetActualValues
}
message PluginAddress {
string name = 1;
// map<string, string> mapTypeMap = 2;
map<string, string> stringValues = 3;
map<string, int32> numberValues = 4;
map<string, float> floatValues = 5;
Type type = 6;
reserved 7 to max;
}
enum Type {
LightbulbRelay = 0;
LightbulbDimmer = 1;
LightbulbRGB = 2;
Switch = 3;
Outlet = 4;
Control = 5;
TemperatureSensor = 6;
WindowCovering = 7;
ContactSensor = 8;
LeakSensor = 9;
SmokeSensor = 10;
LightSensor = 11;
HumiditySensor = 12;
MotionSensor = 13;
Thermostat = 14;
FloorHeating = 15;
MusicPlayer = 16;
IRemitter = 17;
AV_control = 18;
GarageDoorOpener = 19;
LockMechanism = 20;
PressureSensor = 21;
AirQuality = 22;
AirPurifier = 23;
Humidifier = 24;
CarbonDioxideSensor = 25;
BridgedControl = 26;
Fan = 27;
//После добавления надо добавить в main в main.go, SetActualsValues, SetTargetValues,
//homekit.ts в runHomekit, во все драйверы, main.ts
//voice_assistant savedStatuses.go
reserved 28 to max;
}