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

[blockly] persistence documentation update #2427

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

mherwege
Copy link
Contributor

@mherwege mherwege commented Dec 16, 2024

Related to openhab/openhab-webui#2732

This PR updates the Blockly persistence documentation with enhancements available in OH4.3:

  • Add documentation for additional persistence blocks
  • Add extra methods and parameters to existing blocks
  • Update images

@stefan-hoehn FYI

Copy link

netlify bot commented Dec 16, 2024

Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).

Built without sensitive environment variables

Name Link
🔨 Latest commit dedef86
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/6763d69d09b5580008c6064a
😎 Deploy Preview https://deploy-preview-2427--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Mark, I really appreciate that in particular because Blockly docs require a lot of images which is a lot of work !

@@ -34,40 +34,49 @@ More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo

![statistical-value](../images/blockly/blockly-persistence-get-statistical-value.png)

_Function:_ computes any of the below functions for the given item since the time provided by _ZonedDateTime_-Block
_Function:_ computes any of the below functions for the given item since the time provided by _ZonedDateTime_-Block, until the time provided by _ZonedDateTime_-Block, or between 2 timepoints provided by _ZonedDateTime_-Blocks.
Copy link
Contributor

@stefan-hoehn stefan-hoehn Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an image like this that demonstrates "between"?

image

- String: output as a string value
- Quantity: output as a quantity type with unit
- Number: output as a number
- Timestamp: time of the persisted value (when applicable)
Copy link
Contributor

@stefan-hoehn stefan-hoehn Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here (I am bit behind, so it misses one entry)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, although not all functions have it, but I will replace it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK, thought I had an image in for that, but didn't. The point is: Timestamp is only relevant for some of the analytic actions. E.g., it is not for sum, average, medium..., but it is for getting a persisted state, getting the last update, next update, minimum, maximum... as these results are at a specific point in time. Only when Timestamp is relevant, it is shown in the list. I didn't want to explicitely document this, is the UI should be very much self explaining. And Timestamp will be there when it is relevant. I can put in an image, but not sure it adds much.

Following options are not supported by all persistence services (for example the standard rrd4j does _not_ support this).

- state (at specific time): persist given State at given time
- list of states (adding): persist list of States, not replacing the already persisted States
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind giving a example where this needed or helpful of if explained somewhere else link to it? I don't even know what that is for (sorry 😬)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like documentation to link to is meager at best. This has been introduced in the context of the forecast persistence strategy, where it became useful to persist/retrieve a series of persisted values, not just one. I will try to formulate something to make it clearer.

Signed-off-by: Mark Herwege <[email protected]>
@mherwege
Copy link
Contributor Author

@stefan-hoehn I believe I addressed your comments.

Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks a lot!
Did you see the failed checks?

@mherwege
Copy link
Contributor Author

mherwege commented Dec 18, 2024

@stefan-hoehn Yes, but I don´t understand the error in the log. Do you have any idea?

@stefan-hoehn
Copy link
Contributor

Yep, I checked your PR and could see that at least the one image name misses the s

image

which is why the build fails to find the image.

Signed-off-by: Mark Herwege <[email protected]>
@mherwege
Copy link
Contributor Author

Yep, I checked your PR and could see that at least the one image name misses the s

@stefan-hoehn Thanks for the tip. It should be better now.

@stefan-hoehn stefan-hoehn added this to the 4.3 milestone Dec 19, 2024
Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for all the effort! <3

@stefan-hoehn stefan-hoehn merged commit 21fc66d into openhab:main Dec 19, 2024
5 checks passed
@mherwege mherwege deleted the blockly_median branch December 19, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants