Project

General

Profile

TVH web ui time incorrect

Added by joe blow about 1 year ago

For the past several days, recording The Young and Restless, the time is way off, the web ui shows as airing at 1930, for one hour.
Using kodi as frontend, it shows at the correct time and I'm able to see the scheduled recording, and in fact the recording does occur at the correct time, 1230 - 1330, east coast time.
EIT time offset:= UTC -6, which is correct for my TZ.
The xmltv file shows the correct time slot.
My attempt at troubleshooting, I've complied from source, in order to get the epgdump, to see if there some clue in the db, but it errors:

__iter__()
Traceback (most recent call last):
  File "/home/jerry/programs/tvheadend/support/epgdump", line 37, in <module>
    for msg in htsmsg.deserialize(fp, True):
TypeError: iter() returned non-iterator of type '_Deserialize'

So what is needed for the dump?
Thanks

Replies (12)

RE: TVH web ui time incorrect - Added by Jonas Lang about 1 year ago

What hardware have you compiled it on. What Linux version are you using. This info would be a great help troubleshooting your problem.

RE: TVH web ui time incorrect - Added by joe blow about 1 year ago

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-13-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × AMD Ryzen 3 3200G with Radeon Vega Graphics
Memory: 13.6 GiB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: A520M S2H

RE: TVH web ui time incorrect - Added by Jonas Lang about 1 year ago

What source did you use to install TVH. Did you self compile or install from a PPA via your apt repository or what.

RE: TVH web ui time incorrect - Added by joe blow about 1 year ago

compile from github master

RE: TVH web ui time incorrect - Added by Mark Clarkstone about 1 year ago

Try selecting "Local (server) time" then deleting the EPG database in your config directory. I can't remember the exact file name, but it's something like epgdb.

RE: TVH web ui time incorrect - Added by joe blow about 1 year ago

no change, set eit to utc, no change, removed epgdb.v3 set eit to local time server no change
we have gotten away from troubleshooting the issue with NOT being able to epgdump,

RE: TVH web ui time incorrect - Added by Delta Mike Charlie about 1 year ago

I had a quick look at this, the issue that you are seeing is a problem with the underlying HTSP Python library. (The ‘next’ method for the ‘deserialize’ object should be named ‘__next__’.)

Even when I remedy this, it seems that the above method can’t read in the EPG data because the initial sizing variable is incorrect. (My uncompressed EPGDB is 3,978,990 bytes whereas epgdump tries to read 335,743,750 bytes)

Looking at its history, it has been 10 years since any work was done on the epgdump utility. I suspect that it was either written for Python v2 and/or the EPGDB serialisation format has changed so much that it is no longer recognised.

For further troubleshooting, you could try to look at the output in JSON format. The date provided there seems to be in Unix epoch format (UTC).

https://github.com/dave-p/TVH-API-docs/wiki/Epg

Also, if Kodi is showing the correct time, then I suspect that the EPGDB is probably storing the correct time because HTSP uses a similar, perhaps even identical, serialisation technique.

https://tvheadend.org/projects/tvheadend/wiki/Htsmsgbinary

Perhaps try a number of browsers and computers to see if the error is universal or browser-specific.

RE: TVH web ui time incorrect - Added by joe blow about 1 year ago

Here's what browsers I've tried and the results:
brave ok, firefox ok, librewolf fails, konqueror ok, chromium ok
So it would seem, that librewolf is the culprit, just started using last week and that would explain the errors.
I did make an attempt at the serving up the java, placed the script at /usr/share/tvheadend/src/webui/static, it does ask for user/password, but then nothing occurs, just a blank, tried with all the browsers.
A related question, why this particular db, other than "its always been used", seems as very specific to TVH, and to have to compile, just to get a db dump and see whats there, when there are other db's that do the job?
I'll wait a couple days, and file a bug report, on the errors with epgdump.
Thanks for the assistance and pointers, much appreciated.

RE: TVH web ui time incorrect - Added by Delta Mike Charlie about 1 year ago

joe blow wrote:

A related question, why this particular db, other than "its always been used", seems as very specific to TVH, and to have to compile, just to get a db dump and see whats there, when there are other db's that do the job?

One can only speculate. None of the original developers are around anymore and I have only been around this project for a few months now.

From my limited exposure to the source code, the serialised data format seems to be passed around internally. It is also used in HTSP to communicate to front-ends like Kodi. I suppose that it just seemed logical to reuse the code when saving big chunks of data to disk. Smaller config-style files are saved as JSON.

Also, as TVH can also run on SBCs like a Raspberry Pi, perhaps the serialised format is lighter on resources than even something as simple as SQLite.

RE: TVH web ui time incorrect - Added by Dave H 12 months ago

Delta Mike Charlie wrote:

Looking at its history, it has been 10 years since any work was done on the epgdump utility. I suspect that it was either written for Python v2

FWIW, the program runs on my old TVH 4.2.6 installation, but only when I use python2 to run it.

RE: TVH web ui time incorrect - Added by Delta Mike Charlie 12 months ago

Dave H wrote:

FWIW, the program runs on my old TVH 4.2.6 installation, but only when I use python2 to run it.

Perfect explanation, thanks Dave. Problem solved.

    (1-12/12)