patience4711 / read-APSystems-YC600-QS1-DS3

Software for an esp8266 nodemcu to read data from APS inverters.
130 stars 24 forks source link

NEW VERSION 9_12 #112

Closed patience4711 closed 1 year ago

patience4711 commented 1 year ago

In this new version the "engine" has been redesigned, resulting in significant (~40%) more free heap. Some small (cosmetic) issues are solved. All the functionallity has been tested and it works fine. I want to thank everyone who contributed to this by testing or input via "forks".

If you are currently using an older version:

This is a bit inconvenient but the change in the notation of the inv ID has many advantages as to free heap and program space.
After the update please examen all your settings, a new filesize in SPIFFS can corrupt some values.

At this moment i don't think than i can do anything else to improve the heap so for now this is hopefully the last revision. v9_12b

This chart shows the free heap gain since i started with the streamlining: heap_chart

swbouman commented 1 year ago

@patience4711 Thank you for the new version. I renamed all inverters as described, everything works except the mqtt every inverter is send to 1 topic. Did you change anything in the mqtt?

edit every domx was set on 2....

frtz13 commented 1 year ago

@patience4711 installed the 9_12 version, too. besides the editing of the inverter "status" values, as described in the release notes, I observed the following:

thanks.

patience4711 commented 1 year ago

@frtz13 Like I said, some values can get corrupt due to the change in the filesystem. So it is important to examen your settings.

after checking the "auto polling" checkbox again, I had to reboot the ESP-ECU to make auto polling happen again.

I cannot reproduce that, maybe you didn't save the settings.

To avoid misunderstandings; Can we conclude that it works (for now), apart from the need to re-enter some settings?

frtz13 commented 1 year ago

so far everything looks good. heap and stack free memory looks stable, too.

after checking the "auto polling" checkbox again, I had to reboot the ESP-ECU to make auto polling happen again.

I cannot reproduce that, maybe you didn't save the settings.

it must have been saved, otherwise it would not have started after the reboot. however, this happened after all the configuration changes, manual poll checks etc.

frtz13 commented 1 year ago

@patience4711 9_12 looks good after 24h. resetCounter=1. free stack stable at 104 B. free heap gradually came down from 26000 to slightly over 24000 B.

hvdb commented 1 year ago

@patience4711 So I installed it all just yesterday (completely new)

And it worked, but now I get errorcode 11. `

poll inverter 0

polling zb send poll cmd inverter 0 sendSB sent FE1D24016CFC1414060001000F1380971B01A3D8FBFB06BB000000000000C1FEFEB9 readZB FE0164010064FE034480E914013B rc=14 no AF_DATA_CONFIRM polling failed 11

` When I re-pair it works for a moment, but after that it fails again. Any idea why?

inverter: DS3

Thanks for all the work!

patience4711 commented 1 year ago

@frtz13 Thanks for the update, yes i had a zigbee reset too. After all. the root cause of this was that someone adviced to make the vaiable "actionFlag" an uint8_t. This value became 301 at nighttime but the overflew value was 45 which triggered the sending of a rubish zigbeemessage. This caused the crash. Took me hours to figure that out....

Anyway it doesn't bother so i'l correct this in the next update. The heap in my test is fairly stable, going slightly down due to the increase in log messages. They are limited so that in longer term it should stay stable.

patience4711 commented 1 year ago

@hvdb Once paired there is no need to repeat that. But it shows that the coordinator is going down for some reason. You can check that if you issue "10;health" when it fails again. This checks the coordinator and restarts it if necessary. Btw 12% signalquality is not very good,

hvdb commented 1 year ago

@patience4711 Alright, updated. Will keep an eye on it and move it a bit closer with less obstacles to improve the signal.

patience4711 commented 1 year ago

Version v9_12b solved the zigbee restarts at nighttime transition.

I am thinking of one last revision: For extra security make the access to the menu and other pages impossible from outside your own network. And put the infopage and log links to the frontpage. Now we can only see data from remote but we cannot touch the settings. This is especially important to prevent hackers to install harmfull software via the software update. I already use this in the ESP32 project. We can put the ESP-ECU open to the world now with peace of mind. Someone having ideas about this?

Via this link you can visit my testenvironment to see how it works. You can login as "user" and "2222"

If you want to try it yourself v9_13