[SOLVED] DateTime not working

Hi,
I’ve been setting up bunch of sensors and every possible thing for the past few days and it’s working great. Except today, tried something as simple as displaying date, but getting a blank like - -. - - . I don’t know if there’s something I am doing wrong or the binding ntp/DateTime is not working. Here’s my item:
DateTime Date “Date [%1$tA, %1$td.%1$tm.%1$tY]” { ntp=“America/New_York:en_EN” }

My sitemap:
Text item=Date

I’ve tried everything from changing server (to 0.us.pool.ntp.org) in openhab.cfg to restarting openhab but still get a blank. This has got me stumped as it seems very basic.
Do I have to create a rule to get the date updated?
If not, maybe I’ll try getting date from other sources.
Appreciate any help.
Thanks

Running openhab 1.7 on raspberry pi2.

I don’t know the locale en_EN and that might be the problem. Could you mean English, en_GB, English (US), en_US, English (Australia), en_AU, etc?

Thanks. Was a blunder, but tried that just now and no go. Tried simply with { ntp=""} like in the ntp binding example and still blank.

I see the unknown en_EN is provided in the NTP binding wiki page, so that looks like a doc problem.

Do you see anything helpful in openhab.log?

Hi,
no clue so far from the logs. I am trying other servers too 1.us.pool.ntp.org, if anyone gives me his/her config then I know it’s a problem with my setup and not the ntp binding. Btw, I am using 1.7.1 version.

Also, I realized I unzipped all the .jars from the addons zip file to the addons folder, maybe one of the other addons is creating a problem? I don’t want to remove anything essential, so stuck with all the possible addons one could have.

Hi, you only want the JARs for the addons you’re using in the addons folder! Remove the JAR files for unused addons, restart openHAB and see if that helps.

1 Like

It worked, but not sure which one did it. Because, I first changed the server to 1.us.pool.ntp.org, then replaced the NTP jar file with the file I had in my addon folder(although both had similar sizes) and finally deleted all the non-essential jar files (the ones that sound like commercial products) and then restarted raspberry pi. Everything came to life including the date showing up. Thanks watou!
Although, just now the my.openhab.org is down for a while, so not able to see it outside my network. Does this happen often?

1 Like

Not in experience. Glad you got NTP working!

Once in a while for short periods of time. At the moment the service is down, according to my logs since almost 3 hours :disappointed:

Ok, glad it’s not just me then.
Never happened to me in last 2 weeks, so I will let this pass as an one off case.
But it reminds me to make my rules take such things into account when I trigger tasks via ifttt. For example I don’t want my watering schedule to start and then never stop (there goes my carpet). :wink:

I’m getting 504 errors from my.openhab.org, but it’s not typical I don’t think!

Almost there, got into my.openhab.org and logged in but can’t access sitemap yet.

Ok, I can now confirm that my DateTime issue was due to the corrupt NTP jar file. After replacing old one with a new one the problem is fixed.

1 Like