diff --git a/soliscloud/soliscloud.py b/soliscloud/soliscloud.py
--- a/soliscloud/soliscloud.py
+++ b/soliscloud/soliscloud.py
#
@@ -53,10 +53,9 @@ import time
#
- def __init__(self, config, session=False, debug=False, mock=False):
#
+ def __init__(self, config, session=False, debug=False):
#
@@ -202,43 +201,7 @@ class SolisCloud:
#
headers = self.doAuth(self.config['api_id'], self.config['api_secret'], req_path, req_body)
#
self.printDebug(f'Built request - Headers {headers}, body: {req_body}, path: {req_path}')
#
- self.printDebug('Returning mocked response')
#
- "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",
#
f"{self.config['api_url']}{req_path}",
#
@@ -272,45 +235,7 @@ class SolisCloud:
#
headers = self.doAuth(self.config['api_id'], self.config['api_secret'], req_path, req_body)
#
self.printDebug(f'Built request - Headers {headers}, body: {req_body}, path: {req_path}')
#
- self.printDebug('Returning mocked response')
#
- "msg" : "successful",
#
- "stationStatusVo" : {
#
- # Note: The API doc says this is a long
#
- # but, the value returned to a similar call made by the cloud UI is a string
#
- # 1:Online 2:Offline 3:Alarm
#
- "dataTimeStamp" : 1234567891011,
#
- "collectorSn" : "181920",
#
- "series" : "Solis Acme Inverter",
#
f"{self.config['api_url']}{req_path}",
#
@@ -346,47 +271,7 @@ class SolisCloud:
#
headers = self.doAuth(self.config['api_id'], self.config['api_secret'], req_path, req_body)
#
self.printDebug(f'Built request - Headers {headers}, body: {req_body}, path: {req_path}')
#
- self.printDebug('Returning mocked response')
#
- "stationStatusVo" : {
#
- # Note: The API doc says this is a long
#
- # but, the value returned to a similar call made by the cloud UI is a string
#
- "capacityStr": "kWp",
#
- "capacityPercent": 0.0,
#
- "installerId" : 4567,
#
- "dataTimestamp" : "1683905510946",
#
- "dayEnergyStr" : "kWh",
#
- "batteryTotalDischargeEnergy" : 0.0,
#
- "batteryTotalChargeEnergy" : 0.0,
#
- "condTxtD": "Cloudy",
#
f"{self.config['api_url']}{req_path}",
#
@@ -612,12 +497,8 @@ if __name__ == "__main__":
#
# Are we running in debug mode?
#
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
#
- # TODO: This should eventually be false
#
- # but having mock responses is the only way to proceed until I've got
#
config = configFromEnv()
#
- soliscloud = SolisCloud(config, debug=DEBUG, mock=MOCK)
#
+ soliscloud = SolisCloud(config, debug=DEBUG)
#
stations = soliscloud.fetchStationList()