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

Send a discovery packet every 10 minutes to keep UDP inverters "awake" #340

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DanielLeone
Copy link

@DanielLeone DanielLeone commented Jan 5, 2025

As per here: home-assistant/core#114173 (comment)

I don't know why, but it seems my (and others) inverters go to sleep every night and stop responding.

I checked the traffic with tcpdump, but obviously being UDP, there's not much going on, UDP requests go out, nothing comes back from about 1-3am onwards; and never wakes up the next day, even once the sun comes out.

Opening the Solar Go app fixes the issue straight away, and inspecting traffic from Solar Go, all it's doing is sending the special discovery request, that's all that is required to wake up the inverter.

I tried to implement this in the goodwe library, instead of inside Home Assistant, but wasn't sure of the best place to put it, inside UdpInverterProtocol felt like maybe the right place, but it's breaking the abstraction too much I felt (because now the inverter protocol contains yet another inverter protocol for another port...)

So I ended up with this here... it works for me, but I'm not HA developer, I'm probably doing it all wrong 😁

Happy to close this out if you've got a better way to implement, but I'm running this for now and it's working for me 👍

async_track_time_interval doesn't register properly unless HA is already running; so if it's not running listen for the HA start event, but if it's already running don't wait for the start event because you've already missed it. Maybe that initial assumption was wrong before - IDK, here you go

Signed-off-by: Daniel Leone <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant