jkaberg / tvhProxy

An small flask app to help Plex DVR connect with Tvheadend
Other
215 stars 108 forks source link

V1.71 & v1.72 upgrades not working with tvhProxy #15

Closed matbor closed 7 years ago

matbor commented 7 years ago

Using v1.5.6 recorder works fine with tvhProxy & HTS Tvheadend 4.0.9-16 plexmediaserver_1.5.6.3790-4613ce077_amd64.deb

Upgrading to either of these, plexmediaserver_1.7.1.3856-757424396_amd64.deb plexmediaserver_1.7.2.3878-8088811b8_amd64.deb

Causes Plex records to fail. and also device not found error.

Using v1.7.2....

Jun 01, 2017 22:28:36.846 [0x7f68e37fd700] DEBUG - DVR:Schedule: Attempting to schedule the item 'AFL - Rnd 11: Port Adel v Haw'.
Jun 01, 2017 22:28:36.846 [0x7f68e37fd700] DEBUG - DVR:Schedule: Trying airing at 2017-06-01 19:29:00 on channel 7.
Jun 01, 2017 22:28:36.846 [0x7f68e37fd700] DEBUG - DVR:Schedule: Device 0 tuner 0 scheduled recording between 2017-06-01 19:29:00 and 2017-06-01 22:50:00 on channel 7.
Jun 01, 2017 22:28:36.846 [0x7f68e37fd700] DEBUG - DVR:Grabber: Starting grab immediately for 'AFL - Rnd 11: Port Adel v Haw' and we're 10776 seconds in already.
Jun 01, 2017 22:28:36.846 [0x7f68e37fd700] DEBUG - DVR:Subscription: Scheduled all subscriptions in 92 ms.
Jun 01, 2017 22:28:36.847 [0x7f68e37fd700] DEBUG - DVR:Subscription: There are 26 grabs at the end.
Jun 01, 2017 22:28:36.847 [0x7f68e8fff700] DEBUG - DVR:Grabber: Starting operation for 'AFL - Rnd 11: Port Adel v Haw'.
Jun 01, 2017 22:28:36.848 [0x7f68e8fff700] DEBUG - DVR:Grabber: HDHomerun starting a media grab on device device://tv.plex.grabbers.hdhomerun/12345678 tuner 0.
Jun 01, 2017 22:28:36.853 [0x7f68e8fff700] DEBUG - DVR:Subscription: Failed to resolve subscription for 'grandparentGuid: com.gracenote.eyeq://show/AFL grandparentThumb: http://akamai-b.cdn.cddbp.net/cds/2.0/image/95C4/71F6/1029/9D46_large.jpg?cid=4412416 grandparentTitle: AFL guid: com.gracenote.eyeq://episode/AFL/2017-06-01 19:30:00 originallyAvailableAt: 2017-06-01 parentIndex: 2017 title: Rnd 11: Port Adel v Haw type: 4' to library item
Jun 01, 2017 22:28:36.867 [0x7f68e8fff700] DEBUG - DVR:Grabber: Saving recording to /mnt/tvshows/.grab/85fe9732b7fbeba309d60e0a20713c355bfef4a5
Jun 01, 2017 22:28:36.932 [0x7f68e8fff700] DEBUG - DVR:Grabber: Going to record for 1284 seconds, final URL is http://localhost/auto/v7?transcode=none
Jun 01, 2017 22:28:36.932 [0x7f68e8fff700] DEBUG - DVR:Grabber: Setting timer to stop grab of 'AFL - Rnd 11: Port Adel v Haw' in 1284 seconds.
Jun 01, 2017 22:28:36.932 [0x7f68e8fff700] DEBUG - DVR:Segmenter: Creating a new recorder for http://localhost/auto/v7?transcode=none.
Jun 01, 2017 22:28:36.934 [0x7f68e8fff700] DEBUG - DVR:Grabber: Waiting for a tuner (2 available).
Jun 01, 2017 22:28:36.934 [0x7f68e8fff700] DEBUG - DVR:Grabber: Allocated a tuner (1 left)
Jun 01, 2017 22:28:36.973 [0x7f68e8fff700] DEBUG - DVR:Recorder: It took 0.0 sec to start the session for http://localhost/auto/v7?transcode=none
Jun 01, 2017 22:28:36.973 [0x7f68e8fff700] ERROR - DVR:Recorder: Unable to compute media decision.
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] ERROR - DVR:Recorder: Error 14 starting the record, shutting things down.
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] DEBUG - DVR:Recorder: Asked to stop recording 'AFL - Rnd 11: Port Adel v Haw'.
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] DEBUG - DVR:Recorder: Stopping transcode session.
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] DEBUG - DVR:Grabber: Freed a tuner (now 2 available)
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] DEBUG - DVR:Grabber: Operation for AFL - Rnd 11: Port Adel v Haw completed with status error (An unknown error occurred)
Jun 01, 2017 22:28:36.974 [0x7f68e8fff700] ERROR - DVR:Grabber: Starting media grab failed.
Jun 01, 2017 22:28:37.934 [0x7f68d9ffc700] DEBUG - DVR:Recorder: Asked to stop recording 'AFL - Rnd 11: Port Adel v Haw'.

img_1023

Will do a bit more investigation, have rolled back to v1.56 in the meantime and trying to get the logs from v1.56, has anyone else had this issue?

matbor commented 7 years ago

My mistake. Fixed my config was wrong, strange how it worked previously!

supaseibz commented 7 years ago

I'm getting the same error. May I asked what you fixed in your config to get it working?

thanks!

matbor commented 7 years ago

@supaseibz My config below, hope it helps.. Note my TVHeadend & tvhProxy are on the same machine (192.168.4.5) .... and plex is on another machine (192.168.4.24).

This is the contents of tvhProxy.py config, make sure you have updated tvhProxy to latest first.

config = {
    'bindAddr': os.environ.get('TVH_BINDADDR') or '',
    'tvhURL': os.environ.get('TVH_URL') or 'http://matthew:matthew@192.168.4.5:9981',
    'tvhProxyURL': os.environ.get('TVH_PROXY_URL') or 'http://localhost',
    'tunerCount': os.environ.get('TVH_TUNER_COUNT') or 2,  # number of tuners in tvh
    'tvhWeight': os.environ.get('TVH_WEIGHT') or 300,  # subscription priority
    'chunkSize': os.environ.get('TVH_CHUNK_SIZE') or 1024*1024  # usually you don't need to edit this
}

And the data that is returned when i hit the url of tvhProxy; http://192.168.4.5:5004/discover.json

{
  "BaseURL": "http://localhost",
  "DeviceAuth": "test1234",
  "DeviceID": "12345678",
  "FirmwareName": "hdhomeruntc_atsc",
  "FirmwareVersion": "20150826",
  "FriendlyName": "tvhProxy",
  "LineupURL": "http://localhost/lineup.json",
  "ModelNumber": "HDTC-2US",
  "TunerCount": 2
}