Problems with Date and Time on sitemap

Using Openhab 2.5 on Ubuntu 20 64-bit, runing on RPi 4 with 8GB SD Card

ubuntu@ubuntu:/etc/openhab2/sitemaps$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

ubuntu@ubuntu:/etc/openhab2/sitemaps$ java -version
openjdk version “1.8.0_252”
OpenJDK Runtime Environment (Zulu 8.46.0.225-CA-linux_aarch64) (build 1.8.0_252-b225)
OpenJDK 64-Bit Server VM (Zulu 8.46.0.225-CA-linux_aarch64) (build 25.252-b225, mixed mode, Evaluation)

ubuntu@ubuntu:/etc/openhab2/items$ cat default.things
ntp:ntp:local [ hostname=204.123.2.72, refreshInterval=60, refreshNtp=30 ]

ubuntu@ubuntu:/etc/openhab2/sitemaps$ cat lucero.sitemap
sitemap lucero label=“Lucero Way” {
Frame label=“Date and Time” {
Text item=Date icon=“calendar”
}
Frame label=“Ground Floor” {
Switch item=Living_Room_Lamp icon=“light”
}
}

ubuntu@ubuntu:/etc/openhab2/items$ cat default.items
DateTime Date “[%1$tA, %1$tB %1$td, %1$tY — %1$tl:%1$tM %1$tp]” { channel=“ntp:ntp:local:dateTime” }

I cannot get the date and time to show on the sitemap.

Any ideas?

Hi @mache, and welcome to the community!

Can you use code fences? It’s really difficult to read code that’s formatted as plain text. You just need to select the text and then press the </> button on the menu.

Cheers!

Mache, welcome to the OpenHAB community!!!

DateTime Date “[%1$tA, %1$tB %1$td, %1$tY — %1$tl:%1$tM %1$tp]” { channel=“ntp:ntp:local:dateTime” }

I’m not 100% sure but I seem to remember something like this coming up in the forums once before
The item name you are using ‘Date’ may be a reserved word or something
just for giggles, give it a different name, such as MyDate or something else

1 Like

Before that can happen, you would need your Item to be updated with new states.
Have you looked in your events.log to see if that happens, at all?

Have you installed the ntp binding? What does PaperUI have to say about your ntp Thing?

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.