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
admin.0 "Unsubscribe from all states, except system's..." #142
Comments
A new diagram is send every second from the SMA unit.
|
@TGuybrush Please keep in mind during implementation that the realtime values should be averaged (mean value = arithmetic average) in memory over the debounce period for power values before they are written to the database (setstate). |
fully agree as some values are really needed (think about using SMA for load balancing etc than live is a must) and others are fine to just have an interval x time on it to refresh like every 10 (or xxx) seconds
My proposal here would be to have an additional JSON library implemented with additional config parameters. This will keep the code static and flexibel, but would allow easy modification for this specific part.
agree, the adapter will receive events anyway and handle in memory which has. no effect on system load or state/object library. |
@TGuybrush |
@TGuybrush |
@TGuybrush |
Thx I think you're right. I will add a better detection of the protocol in the UDP packet. |
I've pushed a new version in my repository which adds a verification of the packet header. Please test it in your environment. |
@TGuybrush |
@TGuybrush |
@TGuybrush |
@TGuybrush |
I'm currently working on it. I think it should be done within the next two weeks. |
@TGuybrush @DutchmanNL |
|
@TGuybrush |
@TGuybrush |
@TGuybrush |
@TGuybrush @DutchmanNL |
@DutchmanNL @TGuybrush |
@DutchmanNL @TGuybrush |
Fixes issue #142 admin.0 "Unsubscribe from all states, except system's..."
@pdbjjens @pdbjjens sagte in Test Adapter sma-em v1.0.x Latest:
Ohne Details, erweitert, 1s/30s SHM 2.0 182 Ereignisse. In meinem Fall wäre ich nun froh wenn es mir möglich wäre die Aktualisierungsrate zu erhöhen und ich würde es auch nutzen. Hätte dann 900 Ereignisse was noch immer die Hälfte des Shelly Adapters wäre. apollon hat mir diese Info gegeben: https://www.iobroker.net/#de/blog/2021_12_15 das sind setState() pro Sekunde Ist aber natürlich dir überlassen, du wirst nachher bugreports von Leuten mit Raspi1 bekommen. :) |
@ticaki |
Was aber daran liegt, das sie keine Anwendungsmöglichkeit sehen. Bevor ich mir die Batterie für 7000€ bestellt habe, hatte ich ein Skript das sie simuliert - mit 200ms wäre das erheblich genauer gewesen. Realtimesteuerung halte ich für kein sinnvolles Usecase da müsste man schon auf 10ms kommen. Das mit den Performancewerten verstehe ich so nicht wirklich für folgenden Code (Javascript-Adapter) braucht mein Rechner zwischen 3,2 und 4,6 Sekunden
Nuc Intel N100 16gb ssd
Hab ich Verständnis für, das sollte man nicht einfach nur weil man es kann verwenden. Ist ja in 99% der Fälle nur Ressourcen Verschwendung. EDIT:
Ja 3000 sind mehr als 1000 :) Die Zahl ist aber für den Adapter konfigurierbar. |
Describe the bug
If I choose all four options (L1, L2, L3, Extended Details) the iobroker admin reports: "Unsubscribe from all states, except system's, because over 3 seconds the number of events is over 200 (in last second 0)" when I have the Objects-Tab open. The update of the values in the objects-tab stalls in this case indefinitely long. If I don't have the Objects-Tab open, it does not unsubscribe and even re-subscribes all states automatically. If I choose no options or only extended Details, the admin does not unsubscribe states. Probably this is due to the fact that I have two Devices (SHM and SEM) and that they update all values by the second.
To Reproduce
Steps to reproduce the behavior:
See bug description
Expected behavior
The update rate of the values in the Objects tab should be throttled so that this behaviour can be avoided.
This could be implemented by a configurable debounce time between 1 and 60 sec to reduce system load
(by reducing the setstate load).
The debounce time should be configurable via the Config page. It should allow also the option to have no debounce
since in some cases the raw values are needed in realtime (i.e. update once per second as the datagrams arrive).
Some of the values fluctuate very much (e.g. the power values or frequency).
For power values the debounce values should be computed over the debounce time as a
mean value (=artithmentic average), for frequency median might be better.
For values which must not be averaged (like f.i. the Energy counters like pregardcounter),
only the last value in the last datagram of the debounce period should be written (setstate).
The debounce interval should be aligned with multiples of the datagram repetition time to avoid jitter.
F.i. if the required debounce time is 30 sec, then the average should span over 30 datagrams
(provided the datagram repetition time is 1 sec).
Screenshots & Logfiles
iobroker.2021-02-07.log.zip
Versions:
Additional context
None
The text was updated successfully, but these errors were encountered: