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

Some tags like TAG_EP_REQ_IS_GRID_CONNECTED are not updated with the set polling interval of 15 s #174

Closed
trapezoid677 opened this issue Aug 13, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@trapezoid677
Copy link

They are not updated at all.

Versions:

  • S10-E8
  • 1.2.1 and 1.2.2
  • JS-Controller version: 5.0.11
  • Node version: 16.20.1
  • Operating system: Manjaro Linux
@git-kick
Copy link
Owner

git-kick commented Aug 13, 2023

please see https://github.com/git-kick/ioBroker.e3dc-rscp#bug-reports

No input, no output ;-)

Are the other EP_ tags showing data as expected?

@git-kick git-kick added the waiting Waiting for external action or input label Aug 14, 2023
@git-kick git-kick self-assigned this Aug 14, 2023
@trapezoid677
Copy link
Author

Is this sufficient?
iobroker.current_e3dc.log.html.zip

@git-kick
Copy link
Owner

git-kick commented Aug 21, 2023

Thank you for providing the log-file.

I looked at IS_GRID_CONNECTED. It was requested four times, and every time there was a valid response with value "0x01" (true).

// Request 1
2023-08-19 15:20:28.339  - silly:  e3dc-rscp.0 (20803) OUT: magic: >E3DC< is OK  - ctrl:  >0011< is OK - Version 1, with CRC  - seconds: 1692451228 -  nseconds: 0 - length: 42
TAG_EP_REQ_IS_GRID_CONNECTED - type: 0x00 - None - length: 0
...
2023-08-19 15:20:28.412  - silly:  e3dc-rscp.0 (20803) IN: magic: >E3DC< is OK  - ctrl: >0011<  is OK - Version 1, with CRC  - seconds: 1692450936 - nseconds:  116093000 - length: 132
TAG_EP_IS_GRID_CONNECTED - type: 0x01 - Bool - length: 1 value: 0x01

// Request 2
2023-08-19 15:20:35.372  - silly:  e3dc-rscp.0 (20803) OUT: magic: >E3DC< is OK  - ctrl:  >0011< is OK - Version 1, with CRC  - seconds: 1692451235 -  nseconds: 0 - length: 42
TAG_EP_REQ_IS_GRID_CONNECTED - type: 0x00 - None - length: 0
...
2023-08-19 15:20:35.378  - silly:  e3dc-rscp.0 (20803) IN: magic: >E3DC< is OK  - ctrl: >0011<  is OK - Version 1, with CRC  - seconds: 1692450943 - nseconds:  135383000 - length: 132
TAG_EP_IS_GRID_CONNECTED - type: 0x01 - Bool - length: 1 value: 0x01

// Request 3
2023-08-19 15:20:42.360  - silly:  e3dc-rscp.0 (20803) OUT: magic: >E3DC< is OK  - ctrl:  >0011< is OK - Version 1, with CRC  - seconds: 1692451242 -  nseconds: 0 - length: 42
TAG_EP_REQ_IS_GRID_CONNECTED - type: 0x00 - None - length: 0
...
2023-08-19 15:20:42.367  - silly:  e3dc-rscp.0 (20803) IN: magic: >E3DC< is OK  - ctrl: >0011<  is OK - Version 1, with CRC  - seconds: 1692450950 - nseconds:  122385000 - length: 132
TAG_EP_IS_GRID_CONNECTED - type: 0x01 - Bool - length: 1 value: 0x01

// Request 4
2023-08-19 15:20:43.329  - silly:  e3dc-rscp.0 (20803) OUT: magic: >E3DC< is OK  - ctrl:  >0011< is OK - Version 1, with CRC  - seconds: 1692451243 -  nseconds: 0 - length: 35
TAG_EP_REQ_IS_GRID_CONNECTED - type: 0x00 - None - length: 0
...
2023-08-19 15:20:43.336  - silly:  e3dc-rscp.0 (20803) IN: magic: >E3DC< is OK  - ctrl: >0011<  is OK - Version 1, with CRC  - seconds: 1692450951 - nseconds: 94850000  - length: 40
TAG_EP_IS_GRID_CONNECTED - type: 0x01 - Bool - length: 1 value: 0x01

Timestamps say that the intervals between requests were: 7s, 7s, 1s
Shorter intervals after adapter startup are intended to quickly fill the object tree.
So far, everything looks fine. I cannot see anything unexpected.

How exactly do you reproduce and observe that IS_GRID_CONNECTED does not get updated?
Are the other EP_ tags showing data as expected?

