homeassistant-growatt_server_api
homeassistant-growatt_server_api copied to clipboard
Error connecting
Upgraded this morning (3 versions at once) and after that I can't seem to get the integration working:
Log shows the following
Logger: homeassistant.components.sensor
Source: custom_components/growatt_server_api/sensor.py:51
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 07:08:53 (4 occurrences)
Last logged: 12:46:18
Error while setting up growatt_server_api platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/growatt_server_api/sensor.py", line 88, in async_setup_entry
devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/growatt_server_api/sensor.py", line 51, in get_device_list
user_id = login_response["user"]["id"]
KeyError: 'user'
Using web login or Shine App works fine.
API BAN, be patient next 24h
Hi @bartpaeleman - Sorry I didn't reply earlier. I've just spun up the latest instance of Home Assistant (2023.4.6) and used the credentials you sent me a while ago and it worked fine, so I assume it's a temporary ban on your account or home IP.
I have a selection of credentials that I created through the website so that when I get banned I can just switch to a different set.
That said I've very nearly finished my integration for Grott and I've just got to do the documentation for it then I'll start steering people towards that.
Cheers Chris, it is back this morning indeed. Is there anything I can do on my end to avoid the so called ban on API, or is that just something that needs to be accepted and can happen on regular intervals. Thanks again for checking and responding. Curious to see what the Grott integration will do (I think I missed that).
@bartpaeleman see https://github.com/muppet3000/homeassistant-growatt_server_api/issues/31
Ah thanks Chris, that will sure solve the problem!
Chris, I am getting what appears to be a daily ban and my account through the ShineAPp is also locked while it unlocks daily at my noon. Then all access seems restored which skw=ewes all my numbers obviously:
Has something changed or did Growatt make changes to its API restrictions? I will go check the Grott status and see if I can figure out how to make that work for me.
Chris, I am getting what appears to be a daily ban and my account through the ShineAPp is also locked while it unlocks daily at my noon. Then all access seems restored which skw=ewes all my numbers obviously:
Has something changed or did Growatt make changes to its API restrictions? I will go check the Grott status and see if I can figure out how to make that work for me.
This graphical representation in HA is complete mess, there is no autarky
see this https://github.com/JonahKr/power-distribution-card
Not sure if I understand what you mean but this card has worked fine for me until about a week ago. It is the builtin energy representation and I didn’t do anything that caused the change. I will however look at the card you suggested but in my humble opinion it is not the same representation for what I have
@bartpaeleman When we spoke the other week over on the https://github.com/muppet3000/homeassistant-grott repo it looked like you were switching over to using grott instead. Are you happy for me to put this item on hold and instead help you to switch over to using grott? I'm hoping to phase out this library as Grott is far easier to work with and I don't have to worry about the stupid API!
Sure @muppet3000 , if I can get Grott to work and deliver the values that I need, I will happily remove this one from my HA docker instance. But unfortunately I still rely on this for my battery values, since they are still missing and don’t seem to get decrypted at the Grott source. Don’t bother too much Chris, the Grott integration is higher value and priority.
I think we have a bug open for the battery values for your system right? This one: https://github.com/muppet3000/homeassistant-grott/issues/15 and this one: https://github.com/muppet3000/homeassistant-grott/issues/10 (duplicates of each other). I'll make support for that the next thing that I work on.