thomluther / ha-anker-solix

Home Assistant integration for Anker Solix Power devices
MIT License
294 stars 4 forks source link

Unable to login due to failed requests /compatible/get_ota_update and /device/get_device_home_load #94

Closed GRNspz closed 4 months ago

GRNspz commented 4 months ago

System Health details

System Information

version core-2024.7.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4869 Installed Version | 1.34.0 Stage | running Available Repositories | 1384 Downloaded Repositories | 4
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 13. Juli 2025 um 02:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | eu-central-1-20.ui.nabu.casa certificate_status | ready instance_id | f402486bbba142c5832c02848b088d06 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 28.0 GB disk_used | 9.4 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | green supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), Studio Code Server (5.15.0), SQLite Web (4.2.0)
Dashboards dashboards | 2 -- | -- resources | 2 views | 5 mode | storage
Recorder oldest_recorder_run | 15. Juli 2024 um 11:55 -- | -- current_recorder_run | 24. Juli 2024 um 10:55 estimated_db_size | 1932.43 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

In my Solix account I have exactly one system with exactly one device, a solarbank 2. I have not been able to integrate this to my home assistant system due to failing requests to the two endpoints mentioned in the title of this issue.

Note: Debug logs and diagnostics dump do not have matching timestamps but since the error is reproducable with the same diagnostircs dump errors I consider this okay. Debug logs have been shortened due to the issue length limitation (basically deleted things that did not produce any visible problems)

Reproduction steps

  1. Install repository as described.
  2. Install integration via UI.
  3. Expected: Integration is available
  4. Got instead: Installation fails with error:

    Einrichtung fehlgeschlagen, wird erneut versucht: Api Request Error: <class 'custom_components.anker_solix.solixapi.errors.AnkerSolixError'>: (10004) Anker Api Error: Failed to request.

Debug logs

2024-07-24 11:24:54.198 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration anker_solix which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-07-24 11:24:54.202 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-07-24 11:24:55.594 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.46 seconds
2024-07-24 11:24:55.595 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.46 seconds
2024-07-24 11:24:55.595 INFO (MainThread) [homeassistant.bootstrap] Setting up frontend, recorder: {'recorder', 'frontend'}
2024-07-24 11:24:55.597 INFO (MainThread) [homeassistant.setup] Setting up http
2024-07-24 11:25:05.162 INFO (MainThread) [homeassistant.setup] Setting up hacs
2024-07-24 11:25:05.163 INFO (MainThread) [homeassistant.setup] Setup of domain hacs took 0.00 seconds
2024-07-24 11:25:05.164 INFO (MainThread) [custom_components.hacs] 
-------------------------------------------------------------------
HACS (Home Assistant Community Store)

Version: 1.34.0
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/hacs/integration/issues
-------------------------------------------------------------------

