MichaelHeimann / OpenNETek

make newenergytek inverters (SG600MD etc. ) wifi ready (http + mqtt)
MIT License
5 stars 1 forks source link

No right values and no refresh #3

Closed essrirm closed 1 year ago

essrirm commented 1 year ago

Hi, I tried flashing different versions with ESP32 flash download tool. Flashing process was ok but then there was no web interface on ESP32. So I used PlatformIO and built from source. In this way it worked, I can see web interface and set wifi and inverter ID values.

But now I only can see this in the interface:

2023-05-30 12_00_36-OpenNETek

DC_Voltage, AC_Voltage, Power gen total and Status as static values that don´t change since first connection.

Do you have any clue of what can be happening?
Because it seems there was some kind of comunication between inverter and ESP32 but it doesn´t exist anymore.

Inverter is a SG600MD.

Thanks

essrirm commented 1 year ago

Making new tests it seems data is not refreshed since ESP start.

With inverter plugged, if I disconnect power pin from ESP32 and reconnect or sometimes when I press reset button, web interface refresh values and then keeps static forever:

2023-05-30 12_34_38-OpenNETek
MichaelHeimann commented 1 year ago

Hi @essrirm, do you get updates via browser console (F12 in chrome -> console) ?

essrirm commented 1 year ago

No messages, only initial 'hello'....

And my inverter has two panel entries.... have you seen if is it easy getting info from both? Mmmmmm.... maybe this is the problem...

essrirm commented 1 year ago

Problem was here: if ( sizeof(mqtt_server) && wifi_connected ) { WebSerial.println("MQTT part beginning...");

sizeof(mqtt_server) is allways 40, even if it is empty in config, so tries reconnect forever after first read. In your code is mandatory to use a mqtt server... I have changed with this if you don´t want to use a mqtt server...

if ( String(mqtt_server) != "none" && sizeof(mqtt_server) && wifi_connected ) { WebSerial.println("MQTT part beginning...");

And I have set 'none' as mqtt server.

Now it is working but I still have same question than previous message.... Have you see if it is possible getting DC readings of more than one solar panel? It seems that this is getting AC and DC values of only one panel.

MichaelHeimann commented 1 year ago

@essrirm Thanks for the code fix. And regarding the two panel question: the two ports on the 600W unit are internally directly connected. So technically the inverter only has one logic/mppt for the two panels which are connected in parallel. So there is only one voltage. This also means that the two panels should be as equal es possible (make, size, parameters, direction to sun etc.).

essrirm commented 1 year ago

Thanks for your reply and of course for your work with Opennetek Michael, I didn´t know that inverter only has one mppt... I have to do more tests but yesterday with a lot of sun, panels current was 10 amps and voltage 27V (more or less 270W) with opennetTek and almost 500W measured in AC with a smart plug that gives you consumption.. Because of that I thought it was measuring only one panel.... I will do more tests....

MichaelHeimann commented 1 year ago

Hi @essrirm - it took me a while to answer - sorry for that. I've updated the code for scenarios without mqtt servers. I'll have a closer look to the measuring issue. 270W DC vs 500W AC seems like we can just multiply by 2. That would then make it 540W which could totally end up as 500W AC due to efficiency loss...

MichaelHeimann commented 1 year ago

Since this issue (no updated on webserver when no mqtt server is used) is resolved, I'll close this issue. FYI: the servername must be really empty. If you put in "none", it'll try to connect to "none". I didn't want to add keywords. If one doesn't have a mqtt server they'll likely not put anything in.