Author Topic: Setting Time/Date  (Read 5843 times)

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Setting Time/Date
« on: March 08, 2012, 07:45:44 pm »
Once again, total newbie here, so maybe I missed something in reading the online manual and searching the forums. 

After a power outage or unplugging my Vera Lite to add a new device, I have to reset the time and date.  Losing the time setting is not a big deal except when the power goes out while I'm away and my automated programs all start running at the wrong time!  The date, however, is a big PITA.  Why, oh why, does the calendar in the settings start at 1970???  Clicking the mouse button 350+ times to get the calendar from January of 1970 to March of 2012 is rediculous... is there anyone actually using a date from 30 40 years ago? 

Is there an easier way to set the date, or can I get it to where Vera picks up the time/date settings from the internet? 

Other than this, my Vera setup is rocking along quite nicely.  Thanks in advance for any help.
« Last Edit: March 08, 2012, 08:55:55 pm by rogercfl »

Offline oTi@

  • Beta Testers
  • Master Member
  • *****
  • Posts: 4045
  • Karma: +30/-6
  • UI what ?!
Re: Setting Time/Date
« Reply #1 on: March 08, 2012, 08:47:10 pm »
Is there an easier way to set the date, or can I get it to where Vera picks up the time/date settings from the internet? 
If Vera is connected to the internet and you have set the proper time zone in Setup > Unit Settings the date/time should be automatically set. Is that not happening for you?
Dezwaved at the moment...

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #2 on: March 08, 2012, 08:51:59 pm »
Nope; it is not automatically setting it for me.  I"m connected through a small switch that connects to my router over ethernet (no wireless), and I've got a green-light on the internet connection on my Vera...

I've got my timezone setup to Chicago (for Dallas).
« Last Edit: March 08, 2012, 08:54:24 pm by rogercfl »

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9104
  • Karma: +690/-126
    • RTS Services Plugins
Re: Setting Time/Date
« Reply #3 on: March 08, 2012, 10:01:19 pm »
You could login through ssh to Vera to set the time ... not really for non computer types.
But none of the rest of this message is either ...
The protocol that Vera uses has a timeout when it boots ... If Vera does not get it's
network address ... and a response to it's "What time is it (RDATE) request" ... it uses the
linux epoch ... Jan 1, 1970 ...  RDATE is an antiquated way to get the time. Vera should be using NTP (Network Time Protocol) which would survive the startup network delays as well as continuously adjust the time of day ... no more time skew and scenes running at the wrong time.

Is vera connected to a network that is ALWAYS connected to the internet ? Do you have a router that might be slow to giving out DHCP addresses ?    You might configure Vera with a fixed IP address on your LAN.
 
 

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #4 on: March 09, 2012, 10:05:59 am »
You could login through ssh to Vera to set the time ... not really for non computer types.
But none of the rest of this message is either ...
The protocol that Vera uses has a timeout when it boots ... If Vera does not get it's
network address ... and a response to it's "What time is it (RDATE) request" ... it uses the
linux epoch ... Jan 1, 1970 ...  RDATE is an antiquated way to get the time. Vera should be using NTP (Network Time Protocol) which would survive the startup network delays as well as continuously adjust the time of day ... no more time skew and scenes running at the wrong time.

Is vera connected to a network that is ALWAYS connected to the internet ? Do you have a router that might be slow to giving out DHCP addresses ?    You might configure Vera with a fixed IP address on your LAN.
 

Well, that explains the 1970 date!

My network is always connected to the internet, except on the rare occasion my phone rings and my DSL momentarily drops out.  The Vera has a static IP address on my network; however, my router defaulted everything in my network to the 10.0.0.X addressing system.  Maybe that's causing Vera to have issues?  I do know Vera is connected to the internet because I can use SQ Remote on my iPhone to contral all my Z-Wave devices when I'm away from home.
« Last Edit: March 09, 2012, 10:20:28 am by rogercfl »

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9104
  • Karma: +690/-126
    • RTS Services Plugins
Re: Setting Time/Date
« Reply #5 on: March 09, 2012, 10:53:51 am »
I assume that Vera has a static address on the 10.0.0.xxx LAN.
You might try to hook Vera directly to the router, bypassing the switch, and see if the time get's set properly. Something is being slow to respond or blocking the RDATE request.

