Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - The integrattion doesn't work anymore after update of Home Assistant #44

Open
slingshot74 opened this issue Nov 10, 2023 · 5 comments
Labels
bug Something isn't working triage Needs to be triaged to determine if it's an issue

Comments

@slingshot74
Copy link

slingshot74 commented Nov 10, 2023

Describe the bug
The integration worked fine and I am really happy with it. Today I updated HA and it just found out the inegration doesn't work anymore. The account is not locked out.
I think it might has something to do with the update?

To Reproduce
Go to the integration and look at the values. The are unavailable

Growatt Device Type
Device(s): Inverter

Home Assistant information

  • Home Assistant version:
    Core 2023.11.2
    Supervisor 2023.11.0
    Operating System 11.1
    Frontend 20231030.2
  • Growatt Server API Integration version: v1.0.3 (I think)

Additional context
Log dumo:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: 20:51:07 (1 occurrences)
Last logged: 20:51:07

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 359, 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.11/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 44, in get_device_list
login_response = api.login(config[CONF_USERNAME], config[CONF_PASSWORD])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/growattServer/init.py", line 132, in login
data = json.loads(response.content.decode('utf-8'))['back']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@slingshot74 slingshot74 added bug Something isn't working triage Needs to be triaged to determine if it's an issue labels Nov 10, 2023
@muppet3000
Copy link
Owner

This will have just been because you did a restart of home assistant nothing to do with the upgrade. When you restart home assistant or the integration it re-authenticates and generates a new cookie so it's probably that the API is blocking again or they've blocked your account.
As I keep telling everyone - grott is the way to go here: https://github.com/muppet3000/homeassistant-grott

@slingshot74
Copy link
Author

Hi @muppet3000 ,
Thanks for you reply. Unfortunaltly I run HA on a server which runs un HA OS.
So no windows, so I can't run Grott if I believe to collect the data. Otherwise I would love to do that.
I have no other windows server or something that is always online.

@Saentist
Copy link
Contributor

@slingshot74 No problem to install Grott in HAOS
but then in my case muppet3000/homeassistant-grott#62

@slingshot74
Copy link
Author

slingshot74 commented Nov 12, 2023

Oke so you don;t need a windows machine or run docker to host thhe python part to collect the data?

In the documentation here it says you need windows or linux to host grott
https://github.com/johanmeijer/grott

@muppet3000
Copy link
Owner

@slingshot74 - I recently updated the documentation with steps on how to configure the grott 'addon' for HassOS users: https://github.com/muppet3000/homeassistant-grott/blob/main/docs/setup/grott.md#grott-add-on

I recommend reading through all of the 'prerequisites' documentation though: https://github.com/muppet3000/homeassistant-grott/blob/main/docs/prerequisites.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be triaged to determine if it's an issue
Projects
None yet
Development

No branches or pull requests

3 participants