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
Official HomeAssistant integration #58
Comments
Not really, resp. not anymore. |
Sounds good. Are there any plans to use diffrent platforms than only the sensor platform? Do you have any contact with people working at Goodwe? |
Yes, that's the library. I'm making some final tweaks there and will switch the plugin to it in next few days. |
@mletenay I will start working on a config flow.
We will need to reduce this since HomeAssistant dislikes any options that are not striktly needed. It just makes it more complicated for first time users that do not have experiance. So CONF_NETWORK_TIMEOUT, CONF_NETWORK_RETRIES and CONF_SCAN_INTERVAL need to go and we need to use a sutable default value. I am not sure about CONF_COMM_ADDRESS, can this be changed on the inverter itself or something? |
Only CONF_IP_ADDRESS and CONF_PORT are strictly necessary, all the rest is optional. Edit: actually the port is always fixed to 8899, so it can/should be removed. Edit2: I suggest to keep CONF_IP_ADDRESS, CONF_SCAN_INTERVAL, CONF_NETWORK_RETRIES |
Thanks for the info, I will remove the port then. About the CONF_SCAN_INTERVAL, schould we then not just decrease the default to lets say 5 seconds? I have tried to add SCAN_INTERVAL to other integrations before, but the core team does not like it, they will just say chose a sutable default that works in the majority of installations or even make the default model specific if nessesary. If a user really want to change it there is the option to disable the scan interval in the system options and then they can make an autoamtion that calls the update service at the intervall they like. |
Hmm, I personally dislike this core team approach. It is really installation specific how often you want or can poll the device. |
Regarding the CONF_NETWORK_RETRIES, that parameter makes less sense more frequent the polling is. |
Look here - https://discordapp.com/channels/758315145922740234/758315145922740237/884040048050315275. Edit: actually the argument of the user with 20s is valid one. In case of ET inverter, there are 142 ! sensors at this moment. Edit2: Actually, some inverter types do not offer all the values and the energy has to be calculated via Riemann integration. Isn't there some negotiation/arguing with HA core team possible ? |
The 142 sensors insn't quite an argument because you can just disable the enties you don't need. I will add the option to change it (although this does require the addition of a options flow which is quite some work). |
Now I did and merged. Thanks ! |
Well, iotawatt just got merged with core and ruined in fact due to changes enforced by core. |
Regarding the home assistant core team not wanting too many advanced configs in the config flow. I see that ZHA has limited settings on the gui settings, but it allows advanced configuration through yaml. So can't we leave some settings for the more advanced users in the yaml config? |
@tinuva what other settings besides the scan_intervall would you like to have? |
@mletenay is there anything that needs adressing before we can make an PR in HomeAssistant to make it an official integration? |
I'm still struggling a bit with the |
OK, I did all the code changes I had in mind, the code is ready to be offered to HA core. During the conversion to UI flow configuration, the The Or maybe to replace it with the lost As for the remaining @tinuva @fizcris @starkillerOG Your opinions ? |
Sounds good to me. I like that scan_interval is still available even though it is optional. Would be great to still be able to set it. |
I use the data from the integration as a "real-time" energy management by using a bunch of pyscript automations. So I need a quite high frequency scan interval (around 0.5 - 1Hz). So at those rates, a lot of errors occur because of radio and UDP unreliability. For my specific situation |
I have added |
I think it would be good to have |
I think we can indeed remove the comm_address if it is also hard-coded in their official mobile application. About the sensor_name_prefix, I would not add that. About the network_timeout, network_retries I think it is fine that it is added as optional parameters. Definitly do not add YAML configuration again, that just adds complexity and extra code paths. |
@mfaust78 comm_address can not be in the options flow since it is required for the connection to the device which is already checked during config flow. therefore comm_address will always need to be in the config flow. One option I have used before is to only show the comm_address after a first connection error in the config_flow. In that way the majority of users does not see the option, but the ones that need it will get a first connection failure after which they will be able to fill in the correct comm_address. |
@starkillerOG Agreed, I'm going to remove the comm_addr and we can start PR activity. |
@starkillerOG Thanks for your reply. Since it can not be optional, better remove it. If you find time later, would be cool to add the way you described to show it only after a first error. |
OK, progress started: Config flow tests are missing, rest is from my point of view ready, any feedback/review welcome. |
@starkillerOG I'm looking at the config flow tests, trying to inspire from other integrations, but to be honest, I'm a bit lost. Any help is welcome. |
@mletenay no problem I can make the tests, I just need to find some time to do it, quite bussy at work at the moment. |
@starkillerOG I've again spent quite some effort trying to write proper tests for the config flow, but I failed again. |
@mletenay sorry for the late replay. |
@mletenay I finished the tests, the PR is here: mletenay/core#1 If you need anything else, please let me know. |
Perfect ! Thanks a lot. |
The PRs to HA were created: |
@starkillerOG Would you be so kind and look at the failing tests ? I still have some troubles running them locally. Thanks |
@mletenay Yes, no problem. Will see if I have some time this weekend. |
@mletenay sorry for taking so long, been a bit bussy at work. |
@starkillerOG I have incorporated all the review feedback from MartinHjelmare with the only exception of that test of unique id. |
The PRs to HA were accepted and merged, the goodwe integration will be native part of it since 2022.02 |
Has there already been an attempt at making this into an official HomeAssistant integration?
If not is there a good reason why not to make it an official integration?
I am currently in the process of buying solar pannels for my house and 2 of the 3 quotations I now have include a Goodwe inverter.
If I were to choose for a Goodwe inverter I am more than happy to help out with converting this into an official integration (have done it before a couple of times for other integrations).
The text was updated successfully, but these errors were encountered: