API to get channel time zone

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
Posts: 2
Joined: Wed Mar 20, 2019 9:47 am

API to get channel time zone

Post by Indyjason79 » Wed Mar 20, 2019 10:02 am

I just got my HD HomeRun Quatro and love it, but the biggest issue I've faced is the EPG data time zone offset for some channels. I'm using Plex as my DVR and wanted to setup my OTA channels with my Premium HD HomeRun channels. Come to find out Plex can only use 1 source of EPG data so I can only setup either my OTA channels or the HD HomeRun channels, but not both. I found a trick someone posted on the internet about using a local cable provider as the EPG source and mapping the channels to the cables channels. That works perfectly for what I need, but since some of the HD HomeRun channels are in a different time zone it isn't a perfect solution.

So I started researching what other people were doing about this and it turns out there's not a lot of options. I tried using the XMLTV and other console apps to build my own XML EPG to use in Plex, but they were extremely complicated, had little documentation, and you had to pay for an EPG source using something like Schedules Direct. After spending weeks fiddling with the console apps with no luck, I decided to write my own console app to handle it.

My console app literally just executes a SQL statement to the Plex SQLite database where the EPG data is stored and offsets the start & end times of shows by 3 hours for the channels that are in Pacific time. The issue I'm facing now is that I want to make this app future proof so if the channels get updated to be in EST instead of PST my app would handle the change gracefully. I'm using the local API to get the channel data from my Quatro, and was sad to see they didn't include any data for the time zone the channel is provided in:

"GuideNumber": "6.1",
"GuideName": "WRTV-HD",
"VideoCodec": "MPEG2",
"AudioCodec": "AC3",
"HD": 1,
"Favorite": 1,
"URL": ""

My question is, does anyone know of an API I could use to get the time zone the channel is broardcast in for the HD HomeRun premium channels? I doubt there is, so does anyone have any suggestions how I can do this? I thought about just grabbing the data from the HD HomeRun website where the time zone information is displayed, but would much rather use an API.

Any help is appreciated!

Posts: 8053
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 131B34B7 13231F92 1070A18E 1073ED6F

Re: API to get channel time zone

Post by signcarver » Wed Mar 20, 2019 12:48 pm

What is needed is for Plex to allow multiple lineups the way just about any other program works... then you choose PTV East or PTV West as your additional lineup... that simple. Yes there will be occasions when such "breaks" but that is always the case as it wouldn't magically know in real time that such a timezone changed anyway.

For anything other than plex, there wouldn't be a need as broadcast data is in UTC thus no timezone applies and wouldn't apply to an OTA station... as for cable channels, they do have east and west feeds but that is known to "you" thus you choose appropriately when you get or put your guide together. And as you are aware you can make your own xml to combine them since they don't let allow such an easy way which is much easier than what you are apparently doing.

The way the "PTV" guide data comes in from SD is that if the Guide Name is AETVHDP but the device shows only A&E as the GuideName as it is friendlier to the user to see it that way and that is completely transparent to the user. The device has no way to get or hold such time zone information as that is the responsibility of the guide provider.

Post Reply