LAN NTP

Does anyone know from where can I download a LOCAL LAN NTP and how to link vera 2 to it? I want to use Vera2 in a non internet environment :slight_smile: I tried reading the related posts but i didnt had any considerable answer

[url=http://forum.micasaverde.com/index.php?topic=5393.0]http://forum.micasaverde.com/index.php?topic=5393.0[/url]

[/url]http://forum.micasaverde.com/index.php?topic=4895.msg27078#msg27078[/url]

For Windows:

cj,

could you elaborate on where to tweak a Vera V2 to point her to a local NTP server? Thanks!

I’ve been reading up on ntp (Vera V1) and rdate (Vera V2) and it seems that rdate can’t communicate with ntp and vice versa
for ntp the command should be “ntpdate 192.168.1.1” where the ip address is your ntp server, I tested this with my DD-WRT router as ntp server and my Ubuntu machine and it updates

don’t know how Vera V1 does it but this did the trick on my PC

since I’m looking for a Vera V2 I’ll have to look into this a little further

allright, it seems when I create/edit a file from xinetd named time and change “disable = yes” to “disable = no” so the file looks like

[code]# Begin /etc/xinetd.d/time

service time
{
disable = no
type = INTERNAL
id = time-stream
socket_type = stream
protocol = tcp
user = root
wait = no
}[/code]

hen I restarted xinetd on my router and did

rdate 192.168.1.1

on my Ubuntu machine and I got a correct response…

hmmm… after killing all ntpd processes on my router and asking rdate from my Ubuntu machine it still works…

gonna stop for now, it’s time for some brain-rest :slight_smile:

Grain,

You’re right, NTP (http://tools.ietf.org/html/rfc5905) and the Time Protocol (http://tools.ietf.org/html/rfc868) used by rdate aren’t related.

usually you use the ntpdate executable to update or correct the time/date. ntpdate 192.168.0.12

does vera have the ntpdate executable or maybe its named something else. you can usually setup a list of time servers to use, which would be helpful if your network is down. You could point to a linux or windows machine on the local network that is runnning the server software.

I don’t have a vera yet, but have extensive linux experience setting up time servers and using ntpdate on clients.

this would easily solve all the problems i keep seeing here about lost time on the vera.

good luck

It’s an OpwnWrt thing. Vera’s 1.1.1xxx is layered on top of OpenWrt 10.3 (codename “Backfire”). For reasons best known to the OpenWrt people, they chose to not install an NTP client by default but to use the smaller-footprint rdate client, which as has already been mentioned is not at all related to NTP. IMHO this is a backwards step, so I install ntpd on my OpenWrt machines, Vera included.

Installing ntpd is as easy as running as root on the Vera:

[code]# opkg update

opkg install ntpd

/etc/init.d/ntpd enable

/etc/init.d/ntpd start[/code]

It takes up 232 kB, 3% of the Vera2’s JFFS (/overlay) space. By default ntpd queries hosts in the .openwrt.pool.ntp.org domain, but you can edit /etc/ntp.conf to point at a local machine if you prefer.

(ntpclient is also a package available through opkg. It uses the same NTP protocol as ntpd, but it’s more of a run-once-to-set program, whereas ntpd is a run-in-the-background daemon. ntpclient can be coerced into behaving like a daemon, but I’m more familiar with ntpd so that’s what I’m describing.)

thanks for the extensive info futzie!

didn’t think of adding ntpd afterwards
I did indeed read in several places that ntpd is superior to rdate

hope to get my Vera 2 somewhere this week so I can test :slight_smile:

It takes up 232 kB, 3% of the Vera2's JFFS (/overlay) space.
wow! does that mean there is around 7MB available for jffs? that would be great!

Guys ,

I want to thank all of you for your helpful replies. If i wanted to summarize all the info , I would have to do the following:

  1. Download NTP App http://www.timetools.co.uk/ntp-servers/ntp-server.htm , supposing my machine IP is 192.168.1.1

  2. Call ntpdate 192.168.1.1

  • I have Vera 2

The trouble with ntpdate is that it just runs once. Though that will set your clock, it doesn’t account for drift if your Vera’s internal clock is inaccurate. Even if you arranged for ntpdate to run every so often (say, via cron), you’d get discontinuity in the clock when you run ntpdate, jumping forward and possibly missing a second when you intended to run a scene, or jumping backwards and repeating a second causing a scene to run twice. ntpdate is actually deprecated for this reason, so I don’t recommend installing it.

I can see at least three NTP clients for OpenWrt which run all the time as a daemon. They all handle clock slewing, adjusting the clock’s rate imperceptibly, to avoid discontinuities, and they keep your clock in sync with time servers.

[ul][li]ntpclient (contains ntpclient, from ntpclient)[/li]
[li]ntpd (contains NTP Project’s ntpd, from http://www.ntp.org/)[/li]
[li]openntpd (contains OpenBSD’s ntpd, from ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/)[/li][/ul]

OpenWrt seems to have the most support for the first of these (ntpclient), and even has a package for managing it through the web interface (luci-app-ntpc). You could probably install that through Vera’s “Advanced” configuration page on the Net & WiFi tab, and configure it without having to ssh to your machine at all.

The Internet has been down all day where my Vera resides and I’m at work wondering what time Vera is displaying and if scenes are firing…

I then realized that my camera server that sits next to Vera on the same network can be configured as an NTP server.

Does Vera have a list of NTP IP’s she checks and is there a way I can add my servers IP to that list?

JOD.

Vera V1:
[tt]/etc/config/ntpclient[/tt]

Vera V2 doesn’t use NTP.

[quote=“JOD, post:12, topic:167549”]The Internet has been down all day where my Vera resides and I’m at work wondering what time Vera is displaying and if scenes are firing…

I then realized that my camera server that sits next to Vera on the same network can be configured as an NTP server.

Does Vera have a list of NTP IP’s she checks and is there a way I can add my servers IP to that list?

JOD.[/quote]
Are you sure the camera is a server and not a client? Most cams just have the configuration as a client to be able to automatically set date and time if power gets lost?!

It’s a Nuvico 16 channel server for camera’s. It has two options. Although I’m using a Vera 2 so the 2nd option does me no good.
Client: set to be a client to a time server.
Server: set to be a time server for other clients.

What other options are there for time syncing a Vera 2?

JOD.

See my reply #7 above. It describes what you need to do to install ntpd on Vera2. It also mentions the file you have to edit to add your camera server’s IP address.

@futzle,

Maybe MCV made some changes since your previous post?

root@MiOS_XXXXX:~# opkg update
Downloading http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/Packages.gz.
Inflating http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/packages.
root@MiOS_XXXXX:~# opkg install ntpd
Installing ntpd (4.2.6-4) to root...
Downloading http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/ntpd_4.2.6-4_brcm-2.4.ipk.
Configuring ntpd.
Configuring kmod-fs-ext3.
root@MiOS_XXXXX:~# /etc/init.d/ntpd enable
root@MiOS_XXXXX:~# /etc/init.d/ntpd start
root@MiOS_XXXXX:~# 
root@MiOS_XXXXX~# /etc/ntp.conf
-ash: /etc/ntp.conf: Permission denied

Am I missing something, any ideas?

JOD.

[quote=“JOD, post:17, topic:167549”]@futzle,

Maybe MCV made some changes since your previous post?

root@MiOS_XXXXX:~# opkg update
Downloading http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/Packages.gz.
Inflating http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/packages.
root@MiOS_XXXXX:~# opkg install ntpd
Installing ntpd (4.2.6-4) to root...
Downloading http://downloads.openwrt.org/backfire/10.03/brcm-2.4/packages/ntpd_4.2.6-4_brcm-2.4.ipk.
Configuring ntpd.
Configuring kmod-fs-ext3.
root@MiOS_XXXXX:~# /etc/init.d/ntpd enable
root@MiOS_XXXXX:~# /etc/init.d/ntpd start
root@MiOS_XXXXX:~# 
root@MiOS_XXXXX~# /etc/ntp.conf
-ash: /etc/ntp.conf: Permission denied

Am I missing something, any ideas?

JOD.[/quote]

I’ve not done this, but I’m pretty you need to edit /etc/ntp.conf. The above looks like you tried to invoke it as an executable–and it shouldn’t have the execute bits set, since it’s just a config file. So you’d need to edit it to point to your local ntp server as a provider, and probably do an “/etc/init.d/ntpd restart”.

–Richard

Still no go.

-ash: edit/etc/ntp.con: not found
root@MiOS_XXXXX:~# edit/etc/ntp.con
-ash: edit/etc/ntp.con: not found
root@MiOS_XXXXX:~# edit/etc/ntp.com
-ash: edit/etc/ntp.com: not found
root@MiOS_XXXX:~# edit /etc/ntp.conf
-ash: edit: not found
root@MiOS_XXXXX:~# /etc/init.d/ntpd restart
root@MiOS_XXXXX:~# edit /etc/ntp.conf
-ash: edit: not found

JOD.

[quote=“JOD, post:19, topic:167549”]Still no go.

-ash: edit/etc/ntp.con: not found
root@MiOS_XXXXX:~# edit/etc/ntp.con
-ash: edit/etc/ntp.con: not found
root@MiOS_XXXXX:~# edit/etc/ntp.com
-ash: edit/etc/ntp.com: not found
root@MiOS_XXXX:~# edit /etc/ntp.conf
-ash: edit: not found
root@MiOS_XXXXX:~# /etc/init.d/ntpd restart
root@MiOS_XXXXX:~# edit /etc/ntp.conf
-ash: edit: not found

JOD.[/quote]

So I’m not sure what editor gets shipped as part of OpenWRT–but it looks like it’s probably “vi”. Not my favorite, but you could hardly expect them to put Emacs on routers. What do you get if you type in “cat /etc/ntp.conf” at the command prompt?

–Richard