Kodi Community Forum
PVR addon on XBMC launch after suspend - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: MediaPortal (https://forum.kodi.tv/forumdisplay.php?fid=171)
---- Thread: PVR addon on XBMC launch after suspend (/showthread.php?tid=157850)

PVR addon on XBMC launch after suspend - vxl123 - 2013-02-28

During the night my HTPC is suspended. Before sleep XBMC is being closed. On wake up XBMC is started with delay of 15s (set this delay so TVservice is able to initialize the TBS6618 tuner; would like to decrease it). The problem is, that PVR addon could not get channel list on XBMC launch.

Here is MediaPortal Server tv.log:

Quote:2013-02-26 07:47:45.515600 [PowerEventThread(9)]: TV service PowerEventThread 30
2013-02-26 07:47:45.515600 [PowerEventThread(9)]: TV service PowerEventThread 30
2013-02-26 07:47:47.028802 [PowerEventThread(9)]: OnPowerEvent: PowerStatus: ResumeAutomatic
2013-02-26 07:47:47.028802 [PowerEventThread(9)]: OnPowerEventHandler: PowerStatus: ResumeAutomatic
2013-02-26 07:47:47.028802 [PowerEventThread(9)]: TvController.OnResume()
2013-02-26 07:47:47.028802 [PowerEventThread(9)]: Controller: setup HeartBeat Monitor
2013-02-26 07:47:47.028802 [HeartBeatMonitor(35)]: Controller: Heartbeat Monitor initiated, max timeout allowed is 30 sec.
2013-02-26 07:47:47.044402 [PowerEventThread(9)]: Scheduler: started
2013-02-26 07:47:49.618407 [(41)]: Controller: AbortEPGGrabbing on card ID == 2
2013-02-26 07:47:49.618407 [(41)]: dvb:abort grabbing epg
2013-02-26 07:48:23.632799 [(14)]: TVServerXBMC: New Connection! Starting handler thread for client.
2013-02-26 07:48:23.633799 [(14)]: TVServerXBMC: Waiting for clients...
2013-02-26 07:48:23.633799 [(44)]: TVServerXBMC: connection accepted from XBMC PVR addon
2013-02-26 07:48:23.634799 [(44)]: TVServerXBMC: Handling command: GetCardSettings
2013-02-26 07:48:23.634799 [(44)]: TVServerXBMC: Handling command: GetBackendName
2013-02-26 07:48:23.635799 [(44)]: TVServerXBMC: Handling command: GetVersion
2013-02-26 07:48:23.721804 [(44)]: TVServerXBMC: Handling command: ListTVChannels
2013-02-26 07:50:35.747355 [PowerEventThread(9)]: Scheduler: loaded 0 schedules
2013-02-26 07:50:35.748355 [PowerEventThread(9)]: Scheduler: thread started.
2013-02-26 07:50:35.749355 [PowerEventThread(9)]: DiskManagement: started
2013-02-26 07:50:35.750355 [PowerEventThread(9)]: OnPowerEvent: PowerStatus: ResumeSuspend
2013-02-26 07:50:35.750355 [PowerEventThread(9)]: OnPowerEventHandler: PowerStatus: ResumeSuspend

Here is xbmc.log:
Quote:07:48:23 T:4848 NOTICE: PVRManager - starting up
07:48:23 T:5096 NOTICE: Thread PVR manager start, auto delete: false
07:48:23 T:3128 NOTICE: Thread PVR add-on updater start, auto delete: false
07:48:24 T:2500 NOTICE: Thread CFileCache start, auto delete: false
07:48:27 T:1572 NOTICE: Thread Jobworker start, auto delete: true
07:49:05 T:5096 ERROR: AddOnLog: MediaPortal PVR Client: SendCommand - Failed with code: 1 (ERROR: Failed after 10 retries)
07:49:05 T:5096 ERROR: PVR - PVR::CPVRClient::GetChannels - addon 'MediaPortal TV-server (HTPC):' returned an error: server error
07:49:05 T:5096 ERROR: PVR - PVR::CPVRClients::GetChannels - cannot get channels from client '1': server error
07:49:05 T:5096 ERROR: PVRChannelGroup - PVR::CPVRChannelGroup::Load - failed to update channels
07:49:05 T:5096 ERROR: PVRChannelGroupInternal - PVR::CPVRChannelGroupInternal::Load - failed to load channels
07:49:05 T:5096 ERROR: PVR - PVR::CPVRChannelGroups::Load - failed to load channels
07:49:05 T:5096 ERROR: PVRManager - PVR::CPVRManager:Tonguerocess - failed to load PVR data, retrying

And nothing happens with PVR till I switch it ON->OFF->ON or close XBMC.exe process in task manager and restarts XBMC.
This happens only after long suspend (during night). If suspend is only few hours - everything starts normally.

Is there any workaround about this problem?

RE: PVR addon on XBMC launch after suspend - margro - 2013-03-03

Not that I know...
I can't test it easily here. MediaPortal looses my TV card completely after a resume from suspend, so I always have to restart the TV Server.

RE: PVR addon on XBMC launch after suspend - Jete246 - 2013-03-03

A workaround I've been using is to have a batch script run when my htpc resumes that kills xbmc, restarts the tv service and starts xbmc. This works most of the time, but sometimes the pvr addon still doesn't work.

So in that case I've a python script I can run from the xbmc home screen that calls that same batch script and then live tv will work properly again. This way I don't have to rdp to my htpc to do all this stuff manually....has definitely made my life easier. Smile

RE: PVR addon on XBMC launch after suspend - vxl123 - 2013-03-03

Yesterday I found a workaround. I went same way as Jete246:
1. Installed Power Triggers program, which allows to run any script before suspend (stop TVService) and on wake up (Start TVService with delay of 5s so SQL connection (remote server) can start properly).
2. Added AutoIT script, that kills XBMC on suspend, and starts XBMC with delay of 10s after wake up.

Today in the morning tested this configuration and everything seems to be OK.

This forum uses Lukasz Tkacz MyBB addons.