2024-07-24 11:25:05.182 INFO (MainThread) [homeassistant.setup] Setting up counter
2024-07-24 11:25:05.188 INFO (MainThread) [homeassistant.setup] Setup of domain counter took 0.01 seconds
2024-07-24 11:25:05.226 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore started
2024-07-24 11:25:06.972 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore done
2024-07-24 11:25:06.994 INFO (MainThread) [homeassistant.setup] Setting up utility_meter
2024-07-24 11:25:06.995 INFO (MainThread) [homeassistant.setup] Setup of domain utility_meter took 0.00 seconds
2024-07-24 11:25:07.362 INFO (MainThread) [custom_components.hacs] Enable category: integration
2024-07-24 11:25:07.364 INFO (MainThread) [custom_components.hacs] Enable category: plugin
2024-07-24 11:25:07.367 INFO (MainThread) [custom_components.hacs] Enable category: theme
2024-07-24 11:25:07.397 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/frontend", "/config/custom_components/hacs/hacs_frontend", False)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 54: hass.http.register_static_path(f"{URL_BASE}/frontend", locate_dir(), cache_headers=False), please create a bug report at https://github.com/hacs/integration/issues
2024-07-24 11:25:07.428 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/iconset.js", "/config/custom_components/hacs/iconset.js", True)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 57: hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-07-24 11:25:07.441 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-07-24 11:25:07.443 INFO (MainThread) [custom_components.hacs] Setting up plugin endpoint
2024-07-24 11:25:07.443 INFO (MainThread) [custom_components.hacs] <HacsFrontend> storage mode, cache for /hacsfiles/: True
2024-07-24 11:25:07.459 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles", "/config/www/community", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1162: self.hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-07-24 11:25:15.307 INFO (MainThread) [homeassistant.components.sensor] Setting up hacs.sensor
2024-07-24 11:25:15.310 INFO (MainThread) [custom_components.hacs] Stage changed: setup
2024-07-24 11:25:15.314 INFO (MainThread) [custom_components.hacs] Stage changed: waiting
2024-07-24 11:25:15.314 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
2024-07-24 11:25:15.722 INFO (MainThread) [gql.transport.websockets] >>> {"type": "connection_init", "payload": {"token": "axk40iS05wSS5jPFesj2JLONdTiXxMSNlpvoXaedpCk"}}
2024-07-24 11:25:15.800 INFO (MainThread) [gql.transport.websockets] <<< {"type":"connection_ack"}
2024-07-24 11:25:17.274 INFO (MainThread) [gql.transport.websockets] >>> {"id": "1", "type": "subscribe", "payload": {"query": "subscription {\n  liveMeasurement(homeId: \"1e68295a-689a-425a-9a64-3664d906974e\") {\n    accumulatedConsumption\n    accumulatedConsumptionLastHour\n    accumulatedCost\n    accumulatedProduction\n    accumulatedProductionLastHour\n    accumulatedReward\n    averagePower\n    currency\n    currentL1\n    currentL2\n    currentL3\n    lastMeterConsumption\n    lastMeterProduction\n    maxPower\n    minPower\n    power\n    powerFactor\n    powerProduction\n    powerReactive\n    signalStrength\n    timestamp\n    voltagePhase1\n    voltagePhase2\n    voltagePhase3\n  }\n}"}}
2024-07-24 11:25:18.916 INFO (MainThread) [homeassistant.components.notify] Setting up notify.tibber
2024-07-24 11:25:23.554 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":{"accumulatedConsumption":13.5045,"accumulatedConsumptionLastHour":0.4069,"accumulatedCost":3.795317,"accumulatedProduction":0.0914,"accumulatedProductionLastHour":0,"accumulatedReward":null,"averagePower":1181.9,"currency":"EUR","currentL1":null,"currentL2":null,"currentL3":null,"lastMeterConsumption":1896.8278,"lastMeterProduction":49.0459,"maxPower":5330,"minPower":0,"power":934,"powerFactor":null,"powerProduction":0,"powerReactive":null,"signalStrength":null,"timestamp":"2024-07-24T11:25:23.000+02:00","voltagePhase1":null,"voltagePhase2":null,"voltagePhase3":null}}}}
2024-07-24 11:25:26.845 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":{"accumulatedConsumption":13.505,"accumulatedConsumptionLastHour":0.4074,"accumulatedCost":3.795426,"accumulatedProduction":0.0914,"accumulatedProductionLastHour":0,"accumulatedReward":null,"averagePower":1181.9,"currency":"EUR","currentL1":null,"currentL2":null,"currentL3":null,"lastMeterConsumption":1896.8283,"lastMeterProduction":49.0459,"maxPower":5330,"minPower":0,"power":943,"powerFactor":null,"powerProduction":0,"powerReactive":null,"signalStrength":null,"timestamp":"2024-07-24T11:25:26.000+02:00","voltagePhase1":null,"voltagePhase2":null,"voltagePhase3":null}}}}
2024-07-24 11:25:41.481 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 47.29s
2024-07-24 11:25:41.482 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2024-07-24 11:25:41.626 INFO (MainThread) [custom_components.hacs] Stage changed: startup
2024-07-24 11:25:41.646 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-07-24 11:25:41.648 INFO (MainThread) [custom_components.hacs] Loading removed repositories
2024-07-24 11:25:41.667 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":{"accumulatedConsumption":13.5092,"accumulatedConsumptionLastHour":0.4116,"accumulatedCost":3.796344,"accumulatedProduction":0.0914,"accumulatedProductionLastHour":0,"accumulatedReward":null,"averagePower":1181.8,"currency":"EUR","currentL1":null,"currentL2":null,"currentL3":null,"lastMeterConsumption":1896.8325,"lastMeterProduction":49.0459,"maxPower":5330,"minPower":0,"power":975,"powerFactor":null,"powerProduction":0,"powerReactive":null,"signalStrength":null,"timestamp":"2024-07-24T11:25:41.000+02:00","voltagePhase1":null,"voltagePhase2":null,"voltagePhase3":null}}}}
2024-07-24 11:25:41.890 INFO (MainThread) [custom_components.hacs] Loading known repositories
2024-07-24 11:25:42.124 INFO (MainThread) [custom_components.hacs] Starting recurring background task for downloaded repositories
2024-07-24 11:25:42.127 INFO (MainThread) [custom_components.hacs] Stage changed: running
2024-07-24 11:25:44.817 INFO (SyncWorker_6) [homeassistant.loader] Loaded upnp from homeassistant.components.upnp
2024-07-24 11:25:44.840 INFO (SyncWorker_3) [homeassistant.loader] Loaded ipp from homeassistant.components.ipp
2024-07-24 11:25:44.840 INFO (SyncWorker_4) [homeassistant.loader] Loaded dlna_dms from homeassistant.components.dlna_dms
2024-07-24 11:30:51.251 INFO (MainThread) [homeassistant.setup] Setting up anker_solix
2024-07-24 11:30:53.844 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":{"accumulatedConsumption":13.5904,"accumulatedConsumptionLastHour":0.4928,"accumulatedCost":3.814075,"accumulatedProduction":0.0914,"accumulatedProductionLastHour":0,"accumulatedReward":null,"averagePower":1180,"currency":"EUR","currentL1":null,"currentL2":null,"currentL3":null,"lastMeterConsumption":1896.9137,"lastMeterProduction":49.0459,"maxPower":5330,"minPower":0,"power":895,"powerFactor":null,"powerProduction":0,"powerReactive":null,"signalStrength":null,"timestamp":"2024-07-24T11:30:53.000+02:00","voltagePhase1":null,"voltagePhase2":null,"voltagePhase3":null}}}}
2024-07-24 11:30:54.930 ERROR (MainThread) [custom_components.anker_solix] (10004) Anker Api Error: Failed to request.
2024-07-24 11:30:54.933 ERROR (MainThread) [custom_components.anker_solix] Response Text: {"code":10004,"msg":"Failed to request.","trace_id":"e4e0da742d5cf557c2665233d382d0ef"}

