/
config.proto
57 lines (51 loc) · 2.33 KB
/
config.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
syntax = "proto2";
message Config {
message Tesla {
optional string user_id = 1;
// Location of the cache json file generated by TeslaPy for authentication
optional string cache_file = 2 [default = '/app/config/cache.json'];
optional string energy_site_id = 3;
}
message IAquaLink {
message Pool {
// By decreasing order of priority (i.e. devices should be turned on in this order and turned off in the reverse order)
repeated string devices = 1;
// Minimum excess power required to activate a pool device (in Watt)
optional int32 activation_excess_power = 2 [default = 2000];
// Excess power threshold below which pool devices start to be deactivated (in Watt)
optional int32 deactivation_excess_power = 3 [default = 500];
// Pool will not turn on before 8h00
optional int32 max_operating_window_start = 4 [default = 8];
// Pool will be shut off in any case after 18h00
optional int32 max_operating_window_end = 5 [default = 18];
// Pool will run at least from min_operating_window_start (if > 0)
optional int32 min_operating_window_start = 6 [default = -1];
// Pool will run at least until min_operating_window_end (if > 0)
optional int32 min_operating_window_end = 7 [default = -1];
// Pool will not run if the battery charge is below 50%
optional int32 minimum_battery = 8 [default = 50];
}
message Light {
repeated string devices = 1;
// Minimum battery required to turn on the lights, in %
optional int32 minimum_battery = 2 [default = 50];
// Lights will be shut off in any case after 22h00
optional int32 max_operating_window_end = 3 [default = 22];
}
optional string user_id = 1;
optional string password = 2;
optional Pool pool = 3;
optional Light light = 4;
}
message Location {
// pytz time zone
optional string timezone = 1 [default = 'UTC'];
// Northern Latitude
optional float latitude = 2;
// Eastern Longitude
optional float longitude = 3;
}
optional Tesla tesla = 1;
optional IAquaLink iaqualink = 2;
optional Location location = 3;
}