Kodi 17 - StopPVRManager / StartPVRManager

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tarmacalastair Offline
Junior Member
Posts: 4
Joined: Feb 2017
Reputation: 0
Post: #1
Hi,
Have loved the MythTv addon for Kodi and been using it for some time.

My OSMC install on a Pi 3 has recently auto upgraded from 16 to 17.1 and now the Start and Stop PVRManager functions don't work. I was using:

Code:
xbmc-send --action="StopPVRManager"

I used to ssh to my Pi from my phone and start or stop the MythTv plugin to allow the backend to shut down as it's only switched on when in use or when recording. I also have a crontab to stop the PVR at night as the Pi does other jobs so is left on. (I found that if I disabled the setting in the addon to allow the backend to shut down then it would shut down in the middle of playback)

Can you advise if there is another way to disable and enable the addon from the command line please or if the above command can be made to work somehow? It still works on my other pi and Ubuntu installs that are both still on Kodi 16.

Thanks,
Al
find quote
trogggy Online
Posting Freak
Posts: 2,706
Joined: Mar 2011
Reputation: 128
Location: Monthou sur Cher, France
Post: #2
I use a couple of little scripts to enable / disable dvbviewer.
The default.py for disabling is simply:
Code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#import xbmc,xbmcgui,xbmcplugin
import xbmc

xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","id":8,"params":{"addonid":"pvr.dvbviewer","enabled":false}}')
Change the addonid to mythtv, add an addon.xml, zip it up and install - make another with enabled:true and do likewise.
Then use
Code:
xbmc-send --action="RunScript(script.whatever)"
That - or something like it - should work. I switched from using start / stop pvrmanager when I moved to krypton.
I don't do the last part though - I enable via the gui - so the command may not be exactly right RunScript is a built-in function though, so it should work.
find quote
janbar Offline
Posting Freak
Posts: 901
Joined: Sep 2012
Reputation: 49
Location: France
Post: #3
The addon pvr.mythtv allows the backend to shutdown when kodi activates its screen saver even blocking is enabled.
find quote
tarmacalastair Offline
Junior Member
Posts: 4
Joined: Feb 2017
Reputation: 0
Post: #4
Janbar, thanks, that is fantastic. I had my screensaver turned off. I've now enabled it and sure enough, the message in Mythwelcome now changes from MythTV is idle to MythTV is idle and will shut down in x seconds. After x seconds the backend does indeed shut down.

Trogggy, thanks for the pointers. Sadly you lost me after the first line!

It looks like the StartPVRManager might control the whole PVR environment, not just the MythTV one so apologies if I've posted in the wrong place. In Kodi 16 there is a menu item: System->Settings->TV->General and then an "Enabled" option. This has disappeared in Kodi 17.

I'd still like to disable the PVR Manager from time to time so if anyone has any ideas please share.

Thanks.
find quote
tarmacalastair Offline
Junior Member
Posts: 4
Joined: Feb 2017
Reputation: 0
Post: #5
Oh dear, now I've followed Janbar's advice and left the pvr.mythtv addon enabled, but I now get this problem:

Every time I power up my kodi box (it reboots every day at 0200) it notices that the backend it not available and says, No response from MythTV backend. Do you want to retry? If I say no, because I know the backend is down, then, when I do want to use the add-on later I have to go through all the Add-ons Settings, navigate all the way to MythTV, disable it and then enable it again. Sometimes the Pi freezes at this point and I have to pull the plug to start it up again.

I have tried changing the Disable "Connection lost" warnings setting but it still happens.

It would be really useful to be able to enable and disable the addon via SSH then I could get my wife/family to simply click a button on their phones to turn it on or off as needed.

Can anyone help without having to resort to python, etc?

Thanks.
find quote
dbowles1975 Offline
Junior Member
Posts: 7
Joined: Nov 2015
Reputation: 0
Post: #6
(2017-03-20 18:57)tarmacalastair Wrote:  Hi,
Have loved the MythTv addon for Kodi and been using it for some time.

