NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Kodi / XBMC v
« Previous 1 … 13 14 15 16 17 … 43 Next »
Why am I missing recordings? (Wake Up Backend)

 
  • 0 Vote(s) - 0 Average
Why am I missing recordings? (Wake Up Backend)
hansolo77
Offline

Junior Member

Posts: 37
Threads: 8
Joined: Nov 2015
#1
2018-07-01, 07:01 AM
My KODI/XBMC box is running on a Raspberry Pi. It's very solid and works great. The NextPVR addon seems to be doing it's job mostly; it downloads guide data, lets me watch live TV, and does recordings. The NextPVR backend is running on home built server running Windows Server 2012. It too is very solid, and works great! I have 53tb of storage, filled to 6tb free with Music, Family Pictures, TV Shows, Movies, Games, backup storage, etc. I also have 3 tuners capable of receiving 5 channels at once. The NextPVR backend software runs on boot up, and communicates with Kodi regularly, as I said working well in harmony.

Anyway, enough back story.. My problem:

I've been missing a lot of recordings due to (I believe) a problem with the addon not waking the server to record a show. If the server is running and awake when a recording is due to start, it works perfectly fine. But I've actually witnessed a show get missed because the server doesn't wake to start. At first, I thought there was a 2-way communication between Kodi (Raspberry Pi) and NextPVR (server). Where if a schedule is made, it creates a timer on the server to wake itself up in time for the recording. But the more I research it, it looks like that's not the case at all. Kodi is apparently supposed to be sending a WOL (wake-on-lan) packet to the server to get things started. In my case, it seems like it's not doing that job. When I look in the PVR settings of Kodi, there is a "Power Saving" tab, where there appears to be a script being called that initiates the wake up. That script is said to be located in "/usr/bin/setwakeup.sh". I looked at that file and it doesn't have any information as to what it's doing, or anywhere to input an IP address. Could this be where my problem is? Am I missing something here?

Contents of "/usr/bin/setwakeup.sh":
Code:
#!/bin/sh

################################################################################
#      This file is part of OpenELEC - [url]http://www.openelec.tv[/url]
#      Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
#  OpenELEC is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 2 of the License, or
#  (at your option) any later version.
#
#  OpenELEC is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.
################################################################################

if [ -f /sys/class/rtc/rtc0/wakealarm ]; then
  logger -t setwakeup.sh "### Setting system wakeup time ###"
  echo 0 > /sys/class/rtc/rtc0/wakealarm
  echo $1 > /sys/class/rtc/rtc0/wakealarm
  logger -t setwakeup.sh "### $(cat /proc/driver/rtc) ###"
fi

For a test, I have a set recording schedule made for "The Price is Right", which is on CBS daily at 11:00am (EST) M-F. When I'm home from work some days, I have watched to see if the server wakes up for the recording. I've had the schedule set for a month, and to date there have only been maybe 3 recordings. I know the show is on, and Kodi shows the timers are enabled and then missed, with an error like "NextPVR backend was not available". Well duh, you never woke the server up!

Is there some trick I need to do to make this work? I suppose I could go in on the server and manually create a wake up timer to have the system be on from 11:00am-12:00pm every day. But that defeats the purpose. Shouldn't this all work automatically? Looking for any help or advice here, I'm completely lost.

Thanks!
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#2
2018-07-01, 10:29 AM
hansolo77 Wrote:I've been missing a lot of recordings due to (I believe) a problem with the addon not waking the server to record a show.

Client software does not wake the server to record a show ... Not the NextPVR client nor Kodi nor any other client.

Recordings are initiated by the NextPVR Recording Service that runs continuously on the server. The NextPVR Recording Service sends wake up notices to Windows for all scheduled recordings and Windows should wake the machine a few minutes before the recording is scheduled to start.

The NextPVR logs should contain messages confirming the wake-up requests sent from NextPVR to Windows ... Examine nrecord.log to find the messages. It appears that your problem is with Windows failing to wake the server.
hansolo77
Offline

Junior Member

Posts: 37
Threads: 8
Joined: Nov 2015
#3
2018-07-01, 03:01 PM
Thank you. After posting my question, I added a manual recording to something a few hours out. That way it would allow the server to go back into standby. When I woke up this morning to check, my Kodi did show a new recording was present (although I had to reboot before it found it). However, when I tried to play it, it said it was 4 hours long (the show it recorded was only 30 minutes). I couldn't navigate in the stream. So I think the recording was corrupted or something. I checked the file on the computer, and it was only like 168mb. Definitely not the size it should be if it was 4 hours. The next thing I did was checked the nrecord.log. I can see where it woke the server up, tuned the channel, and started recording. I don't see anything in the log to indicate the recording was completed. Is it supposed to do that?

I saw something else in the log that had me thinking. It's checking for a "wakeup.bat" file. At first I thought this was something I had a created, but I found no indication in the NPVR settings pointing to it. I figured maybe it was something I had written to keep the server awake when it was recording. I looked it up online and found the WIKI entry about it. I have a set of bat files I use to keep the server awake when it's working. It essentially moves a file to a folder that another program (LightsOut) is monitoring. If the file exists, it stays awake. Another bat file moves that file back out of that folder, and the server shuts down. I created a new bat file in the /scripts folder, called it "wakeup.bat" and essentially copied the prexisting materials from my other files into it. I will see if this solves the problem of an incomplete recording. I also noticed it has a WIKI entry for other batch files. Upon further examination of the nrecord.log, it also showed my computer had woke up to perform the EPG update. It too checked for the existence of the "wakeup.bat" file. This had me concerned, as there is no recording taking place, and thus nothing to trigger the move of the file out of the watched path for the server to resume standby. So I renamed the file to the "ParallelProcessing" one, that way it only moves that file during recording. I will test this later today on another recording.

