return daylight
-# Condense the per Panel/Microinverter details down to
-# the information we want to print out later on
-def powerDetailsCondensed(powerDetails):
- powerCondensed = []
- for panel in powerDetails:
- panelData = {}
- panelData["name"] = panel["SNALIAS"]
- panelData["power"] = panel["POWER"]
- panelData["timestamp"] = panel["SITETIME"]
- powerCondensed.append(panelData)
-
- return(powerCondensed)
-
# Query all relevant System Information in one Session
def retrieveData(userName, password, stationId):
'whereCondition': f"{{\"STATIONID\":\"{stationId}\"}}"
},
timeout=(10, 60)).json()
- powerDetails = powerDetailsCondensed(r['Data']['QueryResults'])
+ powerDetails = r['Data']['QueryResults']
r = s.post('https://www.envertecportal.com/apiAccount/Logout',
timeout=(20, 40))
conf['config']['stationId'])
if args.printStatus:
- print(f"Reported Total Power: {currentPower[0]}")
+ print(f"Total Power: {currentPower[0]}")
for panel in currentPower[1]:
- print(f"{panel['name']}: {panel['power']} - {panel['timestamp']}")
+ print(f"{panel['SNALIAS']}: {panel['POWER']} - {panel['SITETIME']}")
if currentPower == 0:
if stateCheck('FAILED', conf['config']['stateFile']):