diff --git a/soliscloud/soliscloud.py b/soliscloud/soliscloud.py
--- a/soliscloud/soliscloud.py
+++ b/soliscloud/soliscloud.py
#
@@ -206,32 +206,37 @@ class SolisCloud:
#
self.printDebug('Returning mocked response')
#
- "collectorName" : "Soliscloud Acme collector",
#
- "dataTimestamp" : 123456789101112,
#
- "inverterTemperature" : 20,
#
- "batteryType" : "Solis Acme battery",
#
- "batteryPowerStr" : "kWh",
#
- "batteryPowerPec" : 50,
#
- "batteryVoltage" : 14,
#
- "batteryVoltageStr" : "V",
#
- "batteryCurrent" : 3,
#
- "batteryCurrentStr" : "A",
#
- "batteryTodayChargeEnergy" : 3,
#
- "batteryTodayChargeEnergyStr" : "kWh",
#
- "batteryTodayDischargeEnergy" : 1,
#
- "batteryTodayDischargeEnergyStr" : "kWh",
#
+ "msg" : "successful",
#
+ "collectorName" : "Soliscloud Acme collector",
#
+ "dataTimestamp" : 123456789101112,
#
+ "inverterTemperature" : 20,
#
+ "batteryType" : "Solis Acme battery",
#
+ "batteryPowerStr" : "kWh",
#
+ "batteryPowerPec" : 50,
#
+ "batteryVoltage" : 14,
#
+ "batteryVoltageStr" : "V",
#
+ "batteryCurrent" : 3,
#
+ "batteryCurrentStr" : "A",
#
+ "batteryTodayChargeEnergy" : 3,
#
+ "batteryTodayChargeEnergyStr" : "kWh",
#
+ "batteryTodayDischargeEnergy" : 1,
#
+ "batteryTodayDischargeEnergyStr" : "kWh",
#
@@ -271,6 +276,9 @@ class SolisCloud:
#
self.printDebug('Returning mocked response')
#
+ "msg" : "successful",
#
@@ -599,13 +607,13 @@ if __name__ == "__main__":
#
# The list detail doesn't tell us anything about batteries, so we need
#
# to iterate through and get details
#
- if not inverters or "page" not in inverters or "records" not in inverters['page']:
#
+ if not inverters or "data" not in inverters or "page" not in inverters['data'] or "records" not in inverters['data']['page']:
#
# TODO: do we _really_ want to exit at this point, or should we return
#
for inverter in inverters['data']['page']['records']:
#
- inverter_details = soliscloud.fetchInverterDetail(inverter['id'])
#
+ inverter_details = soliscloud.fetchInverterDetail(inverter['id'])['data']
#
print(inverter_details)
#
lp = extractBatteryStats(inverter_details, config)
#
inverter_lp = extractInverterStats(inverter_details, config)