patience4711/RPI-APS-inverters

Inverter restart resets daily energy

Closed this issue · 18 comments

@patience4711 I noticed that my Inverter restarts around 6pm, but don't know the reasons (Power is still high enough). Whatever, the ecu resets the daily energy in the stats. Total energy will be summarized in the charts, but not in the overview and in the MQTT message. Can you investigate the reasons, please? Is assume this is a topic of the ecu and not the invester itself. It's more usefull to not reset the values other time than midnight.

Besides: how can I reduce the poll time? I want to try to reduce to 1min.

edited_Screenshot_20220617-200144

Before the Inverter restart.
edited_Screenshot_20220617-173614

After Inverter restart
edited_Screenshot_20220617-182852

How this works you can read here

Very strange that your inverter restarts at the same time every day. There must be a reason for that.

@patience4711 I noticed it's not always the same time. Yesterday it was 10 min earlier. But as you can see from the journal, this is not reasoned by the missing sunlight.

The inverter sends the level of produced energy from which an energy increase per 5 minutes is calculated. From this value the power is calulated and both values are saved in the database invData.
So I can use the level of produced energy (seen in the fronpage) and calculate the power by myself? How is the formula used in your application?

Which files I have to modify to reduce the poll time down to 1 min?

The polling is triggered by the cron so #crontab -e . I wouldn't do this, it may lead to crash of the zigbee radio.
In the wiki i explained the calculation. wiki

@patience4711 Do you think It's possible to add a timestamp to the MQTT message?

It is possible but if you subscribe you can do mosquitto_sub -v -t /# | ts
so the subscriber always get the timestamp. see moreutils package.

Oh I saw you're working on a http request. So there is something coming?

I made a new sw upgrade available that has te possibility to disable the automatic polling and poll manually via a http request ''ip_of_ecu/recovery/pollCmd.php?poll=x'
Is has some other changes too, see changelog.
If you installed via the link that was here, you should do this again with the 'official' package ecu_swupdate-v2_9
Please look at the help page in 'menu->settings'

having similar issue, the inverter restarted at 19h18 and second time at 20h42.
What could be the reason ?
I noticed also lot of message "error 11 AF_DATA_CONFIRM fail"
Could it be communication issue ?
I had to modify cron to run a startCoordinator because it was failing too many time yesterday, i guess i'm a bit far from the inverter and sometimes it fails to communicate. By doing a StartCoordinator, it gave me better results but don't know if this is bad. Also i put every 2 mn, is it bad ? i i'm using the data through mqtt for Home Assistant.

*/2 * * * *   ( /usr/lib/cgi-bin/ecu/startCoordinator.pl normal=1 ) ;   (/usr/lib/cgi-bin/ecu/autoPoll.pl)

image

image

image

Chart looks ok

image

any clue is welcome.

Installed the Update from yesterday, but didn't use the new feature.
Today I didn't habe a restart, but a lot of error messages, Same as nlienard.
After that I no New values arrived.
Screenshot_20220622-220807

it is possible to add a condition in autopoll.pl (or maybe inverterPoll.cgi) which checks if totalpw variable is empty and relaunch another polling.
It happens on my side that when running a first manual polling , it responds empty value at 0 and just after another manual polling, and i get the value as well. In that case, i 'm launching a second time, but with crontab, we got empty value sent to mqtt and it would be great if we could avoid sending 0 value.
thanks

For now, i just added a condition to restart the polling if it fails. Will see if it improves

root@rpiecu:/usr/lib/cgi-bin# diff -u /usr/lib/cgi-bin/ecu/autoPoll.pl /usr/lib/cgi-bin/ecu/autoPoll_v2.pl
--- /usr/lib/cgi-bin/ecu/autoPoll.pl    2022-02-12 13:20:35.725276073 +0100
+++ /usr/lib/cgi-bin/ecu/autoPoll_v2.pl 2022-06-23 09:52:11.964035948 +0200
@@ -133,6 +133,12 @@
           # if result = 0 the polling succeeded then we should mqtt
             if($result == 0)
             {
+               if ($_ =~ m/totalpwr\":0/) {
+                       print "ERR: Empty value. Restarting Polling\n<br>";
+                       my $restart_cmd = '/usr/lib/cgi-bin/ecu/autoPoll_v2.pl';
+                       system($restart_cmd);
+                       last;
+               }
                 my $mqttCommand = "/usr/lib/cgi-bin/ecu/sendMqtt.cgi $_";
                 system($mqttCommand);
             }

Like i said before, polling more than once every 5 minutes leads to instability so i am not going to support that.

In autoPoll.pl this check is there, in case of 0 the poll is ignored (see the journal). Manual poll does not use autopoll. Autopoll keeps running to check if the sun is set or not.

When there is an time value polled which is lower than the previous one, the program assumes that the inverter is reset. Otherwise lower values are not possible.
Due to instability sometimes eratical values may pop-up which could lead to this assumption.

The radio trafic failes a lot in your cases, that must be a range problem, maybe a better radio should be used. The cc2531 is not the best one.
When the reset happens around the same time, there is a systematical reason for that, you say it is not the sunlight. Well i can't think of any other reason but i can't help here. Maybe ask the manufacturer.

The subject of this issue is inverter resets, to improve the issues as a knowledge base, please open another issue, like "polling resolution" or so, and move your relative posts to there. Thanks

@patience4711 I noticed your concerns about polling less than 5 Minutes. So I didn't change. In moved the CC2530 yesterday 10cm, after that it proper worked for more than 1h. Then I got the above failures. There Was so other change in the configuration.

Normally the range shouldn't be a problem. I have only 5m between my Raspberry and the inverter with a window in between,

I have about the same conditions, 6mtr and only a door with glass betweeen The only time i saw some disturbances in the zigbee trafic was when i moved my body between the zb module (2530) and the inverter. So it is sensitive to this.
I don't know how you wired it, the dupontcables are not very reliable so i soldered the wiring. Suspect also your powersupply, and keep the radio away from it. Or try with another one.
I am afraid i can't solve this riddle.

@patience4711 I noticed your concerns about polling less than 5 Minutes. So I didn't change. In moved the CC2530 yesterday 10cm, after that it proper worked for more than 1h. Then I got the above failures. There Was so other change in the configuration.

Normally the range shouldn't be a problem. I have only 5m between my Raspberry and the inverter with a window in between,

You may want to try a CC2530 with an amplifier chip (CC2530+CC2590/1/2)

inverter just rebooted again

<br>18:26:02 checking zb system running ok
<br>18:26:04 polled inv 0 ts: 120 pw: 153.7
<br>18:28:01 checking zb system running ok
<br>18:28:03 polled inv 0 ts: 119 pw: 106.6
<br>18:30:01 checking zb system running ok
<br>18:30:03 polled inv 0 ts: 120 pw: 62.9
<br>18:32:01 checking zb system running ok
<br>18:32:03 polled inv 0 inverter restarted <================
<br>18:32:03 polled inv 0 ts: 105 pw: 71.0
<br>18:34:02 checking zb system running ok
<br>18:34:04 polled inv 0 ts: 121 pw: 108.2
<br>18:36:01 checking zb system running ok
<br>18:36:03 polled inv 0 ts: 119 pw: 100.0
<br>18:38:01 checking zb system running ok
<br>18:38:03 polled inv 0 ts: 120 pw: 76.2

I can't further investigate at the moment. I have issues to connect with my wifi and don't know the reasons. Maybe my wifi stick is damaged :(

I am going to close this issue with the following conlusions:

  • it is fully explained what happens in case of an inverter reset.
  • Why the resets happen is not clear and cannot be solved by me
  • I warned for instabilities that happen with higher poll rates.