-
Notifications
You must be signed in to change notification settings - Fork 0
/
Solax_Monitor-childs-30.lua
168 lines (150 loc) · 4.52 KB
/
Solax_Monitor-childs-30.lua
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
-- Quickapp Solax Monitor childs
class 'solarpower'(QuickAppChild)
function solarpower:__init(dev)
QuickAppChild.__init(self,dev)
end
function solarpower:updateValue(data)
self:updateProperty("value", tonumber(data.solarPower))
self:updateProperty("unit", "Watt/m²")
self:updateProperty("log", solarM2 .." m²")
end
class 'yieldtoday'(QuickAppChild)
function yieldtoday:__init(dev)
QuickAppChild.__init(self,dev)
if fibaro.getValue(self.id, "rateType") ~= "production" then
self:updateProperty("rateType", "production")
self:warning("Changed rateType interface of Solax lastDayData child device (" ..self.id ..") to production")
end
end
function yieldtoday:updateValue(data)
self:updateProperty("value", tonumber(data.yieldtoday))
self:updateProperty("unit", "kWh")
self:updateProperty("log", "")
end
class 'yieldtotal'(QuickAppChild)
function yieldtotal:__init(dev)
QuickAppChild.__init(self,dev)
end
function yieldtotal:updateValue(data)
self:updateProperty("value", tonumber(data.yieldtotal))
self:updateProperty("unit", data.yieldtotalUnit)
self:updateProperty("log", "")
end
class 'feedinpower'(QuickAppChild)
function feedinpower:__init(dev)
QuickAppChild.__init(self,dev)
end
function feedinpower:updateValue(data)
self:updateProperty("value", tonumber(data.feedinpower))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'feedinenergy'(QuickAppChild)
function feedinenergy:__init(dev)
QuickAppChild.__init(self,dev)
end
function feedinenergy:updateValue(data)
self:updateProperty("value", tonumber(data.feedinenergy))
self:updateProperty("unit", "kWh")
self:updateProperty("log", "")
end
class 'consumeenergy'(QuickAppChild)
function consumeenergy:__init(dev)
QuickAppChild.__init(self,dev)
end
function consumeenergy:updateValue(data)
self:updateProperty("value", tonumber(data.consumeenergy))
self:updateProperty("unit", "kWh")
self:updateProperty("log", "")
end
class 'feedinpowerM2'(QuickAppChild)
function feedinpowerM2:__init(dev)
QuickAppChild.__init(self,dev)
end
function feedinpowerM2:updateValue(data)
self:updateProperty("value", tonumber(data.feedinpowerM2))
self:updateProperty("unit", "Watt/m²")
self:updateProperty("log", "")
end
class 'soc'(QuickAppChild)
function soc:__init(dev)
QuickAppChild.__init(self,dev)
end
function soc:updateValue(data)
self:updateProperty("value", tonumber(data.soc))
self:updateProperty("unit", "%")
self:updateProperty("log", "")
end
class 'peps1'(QuickAppChild)
function peps1:__init(dev)
QuickAppChild.__init(self,dev)
end
function peps1:updateValue(data)
self:updateProperty("value", tonumber(data.peps1))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'peps2'(QuickAppChild)
function peps2:__init(dev)
QuickAppChild.__init(self,dev)
end
function peps2:updateValue(data)
self:updateProperty("value", tonumber(data.peps2))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'peps3'(QuickAppChild)
function peps3:__init(dev)
QuickAppChild.__init(self,dev)
end
function peps3:updateValue(data)
self:updateProperty("value", tonumber(data.peps3))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'batPower'(QuickAppChild)
function batPower:__init(dev)
QuickAppChild.__init(self,dev)
end
function batPower:updateValue(data)
self:updateProperty("value", tonumber(data.batPower))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'powerdc1'(QuickAppChild)
function powerdc1:__init(dev)
QuickAppChild.__init(self,dev)
end
function powerdc1:updateValue(data)
self:updateProperty("value", tonumber(data.powerdc1))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'powerdc2'(QuickAppChild)
function powerdc2:__init(dev)
QuickAppChild.__init(self,dev)
end
function powerdc2:updateValue(data)
self:updateProperty("value", tonumber(data.powerdc2))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'powerdc3'(QuickAppChild)
function powerdc3:__init(dev)
QuickAppChild.__init(self,dev)
end
function powerdc3:updateValue(data)
self:updateProperty("value", tonumber(data.powerdc3))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
class 'powerdc4'(QuickAppChild)
function powerdc4:__init(dev)
QuickAppChild.__init(self,dev)
end
function powerdc4:updateValue(data)
self:updateProperty("value", tonumber(data.powerdc4))
self:updateProperty("unit", "Watt")
self:updateProperty("log", "")
end
-- EOF