Skip to content

Commit 50145d3

Browse files
Fixes syntax error and adds new route from PR #9 to Postman
1 parent e9bcdfb commit 50145d3

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

Enpahse Enlighten v4.postman_collection.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"response": []
158158
},
159159
{
160-
"name": "inverters_summary_by_envoy_or_site",
160+
"name": "Inverters Summary by Envoy or Site",
161161
"request": {
162162
"auth": {
163163
"type": "bearer",
@@ -204,6 +204,47 @@
204204
}
205205
},
206206
"response": []
207+
},
208+
{
209+
"name": "Microinverter Telemetry",
210+
"request": {
211+
"auth": {
212+
"type": "bearer",
213+
"bearer": [
214+
{
215+
"key": "token",
216+
"value": "{{access_token}}",
217+
"type": "string"
218+
}
219+
]
220+
},
221+
"method": "GET",
222+
"header": [],
223+
"url": {
224+
"raw": "https://api.enphaseenergy.com/api/v4/systems/{{system_id}}/telemetry/production_micro?key={{app_api_key}}",
225+
"protocol": "https",
226+
"host": [
227+
"api",
228+
"enphaseenergy",
229+
"com"
230+
],
231+
"path": [
232+
"api",
233+
"v4",
234+
"systems",
235+
"{{system_id}}",
236+
"telemetry",
237+
"production_micro"
238+
],
239+
"query": [
240+
{
241+
"key": "key",
242+
"value": "{{app_api_key}}"
243+
}
244+
]
245+
}
246+
},
247+
"response": []
207248
}
208249
]
209250
}

utils/enlightenAPI_v4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __assert_success(self, res, exit_on_failure = True):
1717
If exit_on_failure, returned whether the web request was successful
1818
'''
1919
if res.status_code != 200:
20-
dl.error("Server Responded: " + str(res.status_code) + " - " + res.text)
20+
print("Server Responded: " + str(res.status_code) + " - " + res.text)
2121
if exit_on_failure:
2222
quit()
2323
else:

0 commit comments

Comments
 (0)