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

Allow MQTT publishing every second #756

Closed
wants to merge 2 commits into from

Conversation

jstammi
Copy link
Contributor

@jstammi jstammi commented Mar 27, 2023

Consistent with DTU settings for polling data

Johannes Stamminger added 2 commits March 27, 2023 20:20
@tbnobody
Copy link
Owner

Just a few notes why a 1 sec publish time doesn't make sense.
First of all, the poll interval behaves like this:

  • Poll first inverter with 200ms timeout and a possible retransmit time
  • Wait [Poll time]
  • Poll second inverter with 200ms timeout and a possible retransmit time
  • Wait [Poll time]
  • etc....

It's only possible to do time consuming stuff like sending mqtt messages during the Poll Idle time. Otherwise you would miss packages due to the frequence cycle.

When sending mqtt data e.g. for 5 or 6 inverters every second you will most likly run into undefined behaviors, out of memory errors etc.

Why do you need updates any 1 second? If you say now, that you need it for zero export features etc.... if you publish mqtt topics soo often or send limits in smaller frequencies like e.g. 15 seconds you will not get any statistics updates at all (because control commands have higher priority in the tx queue and will therefor delay statistics commands when a control command is in the queue).

@tbnobody tbnobody closed this Mar 27, 2023
@jstammi
Copy link
Contributor Author

jstammi commented Mar 27, 2023

Making this possible does not mean you have to use it like this in every constellation.

With a single Inverter it perfectly makes sense if you do not want to miss data. At the moment I poll and publish with both set to 2s. With publishing only at current minimum of 5s, only every 2nd-3rd sample polled could be used on listening for mqtt values.

And with multiple inverters (but even for my single-one-setup) ... I consider sending just the data of the one having polled from latest would be the most obvious expected default behaviour ... ?

Copy link

github-actions bot commented Apr 6, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants