MorneSaunders360 / Solar-Sunsynk

Monitor your energy generation, storage, and usage data using an unofficial API from Sunsynk
MIT License
9 stars 2 forks source link

TypeError: 'NoneType' object is not iterable #13

Closed acormack closed 3 months ago

acormack commented 3 months ago

Hi Morne

I have been running Solar-Sunsynk for many months without problem - Many Thanks! But it now has started hanging with the error below. If I restart Home Assistant it works for a few minutes, then the error recurrs.

Please can you help?

I am running v1.05 on 3.6Kw inverter in UK.

======================================= This error originated from a custom integration. Logger: custom_components.solar_sunsynk Source: helpers/update_coordinator.py:318 integration: Solar Sunsynk (documentation, issues) First occurred: 10:12:45 (2 occurrences) Last logged: 10:13:15

Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable

alz41 commented 3 months ago

This aswell

Logger: custom_components.solar_sunsynk.sunsynkapi Source: custom_components/solar_sunsynk/sunsynkapi.py:61 integration: Solar Sunsynk (documentation, issues) First occurred: 01:44:28 (4 occurrences) Last logged: 02:04:31

Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10&name=&status= (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

MorneSaunders360 commented 3 months ago

Hello,

Firstly, I'd like to extend my apologies for the delay in addressing your concerns. My schedule has been notably dense due to commitments to a new project, which has temporarily diverted my attention from monitoring the issue log.

Regarding the issue with the Solar Sunsynk integration, I am aware that Sunsynk has been updating their backend, which may be influencing the current situation. Rest assured, I am prioritizing a review of this matter to understand the specifics of the problem.

I will keep you updated with any developments and will expedite an update as soon as possible to resolve this issue. Thank you for your patience and understanding.

MorneSaunders360 commented 3 months ago

Hi,

I have published a new release, please update and let me know if you still get any errors.

If you do get any errors, I have added additional loggers to help us detect where the error lies.

acormack commented 3 months ago

Hi,

I have published a new release, please update and let me know if you still get any errors.

If you do get any errors, I have added additional loggers to help us detect where the error lies.

Hi Morne,

Thnks for the new version. I did the update and still got errors. This is the log output:

2024-04-04 08:56:14.067 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Calling get_plant_data with args: () 2024-04-04 08:56:14.067 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Error while getting plant data: 'NoneType' object is not subscriptable 2024-04-04 08:56:14.067 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 08:56:14.143 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.626 seconds (success: False) 2024-04-04 08:56:20.015 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Calling get_plant_data with args: () 2024-04-04 08:56:20.015 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Error while getting plant data: 'NoneType' object is not subscriptable 2024-04-04 08:56:20.016 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 08:56:20.021 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.627 seconds (success: False) 2024-04-04 08:56:30.822 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Calling get_plant_data with args: () 2024-04-04 08:56:30.823 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Error while getting plant data: 'NoneType' object is not subscriptable 2024-04-04 08:56:30.823 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 08:56:30.837 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.598 seconds (success: False)

MorneSaunders360 commented 3 months ago

Hmmm this is quite a strange one, can you maybe uninstall the sunsynk integration and reinstall it and also when reinstalling please check the region and the interval, I know sunsynk has been moving people's solar systems over to a new region and the endpoints does have an impact on the synsynk integration. Also this is weird that is stops working after a while and it breaks on the call where we get the plant data to get the rest of the solar system data. Looking forward to your next response

acormack commented 3 months ago

Hi Morne

Thanks for the quick response. I uninstalled the Device/Service and removed the HACS download. I checked the directory was deleted, then reinstalled.

I entered my username/password and Region 2 (I don't know how I check if this is correct???)

I started the service and it initially got readings from the server four times (30 seconds apart) , but then it got these errors from the server every 30 seconds after that. Could it be the default 30 second interval is too short?

Alec

Log output below.....

2024-04-04 16:28:51.893 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.531 seconds (success: True) 2024-04-04 16:29:23.995 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.633 seconds (success: True) 2024-04-04 16:29:55.576 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.214 seconds (success: True) 2024-04-04 16:30:27.619 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.256 seconds (success: True) 2024-04-04 16:31:00.019 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.656 seconds (success: True) 2024-04-04 16:31:29.564 ERROR (SyncWorker_18) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-04 16:31:29.570 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 16:31:29.579 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.217 seconds (success: False) 2024-04-04 16:31:59.460 ERROR (SyncWorker_4) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-04 16:31:59.465 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 16:31:59.472 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.110 seconds (success: False) 2024-04-04 16:32:29.485 ERROR (SyncWorker_0) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-04 16:32:29.493 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 16:32:29.496 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.133 seconds (success: False) 2024-04-04 16:32:59.508 ERROR (SyncWorker_20) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-04 16:32:59.517 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-04 16:32:59.530 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.167 seconds (success: False)

Nurgus commented 3 months ago

Regarding region, Sunsynk moved all acounts to region 1 recently so the only correct answer is region 2.

MorneSaunders360 commented 3 months ago

Thanks, Nurgus for assisting. I have removed the regions selector and now looking at the new region (https://api.sunsynk.net/) Also changed the default interval to 60 seconds instead of 30 seconds. I have also managed to replicate the bug and have made some changes and testing the changes in a test environment. Will keep you updated on the test results.

acormack commented 3 months ago

Thanks, Nurgus for assisting. I have removed the regions selector and now looking at the region 2 (https://api.sunsynk.net/) Also changed the default interval to 60 seconds instead of 30 seconds. I have also managed to replicate the bug and have made some changes and testing the changes in a test environment. Will keep you updated on the test results.

Thanks for the update Morne. I am happy to help with testing when you are ready. I have changed my system to run every 300 seconds. I am still getting the errors.

What I am seeing though is a regular pattern of error followed by "Fetching solar_sunsynk data recovered", after which the next API call works once, followed by an error

See log error below.

Alec

================================== File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:06:09.427 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.174 seconds (success: False) 2024-04-05 11:11:09.377 ERROR (SyncWorker_3) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:11:09.383 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:11:09.387 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.134 seconds (success: False) 2024-04-05 11:16:11.664 INFO (MainThread) [custom_components.solar_sunsynk] Fetching solar_sunsynk data recovered 2024-04-05 11:16:11.665 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.412 seconds (success: True) 2024-04-05 11:21:11.466 ERROR (SyncWorker_7) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:21:11.473 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:21:11.475 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.223 seconds (success: False) 2024-04-05 11:26:11.343 ERROR (SyncWorker_50) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:26:11.349 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:26:11.356 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.102 seconds (success: False) 2024-04-05 11:31:11.433 ERROR (SyncWorker_63) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:31:11.443 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:31:11.445 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.191 seconds (success: False) 2024-04-05 11:36:11.386 ERROR (SyncWorker_22) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:36:11.394 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:36:11.400 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.147 seconds (success: False) 2024-04-05 11:41:13.586 INFO (MainThread) [custom_components.solar_sunsynk] Fetching solar_sunsynk data recovered 2024-04-05 11:41:13.586 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.333 seconds (success: True) 2024-04-05 11:46:13.421 ERROR (SyncWorker_36) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:46:13.427 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:46:13.435 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.182 seconds (success: False) 2024-04-05 11:51:13.394 ERROR (SyncWorker_29) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:51:13.401 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:51:13.407 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.154 seconds (success: False) 2024-04-05 11:56:13.459 ERROR (SyncWorker_2) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 11:56:13.467 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 11:56:13.469 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.214 seconds (success: False) 2024-04-05 12:01:13.379 ERROR (SyncWorker_42) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:01:13.388 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:01:13.392 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.138 seconds (success: False) 2024-04-05 12:06:13.364 ERROR (SyncWorker_53) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:06:13.371 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:06:13.378 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.121 seconds (success: False) 2024-04-05 12:11:13.402 ERROR (SyncWorker_27) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:11:13.409 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:11:13.415 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.161 seconds (success: False) 2024-04-05 12:16:13.409 ERROR (SyncWorker_31) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:16:13.415 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:16:13.418 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.163 seconds (success: False) 2024-04-05 12:21:13.378 ERROR (SyncWorker_4) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:21:13.401 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:21:13.413 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.159 seconds (success: False) 2024-04-05 12:26:13.413 ERROR (SyncWorker_52) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:26:13.419 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:26:13.422 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.161 seconds (success: False) 2024-04-05 12:31:13.454 ERROR (SyncWorker_44) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:31:13.461 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:31:13.466 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.213 seconds (success: False) 2024-04-05 12:36:15.712 INFO (MainThread) [custom_components.solar_sunsynk] Fetching solar_sunsynk data recovered 2024-04-05 12:36:15.712 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.458 seconds (success: True) 2024-04-05 12:41:17.742 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.488 seconds (success: True) 2024-04-05 12:46:19.686 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.432 seconds (success: True) 2024-04-05 12:51:19.390 ERROR (SyncWorker_45) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:51:19.401 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:51:19.402 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.149 seconds (success: False) 2024-04-05 12:56:19.412 ERROR (SyncWorker_25) [custom_components.solar_sunsynk.sunsynkapi] Error Connecting: HTTPSConnectionPool(host='api.sunsynk.net', port=443): Max retries exceeded with url: /api/v1/plants?page=1&limit=10 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) 2024-04-05 12:56:19.430 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data for invertor in jsondata: TypeError: 'NoneType' object is not iterable 2024-04-05 12:56:19.441 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 0.187 seconds (success: False) 2024-04-05 13:01:21.956 INFO (MainThread) [custom_components.solar_sunsynk] Fetching solar_sunsynk data recovered 2024-04-05 13:01:21.956 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.703 seconds (success: True)

MorneSaunders360 commented 3 months ago

Okay, I have created a beta version of the sunsynk integration for you to test as well. You can redownload the integration and select the beta version (v1.0.7-beta) image I'm also running this version and waiting for it to give me any errors.

acormack commented 3 months ago

Hi Morne

I have the beta version running now and it looks promising. 4 successful transactions in a row so far. I will continue to test

Alec

2024-04-05 14:25:19.956 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 4.587 seconds (success: True) 2024-04-05 14:30:22.839 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.417 seconds (success: True) 2024-04-05 14:35:24.857 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.435 seconds (success: True) 2024-04-05 14:40:26.661 DEBUG (MainThread) [custom_components.solar_sunsynk] Finished fetching solar_sunsynk data in 2.240 seconds (success: True)

acormack commented 3 months ago

Hi Morne

I have been running the beta version every 30 seconds for the last 18 hours. 2187 successful API calls have been made with no errors. I think you have solved the problem!

Many Thanks

Alec

MorneSaunders360 commented 3 months ago

Hi

Perfect, I also have been running the integration with 10 solar systems and I did not receive any errors. I will do a full release

MorneSaunders360 commented 3 months ago

I have published a new version to the main branch. Latest version is v1.0.8