My OSMC install on a Pi 3 has recently auto upgraded from 16 to 17.1 and now the Start and Stop PVRManager functions don't work. I was using:

Code:
xbmc-send --action="StopPVRManager"

I used to ssh to my Pi from my phone and start or stop the MythTv plugin to allow the backend to shut down as it's only switched on when in use or when recording. I also have a crontab to stop the PVR at night as the Pi does other jobs so is left on. (I found that if I disabled the setting in the addon to allow the backend to shut down then it would shut down in the middle of playback)

Can you advise if there is another way to disable and enable the addon from the command line please or if the above command can be made to work somehow? It still works on my other pi and Ubuntu installs that are both still on Kodi 16.

Thanks,
Al
Try this:

1. Create a menu shortcut then select "change action" - "custom item" and use StopPVRManager as the function. Name it however you want.
2. Create a menu shortcut then select "change action" - "custom item" and use StartPVRManager as the function. Name it however you want.

You can't restart the PVR without stopping it first so If you click the first shortcut and wait a few seconds then click the second shortcut it will restart the PVR. I can't confirm this works in Krypton but it should.
find quote
trogggy Online
Posting Freak
Posts: 2,706
Joined: Mar 2011
Reputation: 128
Location: Monthou sur Cher, France
Post: #7
(2017-04-28 01:57)dbowles1975 Wrote:  I can't confirm this works in Krypton but it should.
It doesn't. See above.
find quote
hdhdhdhdhd511 Offline
Junior Member
Posts: 2
Joined: Nov 2016
Reputation: 0
Post: #8
(2017-03-20 18:57)tarmacalastair Wrote:  Hi,
Have loved the MythTv addon for Kodi and been using it for some time.

My OSMC install on a Pi 3 has recently auto upgraded from 16 to 17.1 and now the Start and Stop PVRManager functions don't work. I was using:

Code:
xbmc-send --action="StopPVRManager"

I used to ssh to my Pi from my phone and start or stop the MythTv plugin to allow the backend to shut down as it's only switched on when in use or when recording. I also have a crontab to stop the PVR at night as the Pi does other jobs so is left on. (I found that if I disabled the setting in the addon to allow the backend to shut down then it would shut down in the middle of playback)

Can you advise if there is another way to disable and enable the addon from the command line please or if the above command can be made to work somehow? It still works on my other pi and Ubuntu installs that are both still on Kodi 16.

Thanks,
Al






Sent from my iPod touch (typie typie)
find quote
teeedubb Offline
Donor
Posts: 3,372
Joined: Mar 2010
Reputation: 97
Location: Down Under
Post: #9
Code:
curl -s -H "Content-Type: application/json" -v -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": { "addonid": "pvr.mythtv", "enabled": true }, "id": 1}' http://localhost:9191/jsonrpc

curl -s -H "Content-Type: application/json" -v -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": { "addonid": "pvr.mythtv", "enabled": false }, "id": 1}' http://localhost:9191/jsonrpc

You need to update the ip address + port to suit.Only downside I found was that kodi is prone to crashing when disabling/enabling the pvr addon.
(This post was last modified: 2017-05-01 16:01 by teeedubb.)
find quote
tarmacalastair Offline
Junior Member
Posts: 4
Joined: Feb 2017
Reputation: 0
Post: #10
Thanks teeedubb. This does seem to work but also seems to hang kodi pretty much every time for me.

As a long-winded way of getting it to work I can run your command and then restart Kodi using sudo systemctl restart mediacenter

Any idea if there's a way of issuing the equivalent of StopPVRManager with the curl/json method? (StopPVRManager used to disable the whole PVR subsystem without having to target specific addon(s).

dbowles1975 - thanks for the suggestions. I can't work out how to create a shortcut though - I'm using the Confluence skin.
find quote
teeedubb Offline
Donor
Posts: 3,372
Joined: Mar 2010
Reputation: 97
Location: Down Under
Post: #11
From what I could gather, Stop/StartPVRManager has been removed from newer kodi releases.
find quote