@@ -80,6 +80,23 @@ def has_inverter(self):
8080 )
8181 return request .get ()
8282
83+ def get_historical_generation (self , start , end ):
84+ """
85+ Given a start and end timestamp return the generation
86+ data.
87+ :param start: unix timestamp
88+ :param end: unix timestamp
89+ :return: list of lists of data
90+ """
91+ request = ApiRequest (
92+ path = 'v2/deployments/{}/generation/historical/p' .format (self .user_key ),
93+ controller = self ,
94+ schema = {
95+ 'solarP' : {}
96+ }
97+ )
98+ return request .query (start , end )
99+
83100 @property
84101 def latest_historical_generation (self ):
85102 """
@@ -95,6 +112,23 @@ def latest_historical_generation(self):
95112 )
96113 return request .get ()
97114
115+ def get_historical_house (self , start , end ):
116+ """
117+ Given a start and end timestamp return the house
118+ data.
119+ :param start: unix timestamp
120+ :param end: unix timestamp
121+ :return: list of lists of data
122+ """
123+ request = ApiRequest (
124+ path = 'v2/deployments/{}/house/historical' .format (self .user_key ),
125+ controller = self ,
126+ schema = {
127+ 'houseP' : {}
128+ }
129+ )
130+ return request .query (start , end )
131+
98132 @property
99133 def latest_historical_house (self ):
100134 """
@@ -112,6 +146,23 @@ def latest_historical_house(self):
112146 )
113147 return request .get ()
114148
149+ def get_historical_grid_credits (self , start , end ):
150+ """
151+ Given a start and end timestamp return the gridcredits
152+ data.
153+ :param start: unix timestamp
154+ :param end: unix timestamp
155+ :return: list of lists of data
156+ """
157+ request = ApiRequest (
158+ path = 'v2/deployments/{}/gridcredits/historical' .format (self .user_key ),
159+ controller = self ,
160+ schema = {
161+ 'gridcredits' : {}
162+ }
163+ )
164+ return request .query (start , end )
165+
115166 @property
116167 def latest_historical_grid_credits (self ):
117168 """
@@ -128,6 +179,23 @@ def latest_historical_grid_credits(self):
128179 )
129180 return request .get ()
130181
182+ def get_historical_inverter (self , start , end ):
183+ """
184+ Given a start and end timestamp return the inverter
185+ data.
186+ :param start: unix timestamp
187+ :param end: unix timestamp
188+ :return: list of lists of data
189+ """
190+ request = ApiRequest (
191+ path = 'v2/deployments/{}/inverter/historical/p' .format (self .user_key ),
192+ controller = self ,
193+ schema = {
194+ 'inverterP' : {}
195+ }
196+ )
197+ return request .query (start , end )
198+
131199 @property
132200 def latest_historical_inverter (self ):
133201 """
@@ -143,6 +211,23 @@ def latest_historical_inverter(self):
143211 )
144212 return request .get ()
145213
214+ def get_historical_meter (self , start , end ):
215+ """
216+ Given a start and end timestamp return the meter
217+ data.
218+ :param start: unix timestamp
219+ :param end: unix timestamp
220+ :return: list of lists of data
221+ """
222+ request = ApiRequest (
223+ path = 'v2/deployments/{}/meter/historical/p' .format (self .user_key ),
224+ controller = self ,
225+ schema = {
226+ 'meterP' : {}
227+ }
228+ )
229+ return request .query (start , end )
230+
146231 @property
147232 def latest_historical_meter (self ):
148233 """
0 commit comments