Offline oTi@

  • Beta Testers
  • Master Member
  • *****
  • Posts: 4045
  • Karma: +30/-6
  • UI what ?!
Re: Setting Time/Date
« Reply #6 on: March 09, 2012, 10:58:16 am »
I'm not sure, but I'm under the impression changing the timezone in the GUI may force a resync.

So, you could try setting the timezone to Los Angeles (i.e. something outside of the Chicago zone, for clarity) and see if it updates the time. If not, and you do have remote access with SQ Remote, then this seems to go towards something blocking rdate?
Dezwaved at the moment...

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #7 on: March 09, 2012, 11:02:39 am »
Yes, it is setup with a static address.

I'll move it from my living room to the office this weekend to see if that resolves it.  Hopefully the change in location won't mess up the Z-wave network...

Thanks for the help.

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #8 on: March 11, 2012, 01:44:57 pm »
I moved Vera into the office and plugged directly into my Router, but it did not work.  To confirm it, I tried changing the time zone to Los Angeles, and it moved the clock back two hours, but not to what the time in LA should be.

I manually set the time and setup one of my automation schedules to run everyday at 12:40 (it was 12:38 when I created the new schedule).  It ran the schedule and I checked the log; it shows to have run at 12:40 on 1969-12-31. 

The odd part is that the whole time, the dashboard shows the correct date of Sunday 11 Mar 2012.   ???

Other ideas?  I don't want to buy a UPS just to run Vera.

Offline Ap15e

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2000
  • Karma: +11/-0
Re: Setting Time/Date
« Reply #9 on: March 11, 2012, 01:51:04 pm »
Quote
The odd part is that the whole time, the dashboard shows the correct date of Sunday 11 Mar 2012.

That's not odd, that's working as badly designed:

For whatever reason MCV decided to fetch the date from the computer the web client is running on and to fetch the time from Vera itself ...

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #10 on: March 11, 2012, 01:53:59 pm »
After the 300+ clicks of the mouse to get it from December, 1979 to March of 2012, the current date is highlighted in yellow; I suppose it's also getting that from the client computer?

Offline chevdor

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Re: Setting Time/Date
« Reply #11 on: March 11, 2012, 06:36:10 pm »
Make sure your DNS is set in the network config. I suppose that Vera uses ntp server to set the time. But if the DNS is not set, it won't find the time server.


Offline Ap15e

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2000
  • Karma: +11/-0
Re: Setting Time/Date
« Reply #12 on: March 11, 2012, 06:56:51 pm »
V2 and V3 use rdate, not NTP ...

Offline rogercfl

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-1
Re: Setting Time/Date
« Reply #13 on: March 11, 2012, 08:08:52 pm »
Make sure your DNS is set in the network config. I suppose that Vera uses ntp server to set the time. But if the DNS is not set, it won't find the time server.

I'm not quite sure how to get to that area of network config, but I set it to manual and got the following.  It would appear the DNS is getting set okay.  I reset the settings back to automatic afteward:

WAN
FIREWALL
LAN

Commit

Restarting:
Network...
UDHCPC STOP on eth0:0
UDHCPC STOP on eth0:0
UDHCPC STOP on eth0:0
UDHCPC START on eth0:0 : udhcpc -t 0 -i eth0:0       -b -p /var/run/dhcp-eth0:0.pid  -O rootpath -R &
udhcpc (v1.17.3) started
udhcpc:  interface: wan ifname: eth0:0 with proto: dhcp
udhcpc:  deconfig ...
Sending discover...
Sending select for 10.0.0.16...
Lease of 10.0.0.16 obtained, lease time 86400
udhcpc:  interface: wan ifname: eth0:0 with proto: dhcp
udhcpc:  bound ...
udhcpc:  ifconfig eth0:0 10.0.0.16 netmask 255.255.255.0 broadcast +
udhcpc:  setting default routers: 10.0.0.1
udhcpc:  setting dns servers: 10.0.0.1

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9104
  • Karma: +690/-126
    • RTS Services Plugins
Re: Setting Time/Date
« Reply #14 on: March 11, 2012, 08:32:12 pm »
While you are there try

rdate -s

And see if it complains!