Diagnostics dump

2024-07-24 10:56:57.921 DEBUG (MainThread) [custom_components.anker_solix] Api Coordinator is updating sites 2024-07-24 10:56:57.921 DEBUG (MainThread) [custom_components.anker_solix] Updating Sites data 2024-07-24 10:56:57.922 DEBUG (MainThread) [custom_components.anker_solix] Getting site list 2024-07-24 10:56:57.932 DEBUG (MainThread) [custom_components.anker_solix] Loaded JSON from file /config/custom_components/anker_solix/solixapi/authcache/sa###masked###mail###m.json: 2024-07-24 10:56:57.933 DEBUG (MainThread) [custom_components.anker_solix] Data: {'user_id': '2e###masked###b68c###masked###b40d###mas', 'email': 'sa###masked###mail###m', 'nick_name': 'sas', 'auth_token': '42###masked###d51a###masked###e095###masked###2f', 'token_expires_at': 1722416146, 'avatar': '', 'mac_addr': '', 'domain': '', 'ab_code': 'DE', 'token_id': 46480989, 'geo_key': 'AI###masked###j_R4###masked###Tg2m###ma', 'privilege': 0, 'phone_code': '49', 'phone': '', 'phone_number': '', 'phone_code_2fa': '', 'phone_2fa': '', 'server_secret_info': {'public_key': '04c809d2534c48cfedc01dbcc2aadeb302e81f282a1584ec244afed13332ec366306cdcd5eb617c1f484ce1c88ea8455a7880d1ddd37dcd60179eccc0f689283a4'}, 'params': [], 'trust_list': None, 'fa_info': {'step': 0, 'info': ''}, 'country_code': 'DE', 'ap_cloud_user_id': '2eb4e491527b78b68c1932e34f69b8b40db9efbc'} 2024-07-24 10:56:57.942 DEBUG (MainThread) [custom_components.anker_solix] Cached Login for sa###masked###mail###m from 2024-07-24T10:55:46.773655: 2024-07-24 10:56:57.942 DEBUG (MainThread) [custom_components.anker_solix] {'user_id': '2e###masked###b68c###masked###b40d###mas', 'email': 'sa###masked###mail###m', 'nick_name': 'sas', 'auth_token': '42###masked###d51a###masked###e095###masked###2f', 'token_expires_at': 1722416146, 'avatar': '', 'mac_addr': '', 'domain': '', 'ab_code': 'DE', 'token_id': 46480989, 'geo_key': 'AI###masked###j_R4###masked###Tg2m###ma', 'privilege': 0, 'phone_code': '49', 'phone': '', 'phone_number': '', 'phone_code_2fa': '', 'phone_2fa': '', 'server_secret_info': {'public_key': '04c809d2534c48cfedc01dbcc2aadeb302e81f282a1584ec244afed13332ec366306cdcd5eb617c1f484ce1c88ea8455a7880d1ddd37dcd60179eccc0f689283a4'}, 'params': [], 'trust_list': None, 'fa_info': {'step': 0, 'info': ''}, 'country_code': 'DE', 'ap_cloud_user_id': '2eb4e491527b78b68c1932e34f69b8b40db9efbc'} 2024-07-24 10:56:57.943 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/site/get_site_list 2024-07-24 10:56:57.943 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:57.944 DEBUG (MainThread) [custom_components.anker_solix] Request Body: None 2024-07-24 10:56:58.090 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/site/get_site_list response received 2024-07-24 10:56:58.090 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:58 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '348', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '1c97126491a74d46afdf3953b978e5d9', 'Traceparent': '00-1c97126491a74d46afdf3953b978e5d9-5df954ff17d11a41-00', 'Server': 'APISIX')> 2024-07-24 10:56:58.092 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'site_list': [{'site_id': 'f408434b-5dec-465a-819b-d18728de64f2', 'site_name': 'Anker', 'site_img': '', 'device_type_list': [3], 'ms_type': 1, 'power_site_type': 5, 'is_allow_delete': True, 'support_device_models': ['A17C1', 'A17X7', 'A17X8'], 'current_site_device_models': ['A17C1']}]}, 'trace_id': '1c97126491a74d46afdf3953b978e5d9'} 2024-07-24 10:56:58.093 DEBUG (MainThread) [custom_components.anker_solix] Getting scene info for site 2024-07-24 10:56:58.094 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/site/get_scen_info 2024-07-24 10:56:58.095 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:58.095 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2'} 2024-07-24 10:56:58.495 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/site/get_scen_info response received 2024-07-24 10:56:58.495 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:58 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '1836', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '80d9132488b6036decbdf886c55a742a', 'Traceparent': '00-80d9132488b6036decbdf886c55a742a-3f99851a651f25dd-00', 'Server': 'APISIX')> 2024-07-24 10:56:58.496 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'home_info': {'home_name': 'Home', 'home_img': '', 'charging_power': '0.00', 'power_unit': 'W'}, 'solar_list': [], 'pps_info': {'pps_list': [], 'total_charging_power': '0.00', 'power_unit': 'W', 'total_battery_power': '0.00', 'updated_time': '', 'pps_status': 0}, 'statistics': [{'type': '1', 'total': '10.52', 'unit': 'kWh'}, {'type': '2', 'total': '10.48', 'unit': 'kg'}, {'type': '3', 'total': '3.15', 'unit': '€'}], 'topology_type': '1', 'solarbank_info': {'solarbank_list': [{'device_pn': 'A17C1', 'device_sn': 'APCGQ80E22400516', 'device_name': 'Solarbank 2 E1600 Pro', 'device_img': 'https://public-aiot-fra-prod.s3.dualstack.eu-central-1.amazonaws.com/anker-power/public/product/2024/05/24/iot-admin/5iJoq1dk63i47HuR/picl_A17C1_normal%281%29.png', 'battery_power': '25', 'bind_site_status': '', 'charging_power': '479', 'power_unit': 'W', 'charging_status': '0', 'status': '1', 'wireless_type': '1', 'main_version': '', 'photovoltaic_power': '459', 'output_power': '479', 'create_time': 1721476822, 'set_load_power': '', 'sub_package_num': 0, 'output_cutoff_data': 10, 'is_display': True}], 'total_charging_power': '0', 'power_unit': 'W', 'charging_status': '0', 'total_battery_power': '0.25', 'updated_time': '1970-01-01 00:00:00', 'total_photovoltaic_power': '459', 'total_output_power': '479.00', 'display_set_power': False, 'battery_discharge_power': '20', 'ac_power': '0', 'to_home_load': '479', 'is_display_data': True, 'solar_power_1': '241', 'solar_power_2': '218', 'solar_power_3': '0', 'solar_power_4': '0'}, 'retain_load': '480W', 'scene_mode': 3, 'home_load_power': '479', 'updated_time': '01-01-0001 00:00:00', 'power_site_type': 5, 'site_id': 'f408434b-5dec-465a-819b-d18728de64f2', 'powerpanel_list': [], 'grid_info': None, 'is_downgrade': False, 'error_code': 0, 'smart_plug_info': None, 'feature_switch': {'multi_pv': True, 'smart_plug': True}, 'other_loads_power': '479'}, 'trace_id': '80d9132488b6036decbdf886c55a742a'} 2024-07-24 10:56:58.497 DEBUG (MainThread) [custom_components.anker_solix] Api Coordinator sas is updating devices 2024-07-24 10:56:58.497 DEBUG (MainThread) [custom_components.anker_solix] Updating Sites Details 2024-07-24 10:56:58.497 DEBUG (MainThread) [custom_components.anker_solix] Getting unread messages indicator 2024-07-24 10:56:58.498 DEBUG (MainThread) [custom_components.anker_solix] Request Url: GET https://ankerpower-api-eu.anker.com/power_service/v1/get_message_unread 2024-07-24 10:56:58.499 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:58.499 DEBUG (MainThread) [custom_components.anker_solix] Request Body: None 2024-07-24 10:56:58.821 DEBUG (MainThread) [custom_components.anker_solix] sas request get https://ankerpower-api-eu.anker.com/power_service/v1/get_message_unread response received 2024-07-24 10:56:58.821 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:58 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '105', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '7d921752f3db6b89bf8abc15a330af5e', 'Traceparent': '00-7d921752f3db6b89bf8abc15a330af5e-35e04db88b7bcec7-00', 'Server': 'APISIX')> 2024-07-24 10:56:58.822 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'has_unread_msg': False}, 'trace_id': '7d921752f3db6b89bf8abc15a330af5e'} 2024-07-24 10:56:58.822 DEBUG (MainThread) [custom_components.anker_solix] Getting price and CO2 settings for site 2024-07-24 10:56:58.823 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/site/get_site_price 2024-07-24 10:56:58.824 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:58.824 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2'} 2024-07-24 10:56:59.151 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/site/get_site_price response received 2024-07-24 10:56:59.152 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:59 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '180', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '4924a85f0aa33aff87d35b88cd645c52', 'Traceparent': '00-4924a85f0aa33aff87d35b88cd645c52-5bcc068083d92f41-00', 'Server': 'APISIX')> 2024-07-24 10:56:59.152 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2', 'price': 0.3, 'site_co2': 0, 'site_price_unit': '€'}, 'trace_id': '4924a85f0aa33aff87d35b88cd645c52'} 2024-07-24 10:56:59.153 DEBUG (MainThread) [custom_components.anker_solix] Updating Device Details 2024-07-24 10:56:59.153 DEBUG (MainThread) [custom_components.anker_solix] Getting bind devices 2024-07-24 10:56:59.154 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/get_relate_and_bind_devices 2024-07-24 10:56:59.154 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:59.155 DEBUG (MainThread) [custom_components.anker_solix] Request Body: None 2024-07-24 10:56:59.489 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/get_relate_and_bind_devices response received 2024-07-24 10:56:59.489 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:59 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '842', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '7c6582ac87aa0021959744ea745b6b40', 'Traceparent': '00-7c6582ac87aa0021959744ea745b6b40-c83e5331d256c225-00', 'Server': 'APISIX')> 2024-07-24 10:56:59.490 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'data': [{'device_sn': 'APCGQ80E22400516', 'product_code': 'A17C1', 'bt_ble_id': 'F4:9D:8A:0C:7B:DE', 'bt_ble_mac': 'F49D8A0C7BDE', 'device_name': 'Solarbank 2 E1600 Pro', 'alias_name': 'Solarbank 2 E1600 Pro', 'img_url': 'https://public-aiot-fra-prod.s3.dualstack.eu-central-1.amazonaws.com/anker-power/public/product/2024/05/24/iot-admin/5iJoq1dk63i47HuR/picl_A17C1_normal%281%29.png', 'link_time': 1721475883, 'wifi_online': True, 'wifi_name': '', 'relate_type': ['ble', 'wifi'], 'charge': False, 'bws_surplus': 0, 'device_sw_version': 'v1.0.5.5', 'has_manual': True, 'hes_data': None, 'tag': 'Dining Room', 'tag_img': 'https://public-aiot-fra-prod.s3.dualstack.eu-central-1.amazonaws.com/anker-power/public/product/2024/06/17/iot-admin/Te3LpcS7jXZhS924/icl_A17X8_location_Dining%20Room.png'}]}, 'trace_id': '7c6582ac87aa0021959744ea745b6b40'} 2024-07-24 10:56:59.491 DEBUG (MainThread) [custom_components.anker_solix] Getting OTA settings 2024-07-24 10:56:59.492 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/get_auto_upgrade 2024-07-24 10:56:59.492 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:59.493 DEBUG (MainThread) [custom_components.anker_solix] Request Body: None 2024-07-24 10:56:59.825 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/get_auto_upgrade response received 2024-07-24 10:56:59.825 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:56:59 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '121', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': 'b620579ad8caed7a8a52320713fa89fe', 'Traceparent': '00-b620579ad8caed7a8a52320713fa89fe-d1fd7933e6acaa15-00', 'Server': 'APISIX')> 2024-07-24 10:56:59.826 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'main_switch': False, 'device_list': None}, 'trace_id': 'b620579ad8caed7a8a52320713fa89fe'} 2024-07-24 10:56:59.826 DEBUG (MainThread) [custom_components.anker_solix] Getting wifi list of site for mapping to device 2024-07-24 10:56:59.827 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/site/get_wifi_info_list 2024-07-24 10:56:59.828 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:56:59.828 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2'} 2024-07-24 10:57:00.171 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/site/get_wifi_info_list response received 2024-07-24 10:57:00.171 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:57:00 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '193', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '71e13f85e40c44da4c60c42acff49583', 'Traceparent': '00-71e13f85e40c44da4c60c42acff49583-2c7172cbb08c88ee-00', 'Server': 'APISIX')> 2024-07-24 10:57:00.172 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'wifi_info_list': [{'wifi_name': 'Auenland\x00\x00\x00\x00\x00\x00\x00\x00', 'wifi_signal': '90'}]}, 'trace_id': '71e13f85e40c44da4c60c42acff49583'} 2024-07-24 10:57:00.172 DEBUG (MainThread) [custom_components.anker_solix] Getting Power Cutoff settings for device 2024-07-24 10:57:00.175 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_power_cutoff 2024-07-24 10:57:00.175 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:57:00.176 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2', 'device_sn': 'APCGQ80E22400516'} 2024-07-24 10:57:00.514 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_power_cutoff response received 2024-07-24 10:57:00.515 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:57:00 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '294', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': '00722a935dc621b09ba29bad8dbb85b1', 'Traceparent': '00-00722a935dc621b09ba29bad8dbb85b1-33563cf667398fb4-00', 'Server': 'APISIX')> 2024-07-24 10:57:00.515 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'power_cutoff_data': [{'id': 1, 'is_selected': 1, 'output_cutoff_data': 10, 'lowpower_input_data': 5, 'input_cutoff_data': 10}, {'id': 2, 'is_selected': 0, 'output_cutoff_data': 5, 'lowpower_input_data': 4, 'input_cutoff_data': 5}]}, 'trace_id': '00722a935dc621b09ba29bad8dbb85b1'} 2024-07-24 10:57:00.515 DEBUG (MainThread) [custom_components.anker_solix] Getting OTA update info for device 2024-07-24 10:57:00.517 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_ota_update 2024-07-24 10:57:00.517 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:57:00.518 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'device_sn': 'APCGQ80E22400516', 'insert_sn': ''} 2024-07-24 10:57:00.952 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_ota_update response received 2024-07-24 10:57:00.952 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:57:00 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '84', 'Connection': 'keep-alive', 'Bizcode': '-1', 'Trace': '492bfcb13d666009f8a8fca818e9b1d3', 'Traceparent': '00-492bfcb13d666009f8a8fca818e9b1d3-bf83ce03e5101076-00', 'Server': 'APISIX')> 2024-07-24 10:57:00.953 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': -1, 'msg': 'Failed to request.', 'trace_id': '492bfcb13d666009f8a8fca818e9b1d3'} 2024-07-24 10:57:00.953 DEBUG (MainThread) [custom_components.anker_solix] Getting inverter settings for device 2024-07-24 10:57:00.954 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_compatible_solar_info 2024-07-24 10:57:00.955 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:57:00.955 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'solarbank_sn': 'APCGQ80E22400516'} 2024-07-24 10:57:01.290 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/compatible/get_compatible_solar_info response received 2024-07-24 10:57:01.291 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:57:01 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '220', 'Connection': 'keep-alive', 'Bizcode': '0', 'Trace': 'e4cebf670117930ebe28a69a60fd401c', 'Traceparent': '00-e4cebf670117930ebe28a69a60fd401c-895dcfd565ae59b9-00', 'Server': 'APISIX')> 2024-07-24 10:57:01.291 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 0, 'msg': 'success!', 'data': {'brand_id': '8bd6d6f5-2485-4995-80ee-97e4eca9eff9', 'solar_brand': 'Others', 'solar_model': 'Others', 'solar_sn': '', 'solar_model_name': 'Others'}, 'trace_id': 'e4cebf670117930ebe28a69a60fd401c'} 2024-07-24 10:57:01.292 DEBUG (MainThread) [custom_components.anker_solix] Getting schedule details for device 2024-07-24 10:57:01.293 DEBUG (MainThread) [custom_components.anker_solix] Request Url: POST https://ankerpower-api-eu.anker.com/power_service/v1/app/device/get_device_home_load 2024-07-24 10:57:01.293 DEBUG (MainThread) [custom_components.anker_solix] Request Headers: {'Content-Type': 'application/json', 'Model-Type': 'DESKTOP', 'App-Name': 'anker_power', 'Os-Type': 'android', 'Country': 'DE', 'Timezone': 'GMT+02:00', 'x-auth-token': '42###masked###d51a###masked###e095###masked###2f', 'gtoken': '35###masked###5ed1###masked###8b'} 2024-07-24 10:57:01.294 DEBUG (MainThread) [custom_components.anker_solix] Request Body: {'site_id': 'f408434b-5dec-465a-819b-d18728de64f2', 'device_sn': 'APCGQ80E22400516'} 2024-07-24 10:57:01.642 DEBUG (MainThread) [custom_components.anker_solix] sas request post https://ankerpower-api-eu.anker.com/power_service/v1/app/device/get_device_home_load response received 2024-07-24 10:57:01.642 DEBUG (MainThread) [custom_components.anker_solix] Response Headers: <CIMultiDictProxy('Date': 'Wed, 24 Jul 2024 08:57:01 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '87', 'Connection': 'keep-alive', 'Bizcode': '10004', 'Trace': '7327c109aeb1d1e343ddaa571e7845c7', 'Traceparent': '00-7327c109aeb1d1e343ddaa571e7845c7-8ea5c956b285649d-00', 'Server': 'APISIX')> 2024-07-24 10:57:01.642 DEBUG (MainThread) [custom_components.anker_solix] Response Data: {'code': 10004, 'msg': 'Failed to request.', 'trace_id': '7327c109aeb1d1e343ddaa571e7845c7'} 2024-07-24 10:57:01.643 ERROR (MainThread) [custom_components.anker_solix] (10004) Anker Api Error: Failed to request. 2024-07-24 10:57:01.643 ERROR (MainThread) [custom_components.anker_solix] Response Text: {"code":10004,"msg":"Failed to request.","trace_id":"7327c109aeb1d1e343ddaa571e7845c7"} 2024-07-24 10:57:01.643 DEBUG (MainThread) [custom_components.anker_solix] Finished fetching anker_solix_sas*** data in 3.722 seconds (success: False)

thomluther commented 4 months ago

Can you confirm the version of the integration? Is this the new 2.0.0 pre-release already? Or the old release that does not support Solarbank 2 yet? The mentioned endpoints should not be queried for Solarbank 2 system with the latest 2.0.0 pre-release

GRNspz commented 4 months ago

It is version 1.3.2. Nevermind - I thought it would be the most recent version but I should have activated "show beta versions" before downloading. Gonna try again with 2.0.0 and give an update in a second.

GRNspz commented 4 months ago

Works like a charm! Sorry to bother you, and thank you so much for your invaluable work! Have a great day!