Closed thoompje closed 2 years ago
growatt_server documentation growatt_server source (message by IssueLinks)
Hey there @indykoning, @muppet3000, @jasperplant, mind taking a look at this issue as it has been labeled with an integration (growatt_server
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I can confirm seeing the same issue on Core 4.7
I can confirm seeing the same issue on Core 4.7
Ahh oke, then it is coincidentally after the upgrade that i have this issue. Then it was maybe before but didn't seen it.
I can confirm seeing the same issue on Core 4.7
Ahh oke, then it is coincidentally after the upgrade that i have this issue. Then it was maybe before but didn't seen it.
It was working fine for me yesterday. Today it went unavaiblable around 09:00 GMT+2
Same problem.
The central growatt server is down: https://server.growatt.com/
That's where all the information is pulled from, the integration will only work when that server is up. Oddly the android app is still working, so they may just be having problems with the core website.
I'll investigate more later.
yep android app working fine... strange. For this moment only way is waiting for serwer up.
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working.
I have changed the URL manually in the core.config_entries and after a restart the integration was working again.
My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
https://oss.growatt.com/ is working.
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working.
I have changed the URL manually in the core.config_entries and after a restart the integration was working again.
My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
Thanks for contacting them!!
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working. I have changed the URL manually in the core.config_entries and after a restart the integration was working again. My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
Thanks for contacting them!!
Same here! can´t find core.config_entries
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working. I have changed the URL manually in the core.config_entries and after a restart the integration was working again. My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
Thanks for contacting them!!
Same here! can´t find core.config_entries
me too ;(
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working. I have changed the URL manually in the core.config_entries and after a restart the integration was working again. My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
Thanks for contacting them!!
Same here! can´t find core.config_entries
Within the config directory there is a hidden directory called ".storage"
Same here since +/- 8:30 AM CET, IOS APP and https://server-api.growatt.com are working. I have changed the URL manually in the core.config_entries and after a restart the integration was working again. My guess is that the mobile apps are using the api url. Maybe this url should be added in the config as well, first wait till the main URL is back again. I have contacted service via mail, let's wait for their reaction
Thanks for contacting them!!
Same here! can´t find core.config_entries
Within the config directory there is a hidden directory called ".storage"
Thanks, how do I show hidden directory with File editor?
Using Windows:
View --> Options --> Views: there should be a setting. Or just simple type the path in the addressbar: [IP/hostname]\config\ .storage
PS: please make a backup of the file before editing and be careful making such changes.
I agree that it would be very handy to be able to change this, I though we provided a drop-down in a recent version of the integration. In this specific instance I think that the Growatt server has gone down, but, the hass integration could be more graceful in handling it.
I'm currently at work, however I can look at some improvements this evening to see how we can better handle this scenario. In the meantime it looks like you've got some work-arounds going on.
so, only samba or terminal?
Both should work just fine. Using terminal addon in HAOS:
cd config/.storage
and use nano to edit the file.
PS: please make a backup of the file before editing and be careful making such changes.
Awesome guys, workaround worked for me ! A code change would be very welcome, just so we don't have to mess around the core config files manually (and then could break things). Kind of weird on the Growatt side though, that they have 2 different infra structures pointing to the same data. Here's a view DNS wise:
dig server-api.growatt.com
; <<>> DiG 9.10.6 <<>> server-api.growatt.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7202 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;server-api.growatt.com. IN A
;; ANSWER SECTION: server-api.growatt.com. 145 IN A 47.91.67.221
;; Query time: 89 msec ;; SERVER: 1.1.1.1#53(1.1.1.1) ;; WHEN: Mon May 09 12:20:26 CEST 2022 ;; MSG SIZE rcvd: 67
And the official one (which is used in the Growatt integration into HA):
dig server.growatt.com
; <<>> DiG 9.10.6 <<>> server.growatt.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31723 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;server.growatt.com. IN A
;; ANSWER SECTION: server.growatt.com. 548 IN CNAME server.growatt.com.w.kunlunea.com. server.growatt.com.w.kunlunea.com. 60 IN A 8.48.85.219
;; Query time: 300 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon May 09 12:20:20 CEST 2022 ;; MSG SIZE rcvd: 110
Yeah Growatt are a complete anomaly, it wouldn't surprise me if the page just randomly re-appears tomorrow when China's timezones means that someone is in an office and realises. Likewise, if wouldn't surprise me at all if it never came back!
I'm thinking I can implement some logic to say "if the first URL doesn't work try a fallback". I haven't looked at that code for a while so I need to remember what the existing logic is.
The Shinephone app is working and I can log into server-api.growatt.com, but none of my Growatt WiFi-X modules are sending any data to Growatt at the moment either. Last update was about three hours ago.
https://server-api.growatt.com/ should be the default if you ask me What I did is after removing the Growatt integration: -.- I modified the SERVER_URLS constant in the const.py file in the homeassistant/components/growatt_server directory -.- Removed the files in the homeassistant/components/growatt_server/pycache dir -.- Restarted home assistant and added the Growatt server integration I used the https://server-api.growatt.com/ URL and logged in. No issues and all my sensors were back
const.py file in the homeassistant/components/growatt_server directory
Where did you do this? I'm using dockerd homeassistant and now in the terminal but can't find the folder growatt_server
The Shinephone app is working and I can log into server-api.growatt.com, but none of my Growatt WiFi-X modules are sending any data to Growatt at the moment either. Last update was about three hours ago.
I don't have this issue. I have all the data in the ShinePhone app and all the data in HA.
const.py file in the homeassistant/components/growatt_server directory
Where did you do this? I'm using dockerd homeassistant and now in the terminal but can't find the folder growatt_server
I installed HA manually on the pi and the file was located here /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/growatt_server
core.config_entries edit method using https://server-api.growatt.com/ worked for me. Thanks
const.py file in the homeassistant/components/growatt_server directory
Where did you do this? I'm using dockerd homeassistant and now in the terminal but can't find the folder growatt_server
I installed HA manually on the pi and the file was located here /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/growatt_server
Only have bash-5.1# ls init.py pycache
in that folder
Looks like https://server.growatt.com is back
Looks like https://server.growatt.com is back
Yeah looks like everything is working again.
All, working for me now as well. I'll postpone my evening hackathon tonight in that case, but I will take a look through the code to see what we can do to accommodate this in the integration. There's a part of me that wants to say that this is a problem with growatt and not the integration, that said, it has happened a few times before so a little bit of preventative coding wouldn't go amiss.
Is this integration made for Shinebox with ShineLink, right?
sometimes this add-on will fail to update.
As it is working, but sometimes i look at energy and nothing is displayed.. i alway need to reload the plugin and then it works.
This always happens after a restart or HASS upgrade..
Is this integration made for Shinebox with ShineLink, right?
I personally have no experience with this device, but as it's connecting using the internal API of the ShinePhone app as long as it's available in that app it should work.
If it doesn't work like that it may be possible to write your own integration for it, or possibly skip the middleman and DIY it with https://esphome.io/components/sensor/growatt_solar.html
sometimes this add-on will fail to update.
As it is working, but sometimes i look at energy and nothing is displayed.. i alway need to reload the plugin and then it works.
This always happens after a restart or HASS upgrade..
I haven't had this experience myself, do you see anything in the logs about the integration? It may be possible that the API may have been down at that time
Did they change something again, i updated my app earlier today, and now the integration fails completely.
App is working fine it seems, so i gues sthey changed something ?
`Error while setting up growatt_server platform for sensor
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 74, in async_setup_entry devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 42, in get_device_list login_response = api.login(config[CONF_USERNAME], config[CONF_PASSWORD]) File "/usr/local/lib/python3.9/site-packages/growattServer/init.py", line 119, in login data = json.loads(response.content.decode('utf-8'))['back'] File "/usr/local/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/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) `
Same issue here. I tried a different servers such as https://server-api.growatt.com but no luck....
Same problem.... Pfff a lot of problems with growatt with the last major release. Can someone take a look on this issue!?
See also #73503
Hi All, this looks like it's unrelated to latest changes to HomeAssistant (I'm running a much older version of home assistant and have the same issue). This looks like a change has been made on the server side of Growatt. I'll report back shortly but this is likely to require a change to the library myself and @indykoning maintain which the Growatt Integration for homeassistant makes use of. Once we've worked out what has changed on the API I'll see if we can issue a recommended change/hack that people can make until the official fix is live.
If anyone's interested to follow progress on the library depend on I'll report it over here: https://github.com/indykoning/PyPi_GrowattServer/issues/28
Posted a more detailed update over on the https://github.com/indykoning/PyPi_GrowattServer/issues/28#issuecomment-1155738553 ticket however, for home-assistant specific stuff:
File that needs to be changed: /usr/local/lib/python3.9/site-packages/growattServer/__init__.py
@ line 115
Change: newLoginAPI.do
to newTwoLoginAPI.do
then restart home-assistant.
Please don't ask me specifics for your installation as I'm not a home-assistant expert, I just know my way around the docker based installation. If there are people that get this work-around working on the OS or application version of home-assistant, please feel free to post better instructions.
Note - if you're using a docker installation restarting home-assistant means restarting the container which will undo the change. I worked around this by mounting in a temporary directory over the top of the /usr/local/lib/python3.9/site-packages/growattServer/
directory with the hacked version of the library in it.
I hope that helps people temporarily until the upstream library has it's fix published and we can integrate it into home-assistant. I will update accordingly and re-direct any new tickets that are logged with this issue to this one so that we have a single chain for this.
Posted a more detailed update over on the indykoning/PyPi_GrowattServer#28 (comment) ticket however, for home-assistant specific stuff:
- I have temporarily hacked my copy of homeassistant to make this work with the fix that will be put into the upstream library
- I use a docker based installation so have performed the following by mounting files into the container, but the following steps should help people with Home Assistant OS (or other) installations.
File that needs to be changed:
/usr/local/lib/python3.9/site-packages/growattServer/__init__.py
@ line 115 Change:newLoginAPI.do
tonewTwoLoginAPI.do
then restart home-assistant.Please don't ask me specifics for your installation as I'm not a home-assistant expert, I just know my way around the docker based installation. If there are people that get this work-around working on the OS or application version of home-assistant, please feel free to post better instructions.
Note - if you're using a docker installation restarting home-assistant means restarting the container which will undo the change. I worked around this by mounting in a temporary directory over the top of the
/usr/local/lib/python3.9/site-packages/growattServer/
directory with the hacked version of the library in it.I hope that helps people temporarily until the upstream library has it's fix published and we can integrate it into home-assistant. I will update accordingly and re-direct any new tickets that are logged with this issue to this one so that we have a single chain for this.
Thanks for posting the quick fix, it seems to work again, i used portainer to connect to the docker container and edit the file
Great to hear this is a good fix for at least one other person :). It's late here so I'm now going to bed, but I'll check in on updates tomorrow in case it doesn't fix it for everyone.
Hi, how to install Growatt-Integration with alternate Serverpath (e.g. https://server-api.growatt.com) Many thanks.
Hi,
i got the same problem, atfer hours of looking for a fault in my firewall and dns configuration i found this thread :) if home assistant is not running in a container, how can we fix the problem?
best regards
chris
Hi
Is it growatt or HA problem?
I don't think it's a "problem", as in a bug on either side. I think Growatt might have changed their application and HA is no longer able to extract the data until updated to handle the new format.
I don't think it's a "problem", as in a bug on either side. I think Growatt might have changed their application and HA is no longer able to extract the data until updated to handle the new format.
Exactly! Did someone already made an fix available for the coming release of HA? Hopefully they will approve if asap.
Great that a fix is to arrive. But in meantime, how can I do this
I use a docker based installation so have performed the following by mounting files into the container,
I use docker on Synology NAS, but would like to get a bit more detailed instruction how to do this.
I have a patched version of the specific file, but how can I mount this ?
Thanks for help.
Well, I found out myself a different solution. In Docker container, started BASH shell , used VI to change the file. Saved and restarted the container.
Thanks for all hints.
The problem
Hello,
Growatt server is not working anymore after upgrade to 5.3
What version of Home Assistant Core has the issue?
core-5.3
What was the last working version of Home Assistant Core?
core-4,7
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Growatt
Link to integration documentation on our website
https://www.home-assistant.io/integrations/growatt_server
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response