I realize this is just one occurrence, but it is typical of a lot of recordings I have. Where it should only be 30 minutes, but instead is 4 hours long. I've had other recordings that should be an hour long, and the recording is only 10 minutes. I definitely feel like the whole wakeup/sleep bits are where I'm having difficulties. Maybe the wakeup part is working right, but it's not staying awake to complete the job, thus creating corrupted recordings.
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#4
2018-07-01, 04:41 PM
hansolo77 Wrote:It's checking for a "wakeup.bat" file.

The wakeup.bat is entirely optional. The NextPVR Recording Service knows when the computer has emerged from a sleep state and runs wakeup.bat if wakeup.bat exists. Batch files that are run by NextPVR are running in the same context as the NextPVR Recording Service. For example, batch files run under the "System" user account and are running in a system folder.

The NextPVR Recording Service sends all of the required messages to Windows to wake the computer for a recording and to keep the computer awake until the recording has finished. NextPVR should not require any additional batch files or other actions to wake the computer or to keep the computer awake. However, it is rare for the NextPVR Recording service to run on Windows Server (though there are other folk that are doing this with success). There may be something in your setup that is spoiling the wake and stay-awake process.

What is the "idle time" threshold before your server goes to sleep?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#5
2018-07-01, 05:30 PM
Your best bet is probably to supply the logs showing your test, so we can see what happened, so we can see what time the machine tried to record etc.

Basically - when you schedule a recording, NextPVR asks Windows to be awake at that time. These requests a logged in the nrecord.log.

While recording, NextPVR continually tells Windows that the machine is still in use, so that it doesn't fall back to sleep due to inactivity. (a user can still force it into standby)

When NextPVR notices your machine waking from standby, it'll run a wakeup.bat if you've created one. A user might create one of these files if they want to hookup some of their own custom logic.
hansolo77
Offline

Junior Member

Posts: 37
Threads: 8
Joined: Nov 2015
#6
2018-07-01, 10:38 PM
I think my batch file fix might be working. I set up 3 different recordings throughout the day, and made sure I wasn't using the server so it would do it's thing on it's own. All 3 recordings came back working perfectly. And according to the nrecord.log, it did execute the batches. I still wan to test and make sure, so I'm going to watch it again overnight and during the day tomorrow with various random recordings.

Something else that I just thought of... maybe the scheduled recording tasks are corrupted somehow. I will erase all my "timers" and recreate them. Maybe that will help. I know that some time in April (?) Spectrum disabled their analog TV-Ready capabilities and went completely digital requiring a set top box. When I figured out that was why I couldn't watch 90% of my channels, I've rebuilt my channel list to be only what I can receive OTA. Many of my timers were set up with specific channels, using the cable service provider. I think I need to go back and fix that now.

Thanks for your help though guys. I hate using a forum as a means to solve issues. This is a utility that just works all the time. When it DOESN'T, you barely remember how you set it up and use it. So troubleshooting is difficult. I'm glad you guys are cool enough to support users like me. And I'm always thankful for a service such as NextPVR existing.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#7
2018-07-01, 10:46 PM
Cheers.

If your problems return, post the logs and we'll help diagnose the problem for you, and hopefully come up with a solution.
hansolo77
Offline

Junior Member

Posts: 37
Threads: 8
Joined: Nov 2015
#8
2018-07-01, 11:05 PM
I've set up a few manual recordings here in the next couple of hours. I also recreated my other timers to record on channels I have now. I'll post logs and report back what the results are. I've also stopped the recording service, deleted the log, restarted the service, then reboot the server for good measure. So I should have a good clean log if something get's borked.
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#9
2018-07-02, 07:57 AM
if you run powercfg /waketimers in a dosbox it should show when windows has been told to wake up.
Depending on if you see any listed or not will decide whether it is a windows or npvr problem.
hansolo77
Offline

Junior Member

Posts: 37
Threads: 8
Joined: Nov 2015
#10
2018-07-02, 09:59 PM
I need to continue to observe, but I've got good feelings about setting up the batches to run during and after. I'm curious though if there is a way to execute these during a LIVE TV watching, not just recording. I've looked at the log during a LIVE process, and it's not triggering any "ParallelProcressing" file. Makes sense, as that was done for people to run a script like cutting commercials. Maybe something to add to a future version of the software?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Missing EPG guide data for one channel (clients only) Kurosh 10 1,275 2025-02-23, 11:07 AM
Last Post: Kurosh
  Kodo plugin seems to be shutting down backend Allan 4 666 2024-12-20, 11:04 PM
Last Post: Allan
  Import recordings from Humax FVP-5000T ceejayemm 2 858 2024-05-12, 07:44 AM
Last Post: ceejayemm
  Recordings Disappear and Reappear boukmandutty 8 1,134 2024-04-22, 01:38 PM
Last Post: boukmandutty
  Kodi Omega NextPVR Recordings short press context menu (More... item) mmortal03 5 1,183 2024-04-18, 11:19 PM
Last Post: mmortal03
  NextPVR latest version went missing. Ericktreetops 2 868 2023-08-10, 12:43 PM
Last Post: mvallevand
Question Kodi 19.4 not seeing NextPVR v4 Recordings Aussie 3 1,366 2022-07-28, 02:37 PM
Last Post: mvallevand
  Kodi not playing older recordings bobster151 10 2,468 2022-06-28, 10:18 PM
Last Post: mvallevand
  When running Kodi, new recordings not showing up jorrenb 53 12,161 2022-05-18, 12:52 AM
Last Post: mvallevand
  Recordings with Schedules Direct data don't show title? Caesium 4 1,670 2022-02-20, 09:48 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode