Skip to content

Mention ability to define several sitemaps in a file#2714

Open
lolodomo wants to merge 2 commits into
openhab:mainfrom
lolodomo:multiple_sitemaps
Open

Mention ability to define several sitemaps in a file#2714
lolodomo wants to merge 2 commits into
openhab:mainfrom
lolodomo:multiple_sitemaps

Conversation

@lolodomo
Copy link
Copy Markdown
Contributor

@lolodomo lolodomo commented May 5, 2026

Mention the new .sitemaps extension.
Remove the old constraint between sitemaop name and sitemap file name.

@lolodomo lolodomo force-pushed the multiple_sitemaps branch from 01be7b8 to 354c709 Compare May 5, 2026 11:39
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

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 01be7b8
🔍 Latest deploy log https://app.netlify.com/projects/openhab-docs-preview/deploys/69f9d6ad2584b5000816a1c2
😎 Deploy Preview https://deploy-preview-2714--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

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 01baffd
🔍 Latest deploy log https://app.netlify.com/projects/openhab-docs-preview/deploys/6a038c8486ce7d00082fb340
😎 Deploy Preview https://deploy-preview-2714--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

Comment thread ui/sitemaps.md
Mention the new .sitemaps extension.
Remove the old constraint between sitemaop name and sitemap file name.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo force-pushed the multiple_sitemaps branch from 354c709 to 71342f1 Compare May 5, 2026 12:04
Comment thread ui/sitemaps.md
Comment thread ui/sitemaps.md Outdated

Sitemaps are text files with the `.sitemap` extension, and are stored in the `$OPENHAB_CONF/sitemaps` directory.
Sitemaps are text files with the `.sitemap` or `.sitemaps` extension, and are stored in the `$OPENHAB_CONF/sitemaps` directory.
They can contain one or several sitemap definitions.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this sentence They can contain one or several sitemap definitions. is not necessary. .items files can also contain zero or more items, and this flexibility is nowhere stated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strictly speaking the sentence is also not correct. In openHAB 5.1.4 when I create an empty .sitemap file the system logs DSL model 'a.sitemap' is either empty or cannot be parsed correctly! With openHAB 5.2.0 build 5369 there is no such warning, so apparetly the .sitemap files can also contain zero or more sitemap definitions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It used to be one and exactly one. We changed it to allow any number of sitemaps. Like you can have an empty .items file, you can now also have an empty .sitemap(s) file. It doesn’t make much sense but it is possible.
I think it is good to be explicit for sitemaps that it can be multiple. It was always 1 single one since OH 1.0, so being explicit about it to make the point is worth it.

Copy link
Copy Markdown
Contributor Author

@lolodomo lolodomo May 12, 2026

Choose a reason for hiding this comment

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

I will adjust the sentence as it is true that it can now contain 0 sitemap.
Similar to .items and .things and .rules files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The text was underspecified. Like it was not mentioned that .persistence files must contain strategy{} even if contains no definitions. And likewise for DSL Rules it was not stated, that global variables cannot use previously defined global variables. DSL Scripts have not documented, that from Xbase “Collection literals” could not be used in openHAB, but now there is no point to writing explicitly, that collection literals can be used.

These restrictions were not documented, so it is strange to write now down, that the restrictions do not exist. I just see no need to spell explicitly that a restriction does not exist, if the assumption is, that the restriction (arbitrary number of sitemap defintions in a file) does not exist.

Users, which have one sitemap definition per file, do not have to change anything, or to worry.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Irrespective of this change, the release notes for 5.2. could state, that .sitemap files can contain zero or more sitemap definitions.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@dilyanpalauzov
Copy link
Copy Markdown
Contributor

They can now contain any number of sitemap definitions.

As these are not release notes, the word “now” should not be used. I have been told that the documentation of openHAB is not supposed to describe how thing were in older versions, just describe the current version : #2573 (comment) .

Moreover at #2567 for the "Provider preset” I wrote “The preset is available since openHAB 5.0.”. That last sentence was removed.

My understanding is that the openHAB-documentation refers only to the current⇔upcoming version, and it does not make statements about outdated, previous versions.

That said, there is no point to emphasize here, that in the past one sitemap could be included per .sitemap file.

In addition, users read this sitemap.md file once, when they create a sitemap. Users are not supposed to reread the file to find out, that things have changed. This is to be included in the Release Notes, if it is considered as important enough the fact that a single sitemap file can from 5.2. on contain many sitemaps.

@dilyanpalauzov
Copy link
Copy Markdown
Contributor

Instead of now the text should be since version 5.2, so that users can understand the meaning, even if they read this in 10 years. This does not change my opinion, that for consistency the sentence should disapear.

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.

5 participants