Set time using OTA TV for offline UnRAID


Recommended Posts

TVHeadend now includes an ATSC EPG parser, making it much easier to run a full-fledged media server offline. One of the last major roadblocks is getting (and maintaining) accurate time. UnRAID uses the system clock by default when it can't access NTP servers. While it works and is accurate, most system clocks drift too quickly for accurate PVR duties. Having to manually reset the clock is also a hassle.

 

Many people maintain accurate time using GPS receivers, but that requires line-of-sight access to the sky, which many people may not have in their homes. Fortunately, accurate (enough...) time is broadcast as part of the ATSC signal. Many PVRs capable of operating offline (e.g. Channel Master DVR+) use this method.

 

This is a niche request, but I think it opens up an interesting new use case for UnRAID.

Link to comment

Why can't you access NTP servers? I set all the other systems on my network using unRAID builtin NTPd and set unRAID time from the internet. If you have different systems on your network with significantly different clocks you are going to have problems.

 

This request requires support for hardware that has never been part of unRAID functionality. Maybe better as a request to those who compile special versions of unRAID for supporting such hardware.

Link to comment

TVHeadend now includes an ATSC EPG parser, making it much easier to run a full-fledged media server offline. One of the last major roadblocks is getting (and maintaining) accurate time. UnRAID uses the system clock by default when it can't access NTP servers. While it works and is accurate, most system clocks drift too quickly for accurate PVR duties. Having to manually reset the clock is also a hassle.

 

Many people maintain accurate time using GPS receivers, but that requires line-of-sight access to the sky, which many people may not have in their homes. Fortunately, accurate (enough...) time is broadcast as part of the ATSC signal. Many PVRs capable of operating offline (e.g. Channel Master DVR+) use this method.

 

This is a niche request, but I think it opens up an interesting new use case for UnRAID.

I'm not sure I understand your problem. Using NTP on unraid there isn't any noticeable drift in time.

I suspect you expect your recordings to start and end exactly on program start/end?

There is a good reason for the option to add a specified amount of minutes pre/post recording. There will always be a little drift even from the channels when they start airing shows for various reasons.

Link to comment

As someone who compiles the special builds for Unraid for DVB support and someone who has used PVR functionality sinve the V5 beta phase, I can't say I've ever encountered a problem with "time drift" and nor have I ever heard of it being a problem amongst any Unraid users.....

 

Given that I'm not terribly keen on looking at this as something to spend time on if I'm honest.

Link to comment

Why can't you access NTP servers? I set all the other systems on my network using unRAID builtin NTPd and set unRAID time from the internet. If you have different systems on your network with significantly different clocks you are going to have problems.

 

NTP servers require internet access. I'd like to run my server offline.

 

Like you say, it's relatively easy to use UnRAID as an NTP server to keep other computers on the LAN synchronized. I've done it in the past. The tricky bit is maintaining accurate time on UnRAID offline.

 

As someone who compiles the special builds for Unraid for DVB support and someone who has used PVR functionality sinve the V5 beta phase, I can't say I've ever encountered a problem with "time drift" and nor have I ever heard of it being a problem amongst any Unraid users.....

 

Given that I'm not terribly keen on looking at this as something to spend time on if I'm honest.

 

Fair enough, I understand this is a niche use case. If setting time from an ATSC signal is anything like using a GPS receiver, I don't think compiling a special version of UnRAID is even necessary. My goal was to open up a dialog on the subject, here and on more general purpose Linux forums, to help frame the problem. If I make any progress I'll document my findings to help anyone trying to go down this path in the future.

 

Thanks for the input, everyone.

Link to comment

Why can't you access NTP servers? I set all the other systems on my network using unRAID builtin NTPd and set unRAID time from the internet. If you have different systems on your network with significantly different clocks you are going to have problems.

 

NTP servers require internet access. I'd like to run my server offline.

 

Like you say, it's relatively easy to use UnRAID as an NTP server to keep other computers on the LAN synchronized. I've done it in the past. The tricky bit is maintaining accurate time on UnRAID offline.

 

As someone who compiles the special builds for Unraid for DVB support and someone who has used PVR functionality sinve the V5 beta phase, I can't say I've ever encountered a problem with "time drift" and nor have I ever heard of it being a problem amongst any Unraid users.....

 

Given that I'm not terribly keen on looking at this as something to spend time on if I'm honest.

 

Fair enough, I understand this is a niche use case. If setting time from an ATSC signal is anything like using a GPS receiver, I don't think compiling a special version of UnRAID is even necessary. My goal was to open up a dialog on the subject, here and on more general purpose Linux forums, to help frame the problem. If I make any progress I'll document my findings to help anyone trying to go down this path in the future.

 

Thanks for the input, everyone.

 

I didn't get the part with no internet  ::)

Have you checked the "Update time" option in tvheadend configuration general page?

It is supposed to set time from DVB, so it should probably work for ATSC also I would think. If not, just create a bug/feature request at the tvheadend page. They are working pretty fast on tvheadend now a days if there are any bugs/requests.

Link to comment

Why can't you access NTP servers? I set all the other systems on my network using unRAID builtin NTPd and set unRAID time from the internet. If you have different systems on your network with significantly different clocks you are going to have problems.

 

NTP servers require internet access. I'd like to run my server offline.

I assume you have at least one other station on your local network that's on the Internet?  Then run an NTP server on it, then enable NTP on your unRAID server, but specify your own server only.  That's what I do, I run NTP on my always-on windows station.

Link to comment
Have you checked the "Update time" option in tvheadend configuration general page?

It is supposed to set time from DVB, so it should probably work for ATSC also I would think. If not, just create a bug/feature request at the tvheadend page. They are working pretty fast on tvheadend now a days if there are any bugs/requests.

 

Interesting! I'm in the final stages of building my server, so I haven't really used TVHeadend yet other than trying it out on my Raspberry Pi. Thanks for the suggestion.

 

I assume you have at least one other station on your local network that's on the Internet?  Then run an NTP server on it, then enable NTP on your unRAID server, but specify your own server only.  That's what I do, I run NTP on my always-on windows station.

 

My goal is to create a "sneakernet" separate from my internet-connected LAN, primarily for philosophical reasons. If my motives were entirely logical, I'd probably stop using UnRAID and just subscribe to Netflix/Hulu/Amazon Prime like everyone else. :P

Link to comment

If you have a completely air gapped network devoid of any internet access the typical means to solve this issue is to run a NTP server locally and sync to it. The time will be wrong but every host will be consistently wrong. Alternatively you can buy/make a radio based NTP clock. The commercial ones i have purchased in the past have been expensive but I would be surprised if some DIY solution doesnt exist.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.