Linux - [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend

  Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #31
(2012-06-11 13:43)Claudio.Meldini Wrote:  
Code:
File "/home/adone/.xbmc/addons/script.program.pvrmanager/default.py", line 196, in getSysState
epgTime = curTime + datetime.timedelta(days=int(curTime.strftime('%j')) % int(__epg_interval__))
ZeroDivisionError: integer division or modulo by zero

Now i set 6 days on interval, but i'd like to set 0 days, can you tell me how resolve this error?
Have you also this error if you set 0 days?
thanks in advance.

I've not tested yet if interval ist set to 0. There's division by zero indeed if interval is set to "off".
I'll fix this and upload a new version this evening.

Thank you for your response.

_BJ1
(This post was last modified: 2012-06-11 17:06 by _BJ1.)
find quote
Claudio.Meldini Offline
Junior Member
Posts: 4
Joined: Apr 2012
Reputation: 0
Post: #32
Sorry, i wrote "0 days" but there is no option for "0 days" (my memory doesn't work...).
The option is "off".

Thanks for now, i'll wait new version!
find quote
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #33
(2012-06-11 17:58)Claudio.Meldini Wrote:  Sorry, i wrote "0 days" but there is no option for "0 days" (my memory doesn't work...).
The option is "off".

Yes, the option "off" returns "0" as value and this reacts as a division by zero, so you are correct Wink
I have fixed this. Download it from post #1, it's uptodate now.

_BJ1
(This post was last modified: 2012-06-11 23:50 by _BJ1.)
find quote
Claudio.Meldini Offline
Junior Member
Posts: 4
Joined: Apr 2012
Reputation: 0
Post: #34
Now it works!!!!
thank you!
and the popup with next recording (on power off) is nice, you could rename this version to 0.1.6 Big Grin
find quote
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #35
(2012-06-10 23:34)mastix Wrote:  It keeps displaying the 401 message... for some reason that I don't understand.

What version of tvheadend do you use? My is "2.99.16.g0e3bb" (from Webinterface -> about) on two machines here - self compiled.
(This post was last modified: 2012-06-14 19:54 by _BJ1.)
find quote
mastix Offline
Junior Member
Posts: 24
Joined: May 2012
Reputation: 0
Post: #36
Hi,

I'm using a self-compiled version as well... I'm always on the latest greatest...

Currently: HTS Tvheadend 2.99.44.g4ef72

Greetz,

Sascha
find quote
bilbonvidia Offline
Fan
Posts: 516
Joined: Jun 2011
Reputation: 2
Location: Great Britain
Post: #37
Thanks for this plugin I am currently testing it.

Can I get the machine to suspend instead of shutdown, does that involve changing the script?

I am having a slight issue for which I have posted another thread here:
http://forum.xbmc.org/showthread.php?tid=137207

xbmc hanging when coming back on
16:10:51 T:3006838592 ERROR: Create - Error( Connection timed out )
16:10:51 T:3006838592 ERROR: Create - Error creating /home/billy/.xbmc/userdata/Thumbnails/generated/4
find quote
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #38
(2012-07-30 17:43)bilbonvidia Wrote:  Can I get the machine to suspend instead of shutdown, does that involve changing the script?

A quick'n dirty solution could change the shellscript for shutdown of the addon (~/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh).
Just replace the last line

Code:
/sbin/shutdown -h now "PVRManager shutdown the system"

with:

Code:
/usr/sbin/pm-suspend && echo "PVRManager suspends the system"

Be aware that I have not this tested yet!
find quote
bilbonvidia Offline
Fan
Posts: 516
Joined: Jun 2011
Reputation: 2
Location: Great Britain
Post: #39
Thanks, but tvheadend itself seems to stop the system from suspending I seems to have to stop tvheadend for it to suspend properly. This is what happens when not using the addon aswell.

I would somehow have to tvheadend stop before issuing the pm-suspend then start it again after the resume I think.

Its not a big issue, the shutdown and resume from shutdown works great!
find quote
bilbonvidia Offline
Fan
Posts: 516
Joined: Jun 2011
Reputation: 2
Location: Great Britain
Post: #40
I need to do more testing but when the computer wakes itself during the night to record it does record but xbmc crashes and he computer is still on.

I think this is to do with the fact I have a shared mysql library for films and music on a separate pc which is switched off at night time. Under normal circumstances I think xbmc eventually falls back to local databases.and contunues to function.

Could the adddon be causing the crash, if so is there a way around it by setting a delay or something?
find quote
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #41
The addon could'nt cause the Crash. If xbmc crashes, the addon will die too. In this case control over powermanagement is lost and the pc is still powered on. Because xbmc and tvheadend are independent from each other, tvheadend will still do his job even when xbmc has crashed.
find quote
bilbonvidia Offline
Fan
Posts: 516
Joined: Jun 2011
Reputation: 2
Location: Great Britain
Post: #42
Thanks yes realised what it was. I have created a startup script to wake up mysql / media server so this doesn't happen again. (Rather than leave it on all the time)
find quote
esofron Offline
Junior Member
Posts: 5
Joined: Feb 2011
Reputation: 0
Post: #43
Hello,

i am getting the following to the log file,


23.08.2012 14:44:53: PVR Manager: ERROR: <urlopen error [Errno -2] Name or service not known>
23.08.2012 14:44:53: PVR Manager: found PIDFile with ID 1442 but should be 1474, XBMC probably crashed
23.08.2012 14:44:53: PVR Manager: service finished

any idea? thanks.
find quote
_BJ1 Offline
Senior Member
Posts: 237
Joined: Apr 2010
Reputation: 6
Location: Germany
Post: #44
The addon could'nt find the status.xml. Please check your settings. If tvheadend runs on the same machine, verify it with the screenshots posted (see links in Post #1).

If tvheadend runs on another machine, the tvheadend URL must be: http://ip.of.your.server:9981/status.xml
(This post was last modified: 2012-08-23 16:36 by _BJ1.)
find quote
esofron Offline
Junior Member
Posts: 5
Joined: Feb 2011
Reputation: 0
Post: #45
Ok it is on the same machine, but it looks like the xbmc crashes & reloads again as i am getting the following

23.08.2012 18:36:36: PVR Manager: found PIDFile with ID 1495 but should be 1519, XBMC probably crashed
23.08.2012 18:36:56: PVR Manager: Service still active, monitoring PWR/OTHER: no/no

also i have changed the url in the configuration from localhost to the ip of the xbmc.

how can i extend test it to see it works again?

thanks.
find quote
Post Reply