I have a similar problem (I have two systems but both go through the growatt smart switch, 1 is a growatt inverter and 1 is seperate, but the total export and load usage is recorded (it’s weird seeing the export exceed the total solar generated {as only identifies the solar generated from the growatt inverter} for the day!!).
The switch has a lot more info in shine that we’ll have to get into homeassistant.
This is spot-on for the configuration. Exactly the same setup as myself (I’m guessing you have a battery (‘hybrid’) setup like myself).
You’re correct that the “Import from grid today” isn’t a “lifetime” value, but the important thing is that it’s an increasing value that gets reset. As long as home assistant can track the increase between two given time points i.e. each hour, it’s valid.
Essentially, if it’s available for you to choose, then we’ve ensured it’s a valid value to be used on that page.
That sounds really interesting @Trentan I’d love to see some screengrabs at some point.
As for adding the functionality/looking at the code, myself and Indy would happily welcome PRs and new functionality to the Growatt Library we support: https://github.com/indykoning/PyPi_GrowattServer
That’s where all the magic happens and where the functionality should get implemented.
The home-assistant work is relatively light-touch in comparison, all we do is make the relevant calls to the library for all the information and then format it.
If you’re thinking about adding new functionality, that’s where it should be done, that way anyone that uses the library can benefit from it, not just HASS users
I’ve been using the Growatt integration a while now, and it has been working great.
However, since yesterday evening something has changed and today no data has been received.
It’s all there on the dashboard hosted by Growatt, so the inverter and datalogging is working as before, it’s just that HA no longer gets any data.
I removed and re-added the integration to make sure I am using the most recent one.
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)
It’s actually a problem with Growatt itself, we don’t know why but a load of the API calls have stopped working in the library that we use (and I co-maintain) the ticket for that library is here: https://github.com/indykoning/PyPi_GrowattServer/issues/16
I’m going to try and take another look at it tonight once I’ve finished work, but we’re beholden to the Growatt server, looks like they may have deployed an update and it’s broken the way we interface with it.
Same problem here, happy to see it is not only on my instance as I was about to remove the integration and re-add it again like Marcel suggested too. Hope you find what they changed. It is obvious we are very heavily depending on (and spoilt with) your great work!
This is an update on the home-assistant ticket here: https://github.com/home-assistant/core/issues/56044
Which lists how you can patch your instance (will really only work nicely if you’re using the OS installation rather than the docker one).
I’m just waiting on the merges into the upstream library and I’ll be able to do the PR for HomeAssistant as well.
The issue was only discovered 2 days ago, so well after that release was made.
There is a patch available on the link provided above, I’ve got a PR ready for the next release I just need to fix the tests later today and it’ll be merged in.
@muppet3000 I have set my datalogger to upload every minute to growatt server. However home assistant only updates the data every 2 minutes. I checked the code and the scan_interval is set to 1minute. It only updates every minute if I change the throttle to 55 seconds.
I can’t say I’ve tried to test it. I didn’t know you could configure the datalogger to upload more often, how did you do that?
Mine is set to 5 minutes (what it seems to come with as default), if you can tell me how to change it maybe I can try at my end?
When you follow this document (I have the dongle that is on page 2). You can connect to a webserver on the dongle. You can input your wifi details on the main page, but on one of the other pages (Advanced I think) you can set the upload interval. You can set it to 1 minute.
If this is not clear, I can get you some more detailed information when my inverter is awake again.
Is there anyway of connecting to the webserver once the dongle is connected to my router?
I’ve browsed all my connected devices on my router and can’t seem to connect to anything that connects to a webserver.
From my experience it seems that the webserver is only running when the dongle is not connected to the router.
You only need to select the wifi SSID and enter the password (and change the upload interval ). You save the settings and restart the dongle. It will automatically start uploading again to your growatt account.
I have the older dongle which isn’t wifi, it communicates via RF to a little hub box which is connected to my network via an ethernet cable. That said, I bet it’s all the same webserver etc. so if I just try and hit the IP of the hub box I may have the same luck!
Will try it at some point this week maybe.
As for your problem with polling frequency, it used to be configurable via the configuration.yaml, but, I bet since it was updated to use the graphical GUI it’s not used anymore. I should be able to investigate. If it’s no longer configurable we’ll need to add it back in again via the UI.
In the code a scan_interval of 1 minute is defined.
But there is also a throttle defined with the same time as the scan_interval.
From my experience these settings conflict. The sensor is instructed to update every minute, but it is not allowed by the throttle.
An example:
1 minute → sensor wants to update, throttle prevents update because it can only update when the sensordata is older then 1 minute. At this moment the sensordata is exactly 1 minute old so it will not update.
2 minute → sensor wants to update, sensordata is now 2 minutes old. It is allowed to update now.
When I change the throttle time to 55 seconds, the sensor updates every minute. Because when the sensor wants to update at the 1 minute mark it is older then 55 seconds and allowed by the throttle for updating.