GithubHelp home page GithubHelp logo

Comments (19)

notr1ch avatar notr1ch commented on August 10, 2024 1

I also seem to be running into this.

2022-11-15 13:34:14.183 DEBUG (SyncWorker_4) [custom_components.sems.sems_api] Login Response: <Response [200]>
2022-11-15 13:34:14.183 DEBUG (SyncWorker_4) [custom_components.sems.sems_api] SEMS - API Token received: {'uid': 'xxx', 'timestamp': 1668515654085, 'token': 'xxx', 'client': 'ios', 'version': '', 'language': 'en', 'api': 'https://eu.semsportal.com/api/'}
2022-11-15 13:34:14.184 DEBUG (SyncWorker_4) [custom_components.sems.sems_api] Querying SEMS API (https://eu.semsportal.com/api//v2/PowerStation/GetMonitorDetailByPowerstationId) for power station id: xxx
2022-11-15 13:34:14.642 DEBUG (SyncWorker_4) [custom_components.sems.sems_api] Query not successful (未将对象引用设置到对象的实例。), retrying with new token, 1 retries remaining
2022-11-15 13:34:14.642 DEBUG (SyncWorker_4) [custom_components.sems.sems_api] SEMS - Making Power Station Status API Call
2022-11-15 13:34:14.642 INFO (SyncWorker_4) [custom_components.sems.sems_api] SEMS - Maximum token fetch tries reached, aborting for now
2022-11-15 13:34:14.643 ERROR (SyncWorker_4) [custom_components.sems.sems_api] Unable to fetch data from SEMS. 
2022-11-15 13:34:14.651 DEBUG (MainThread) [custom_components.sems.sensor] Resulting result: None

EDIT: I switched my login to my main login instead of the recommended visitor login and it works fine now.

from goodwe-sems-home-assistant.

robbeers76 avatar robbeers76 commented on August 10, 2024 1

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

This is what the logs say
2022-10-09 11:52:58.704 ERROR (SyncWorker_7) [custom_components.sems.sems_api] Unable to fetch data from SEMS.
2022-10-09 11:52:58.726 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up sems platform for sensor

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

The full logs:
Logger: homeassistant.components.sensor
Source: helpers/update_coordinator.py:178
Integration: Sensor (documentation, issues)
First occurred: 23:11:51 (1 occurrences)
Last logged: 23:11:51

Error while setting up sems platform for sensor
Traceback (most recent call last):
File "/config/custom_components/sems/sensor.py", line 57, in async_update_data
inverters = result["inverter"]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
return await self.update_method()
File "/config/custom_components/sems/sensor.py", line 97, in async_update_data
raise UpdateFailed(f"Error communicating with API: {err}")
homeassistant.helpers.update_coordinator.UpdateFailed: Error communicating with API: 'NoneType' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/sems/sensor.py", line 118, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady: Error communicating with API: 'NoneType' object is not subscriptable

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

Can someone please tell me WTH is going on?

from goodwe-sems-home-assistant.

TimSoethout avatar TimSoethout commented on August 10, 2024

Hi Ruud,

Not sure what the exact issue is. It seems that maybe the API result does not contain the "inverter".

  • Did you rename the inverter recently?
  • Can you check that the inverter is visible in the app or on semsportal.com?

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

The issue is that I didn't change anything. The inverter name is what was originally created by the integration. The inverter is also perfectly visible in the SEMS portal with the proper Power Station ID

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

I also tried a new user but that didn't result in anything. The whole interface just keeps failing. The only thing I can think of is that an HA upgrade broke it but the last upgrade I did is 2 weeks ago. Also it wouldn't explain why all of a sudden it stops working?

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

I also tried different versions of your interface @TimSoethout but the result is the same

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

@TimSoethout any thoughts on what this could be?

from goodwe-sems-home-assistant.

TimSoethout avatar TimSoethout commented on August 10, 2024

No idea.

Maybe you can check the API output?
See #64 (comment) for example using httpie.

The component does the same http calls.

from goodwe-sems-home-assistant.

ruurdsanders avatar ruurdsanders commented on August 10, 2024

Sorry I have no clue what you mean?

from goodwe-sems-home-assistant.

robbeers76 avatar robbeers76 commented on August 10, 2024

I have the same problem as Ruurd. Scraping from sems-portal stopped working after 2 months. I also cannot connect to semsportal.com website and my inverters are off-line. I think I am blacklisted at the semsportal-server. Probably because I scraped every 60sec. Are there more people with this problem? Contact with Goodwe helpdesk did not help so far.

from goodwe-sems-home-assistant.

TimSoethout avatar TimSoethout commented on August 10, 2024

That's too bad @robbeers76 . I'm also scraping at the default rate of 60s, and am not banned. I have one only inverter though, maybe that's a difference?

Does it differ is you use www.semsportal.com or eu.semsportal.com, or other local ones?

from goodwe-sems-home-assistant.

robbeers76 avatar robbeers76 commented on August 10, 2024

from goodwe-sems-home-assistant.

oakedcorn avatar oakedcorn commented on August 10, 2024

@robbeers76, I have exactly the same problem since end januari, semsportal cannot be accessed from within the home network (ISP IP address). It looks indeed like a banned IP address. I have 2 inverters updating at the default interval. I logged the issue with goodwe, but so far did not receive any response.

from goodwe-sems-home-assistant.

oakedcorn avatar oakedcorn commented on August 10, 2024

I received feedback from my ISP, apparently the problem lies with twelve99.net and the ISP has no way to fix this because it's out of their control.

from goodwe-sems-home-assistant.

TimSoethout avatar TimSoethout commented on August 10, 2024

Too bad. :(
Also, my DNS can't resolve twelve99.net .

from goodwe-sems-home-assistant.

robbeers76 avatar robbeers76 commented on August 10, 2024

Now I switches internetproviders (Budget via KPN) and now I have an other WAN-Adres. This was the solution and connection to the semsportal is working. I have two inverters and I have set the update time at 89sec and the other at 90sec so the update wil not be at the same time. I hope the connection won't stop working over 3 mnths.

from goodwe-sems-home-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.