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

Optional interval setting for async publish #4

Open
moberhofer opened this issue Apr 11, 2022 · 2 comments
Open

Optional interval setting for async publish #4

moberhofer opened this issue Apr 11, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@moberhofer
Copy link
Contributor

It would be nice to set an optional interval when publishing data. Now, the user has to know, if a channel is synchronous or asynchronous nature and only can publish in native interval (async, sync has a downsampling option).

Suggestion: new Sampling type "interval" with same payload-type as async.
"sampling": { "type": "interval", "interval_sec": 1 }

The Payload should have this format:
{ "sampling": "interval", "timestamp": 3, "value": 1, "min_value": 0.5, "max_value": 1.1, "avg_value": 0.8 }
There should be new fields for statistic values since the last publish.

@moberhofer moberhofer added the enhancement New feature or request label Apr 11, 2022
@HpLightcorner
Copy link
Contributor

Just to make sure requirements are clear:

  • Can be applied to sync and async channels
  • Every interval_sec the plugin publishes data

Can you give some more specific payload examples for sync and async channels? What happens if there is no new data for an async channel? Publish statistics with empty data array?

@moberhofer
Copy link
Contributor Author

  • Can be applied to sync and async channels
  • Every interval_sec the plugin publishes data

Correct. This is what I ment.

What happens if there is no new data for an async channel? Publish statistics with empty data array?

In case of no new data, publish the "old" data with new timestamp (aka hold last value).

Can you give some more specific payload examples for sync and async channels?

The payload should look like the same for sync and async in this case of interval as shown in the first comment. Or am I missing something?

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

2 participants