Items work in PaperUI, but not in sitemap

Hi community,
I updated to OH2.4 on RPI3 and since then do have the problem that I see the items in PaperUI and can as well control them, but they do not work in the sitemap.

item file: (example)
DateTime Date “Date [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]” { channel=“ntp:ntp:demo:dateTime” }
Rollershutter Arbeitszimmer “Arbeitszimmer” { channel=“elerotransmitterstick:elerochannel:112565ac:5:control”,autoupdate=“false” }
String ArbeitszimmerStatus {channel=“elerotransmitterstick:elerochannel:112565ac:5:status” }

sitemap file: (example)
Text item=Date
Selection item=Arbeitszimmer label=“Arbeitszimmer Jalousie” mappings=[0=“offen”, 100=“zu”, 25=“Beschatten”, 75=“Wenden”]

Could this be an issue with the Java?
I installed following version together with OH:
openjdk version “1.8.0_212”
OpenJDK Runtime Environment (Zulu8.38.0.163-CA-linux_aarch32hf) (build 1.8.0_212-b163)
OpenJDK Client VM (Zulu8.38.0.163-CA-linux_aarch32hf) (build 25.212-b163, mixed mode, Evaluation)

Any help is very much appreciated.
Thanks

Please use code fences in the forum.

Bit more detail?

If your sitemap simply does not work, we would like to see the header section, know the filename, and see the url you use in the browser.

You may see relevant messages in openhab.log when you refresh your browser.

Quick diagnostic lines you can add to your sitemap, as well as the ones you are working on

Default item=Date "date [%s]"
Default item=Arbeitszimmer label="Arbeitszimmer [%s]"

I’m not keen on naming an Item ‘Date’, it may lead to confusion ?

HI rossko57,

thanks for your help.
I added your code in the sitemap, but it doesn´t show anything. See attached the full code of the test sitemap
sitemap default label=“Test” {

Frame label=“Kalender” {

Selection item=Arbeitszimmer label=“Arbeitszimmer Jalousie” mappings=[0=“offen”, 100=“zu”, 25=“Beschatten”, 75=“Wenden”]

Default item=CurrentDate label=“CurrentDate [%s]”

Default item=Arbeitszimmer label=“Arbeitszimmer [%s]”

Text item=CurrentDate

}

}

This is what is shown in the browser.
I also changed the name of Date to CurrentDate, but no change.

IN the log I just find the info that the NTP updated.
2019-07-05 11:40:37.114 [vent.ItemStateChangedEvent] - ntp_ntp_local_dateTime changed from 2019-07-05T11:40:07.069+0200 to 2019-07-05T11:40:37.076+0200
…but no related errors or so.

HI rossko57,
I found the issue. But it is not logic to me.
In my standard sitemap I had an old adress of the channel for the sunrise event. (astro binding)
When I corrected this, everything worked again.

But why the simple test sitemap with the simple CurrentDate item did not work I do not understand.
Because since I corrected the default sitemap, as well the test sitemap works.
Probably they are linked somehow.

Anyhow, thanks for supporting me.

But this was in file test.sitemap ?

sitemapname shall always be equal to the Sitemaps file name

Use
sitemap test label=“Testing” {

https://www.openhab.org/docs/configuration/sitemaps.html#special-element-sitemap

1 Like

ok, that makes sense. Then it is explained why it refered to the default sitemap.
But why the astro binding determines the current date even though ntp binding is installed is somehow strange to me. ;.)

No idea what you are on about there, it’s all been sitemaps so far.

You showed us an event.log where an Item called ntp_ntp_local_dateTime got updated, but none of the sitemap you have shown us includes that Item.

There has been no mention of Astro until now.

Hi @phibi80,

there are some points you mix together. As @rossko57 said your using several DateTime-Items.

So let’s begin with the item:

DateTime Date "Date [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]" { channel="ntp:ntp:demo:dateTime" }

As Rossko said it would be better to give it another name (e.g. current_Date, ntp_currentDate, etc.). What you made is to describe your item including the formatter ( [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM] ". That’s quite correct, if you’re using the right file-format to (utf-8) to save the file (and of course all files in the openhab-conf Folder).

So what you then made, was to define the item in the sitemap, like this:

Default item=Date "date [%s]"

So first this is not correct as you forgot the keyword “label=” for the description !!!
Second the formatter you are using here is not correct too.

So try to use it in this way:

Default item=Date     /or whatever name you gave in the .items-file
or
Text item=Date

or
Text item=Current_DateTime     label="Heute ist [%1$tA, %1$td.%1$tm.%1$ty]"     valuecolor=["red"] labelcolor=["red"]

BTW: As Rossko said: We’re talking about the NTP-Binding (and channel(s) linked to an item) not about the Astro-Binding.

Have fun with testing :wink:

Cheers,
Peter

Hi together,

sorry was off one week for business.
Ok got the point. I just wanted to say I had installed as well the astro binding and fixed there a code bug as well and then the current time + sunset … was working again.

So my first conclusion was, the problem was in the astro binding, but I corrected the ntp description and astro at the same time.

Thanks again for your support.

Fine to hear that everything’s ok now. Pls. mark your post as solved.