Basic UI not displaying values

I am new to OH and trying some basic sitemaps to get the hang of the programming before I start adding complexity. I tried the most basic thing I could come up with… the time, and that isn’t displaying.

sitemap default label=“test”
{

Frame label="Date" {
    Text item=Date
}

}

This only displays an icon of a page with the label “Date” but no value.

I have tried to add a network device, or single value from other items on my network and get the same result. What am I missing?

You need to have a rule to set the Date. Place this in your .rules directory.

rule SetDay
when
     System started or
     Time is midnight
then
     Date.postUpdate(new DateTimeType())
end

Do you have a Date Item defined? Is your sitemap in default.sitemap?

The sitemap itself looks OK but you can’t just create a sitemap in isolation. You need to define the Items shown in the sitemap first.

Thank you. I thought from one of the examples in the templates that Date was a native function not needing binding or item. I found a good explanation at http://docs.openhab.org/addons/bindings/ntp1/readme.html. It works now.