@trapezoid677
Copy link
Author

These datapoints are updated:

e3dc-rscp.0.EP.PARAM_0.PARAM_EP_RESERVE_MAX_W
e3dc-rscp.0.EP.PARAM_0.PARAM_LAST_SOC
e3dc-rscp.0.EP.PARAM_0.PARAM_TIME_LAST_FULL

For the other EP tags, the last updates have been between 2 and 5 months ago.

Bildschirmfoto_2023-08-21_20-31-14
Bildschirmfoto_2023-08-21_20-41-25

@git-kick
Copy link
Owner

I think some of the EP tags may not change for months. Do you have a sample where you know the value changed in the E3/DC, but the change was not taken to the e3dc-rcps object tree?
I still can't get your point what's going wrong.

@trapezoid677
Copy link
Author

I use an interval S (15 sec) to request the status of the IS_GRID_CONNECTED tag. I expect to receive a response every 15 sec. Whether I save these responses or not is handled by the SQL-module where I can neglect unchanged values for a certain timeframe. But if an interval of 15 sec is set, the module should not decide on its own if the value is signaled or not. At least I don't know any other modules which neglect values on their own, thereby ignoring the interval being set.

@git-kick
Copy link
Owner

git-kick commented Aug 21, 2023

ok, got it.
Indeed, the e3dc-rscp adapter currently does not call setState() unless the value changed. This is an intentional optimization motivated by the massive amount of tags the E3/DC has (which overloaded some Raspi installations).
But keep in mind the interval is not ignored - the adapter polls according to the interval.
Also, I could not find any spec defining what ts is (time of last change vs time of last message). To me, it makes no sense relying on the latter: imagine the E3/DC had an interface throwing an event on every value change; you never would have those periodical "it's still the same value". I.e. your application should not depend on such implementation details of the interface.

Nevertheless, I could add a configuration switch for that, if you could provide some evidence that ts is positively defined as "time when last checked", not "time when last changed".

@trapezoid677
Copy link
Author

There is at least one use case which I personally have: I want to debug Node-Red-Scripts which is impossible if no events are generated. And waiting for a power grid outage for debugging...

@ArnoD15
Copy link

ArnoD15 commented Aug 22, 2023

Ich antworte mal auf Deutsch, da es hier anscheinend alle verstehen und es für mich einfacher ist :-)
Ich will mich hier wirklich nicht einmischen, aber ich bin auch schon über das gleiche Problem gestolpert.
In der ioBroker Dokumentation und auch in anderen wird erklärt, dass es sich bei "ts" um einen Unix Timestamp (Zeitstempel in Millisekunden) wann der Zustand zuletzt aktualisiert wurde handelt und zwar auch, wenn sich der Wert nicht geändert hat.
Die letzte Änderung bekommt man über "lc" mit.

Wenn man es aber weiß, kann man auch damit leben, dass sich der Zeitstempel "ts" auch nur bei einer Änderung aktualisiert. Es ist aber so nicht möglich festzustellen, ob die Schnittstelle noch richtig funktioniert, da man ja keine Rückmeldung bei Aktualisierung erhält.

Hier ein Link zu Github Doku ioBroker : Zustände (States)

@git-kick
Copy link
Owner

Hallo @ArnoD15, danke für die Erklärung.

Da ich wirklich bemüht bin, immer zuerst die Doku konsultieren: wo steht, "dass es sich bei "ts" um einen Unix Timestamp (Zeitstempel in Millisekunden) wann der Zustand zuletzt aktualisiert wurde handelt und zwar auch, wenn sich der Wert nicht geändert hat."?

@ArnoD15
Copy link

ArnoD15 commented Aug 22, 2023

Muss mal suchen, wo ich das gelesen habe.
Es ist jedenfalls so umgesetzt worden.
Wenn du dir im ioBroker bei Objekte die Statusansicht einschaltest, kannst du bei allen Objekte feststellen, dass es so gehandhabt wird.
Der Zeitstempel "ts" würde ja sonst auch keinen Sinn ergeben, denn für Änderungen wo sich auch der Wert geändert hat, gibt es ja bereits den Zeitstempel "lc"

@git-kick
Copy link
Owner

Neue Konfigurations-Checkbox ist im master branch und kommt mit dem v1.2.4 Release.

@git-kick git-kick added enhancement New feature or request and removed waiting Waiting for external action or input labels Aug 28, 2023
@ArnoD15
Copy link

ArnoD15 commented Sep 1, 2023

Danke, werde ich dann gleich testen :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants