-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
DTU update inverval is increasing over time (when inverter is unreachable) #2446
Comments
I believe there is no MQTT logging right now. According to your console logs there is no communication with your inverter what so ever.
You may want to revisit / edit your triple backticks markdown formatting to show proper code. |
you are right - the missing image was caused by wrong usage of the tripple backticks - just fixed it. and yes: the inverter was permanently shut-down during the whole time when OpenDTU was started until the issue arise. |
Okay I think now I understand your issue: The OpenDTU may choose to use a different communication interval with the inverter, depending on whether it has been able to reach the inverter before the Inverters downtime and how long ago the inverter has become unavailable, ie 5s vs ~14/15s interval. This in itself is not the actual problem and the OpenDTU forwards the current values to your MQTT broker using a fixed exp_aft validity period of 10s. This is sufficient in the first place being double the interval of 5s. But when the inverter has been unreachable for a longer period it is less than the query interval of 14/15s and therefor the MQTT recipient has short gaps of 4/5s. In fact the exp_aft should be increased to 30s being again the double of our query interval. @tbnobody is this something that we could consider in our MQTT packets ? |
To have two different update rates depending on the availability of the inverter is totally fine as long as the applied update rate is not exceeding the communicated exp_aft value. From the user's perspective a possible solution could be a dynamic exp_aft value or a fixed value with the longest expected duration + some margin. And many thanks for taking time to look into this issue !!! |
And what should the inverter do eg after dark? |
I think the best would be to set all life sensor values to zero/inactive if the inverter is detected as unreachable because these sensor values are simply not available if the inverter is unreachable regardless of the reason (no power due to light conditions or as in my case no battery voltage supply). |
What happened?
In case of the inverter is unreachable over a longer duration (not powered for days) the update interval is increasing. It will become a problem, when the update interval is exceeding the time limit exp_aft (double value of the polling interval) stated in MQTT config topic for Home Assistant, like:
MQTT topic homeassistant/sensor/dtu_1..........3/ch0_Power/config
This will than lead to Nan sensor values in Home Assistant and interfere with my ESPhome application.
To Reproduce Bug
Running OpenDTU with permanently turned-off inverter.
Expected Behavior
The MQTT sending interval of all sensor values should not exceed the threshold exp_aft.
Install Method
Pre-Compiled binary from GitHub releases
What git-hash/version of OpenDTU?
3dc70ab
What firmware variant (PIO Environment) are you using?
generic_esp32
Relevant log/trace output
Anything else?
Don't know when the update interval starts rising - in this example I got a interval of 14s instead of 5s at the time I detected it.
A reset of the OpenDTU device is fixing the problem until the next time.
Please confirm the following
The text was updated successfully, but these errors were encountered: