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

Used your code! Thanks! Reworked main as code seems to freeze #34

Open
matthijsfh opened this issue Nov 13, 2023 · 2 comments
Open

Used your code! Thanks! Reworked main as code seems to freeze #34

matthijsfh opened this issue Nov 13, 2023 · 2 comments

Comments

@matthijsfh
Copy link

matthijsfh commented Nov 13, 2023

Sorry, no way to contact you directly except via an issue ticket ;-)

Thanks for reverse engineering the inverter. Works like a charm.

However the "main" code seems to freeze.

  • I think while (!mqtt.connected()) is the root cause if the wifi is lost after the last wifi check, this code will never exit the loop, as the mqtt will not connect, because the wifi is lost.

  • Added all relevant parameters to the wifi manager (after which I save them to flash). Having to re-compile to change mqtt server settings is not my preferred solution. I have had issues with this on another ESP project. After 3+ years a mod was needed to the IP address of the server, and it did not compile anymore due to "progress" in the development tools.

  • Added jumper to force the wifimanager to show. For security reasons I want to be the one that brings up the wifimanagers or not. Rationale: after a power down of the ESP and a wifi reset (aka fuse switched off in the house), the ESP is up and running faster than the wifi, it cannot connect to wifi and shows the wifimanager. Which is "open" for everyone to connect. So now the wifimanager only shows when I set a jumper.

  • Added a FAN to cool the inverter. Inverter is in a hot spot under the roof. The SW uses the temperature from the electronics board inside the inverter to switch on/off.

Can send you my changes if you are interested.

Greetings Matthijs

@nygma2004
Copy link
Owner

nygma2004 commented Nov 14, 2023

Hi Matthijs,

Oh, these are great changes. I am still using my much older version of the code before it got re-worked by Joe. Wifimanager is great, actually I should add it to more of my projects. This also means that we can also offer complied binaries to users which is much easier to flash than if you have to build it yourself.
Good catch on the mqtt.connected issue. I never noticed this problem, I shall look at my version if I had done something differently. A few months ago my laptop died and I have not installed the IDE on my new device (was not working on project recently).
The jumper for the wifimanager is also a good idea. These sequence issues are a real pain to find, mostly because you cannot think of all these cases until it happens. Nowadays I am batteling with some modbus issues between my Node-Red and PLC which all of sudden started happening a few days ago. No software changes, nothing.
Fan is also a great idea.
I am interested in your implementation. If you send it, can you also send me a photo how the jumpe and the fan connection is implemented. I will add them to the readme for others to use it as an example.
And also maybe a wifimanager example, what can be set there.

@matthijsfh
Copy link
Author

Hi,

I will share my code with you. Think I found your email somewhere ;-)
My growatt code is stored my private github with much more projects.

Did remove some of your features, because I did not want to damage my inverter by sending some commands to it.

Anyway, have a look and maybe you can use some features of it.

Greetings Matthijs

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

No branches or pull requests

2 participants