Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails to load if sat receiver is powered on after Kodi start #154

Closed
heikoh81 opened this issue Dec 23, 2018 · 65 comments
Closed

Plugin fails to load if sat receiver is powered on after Kodi start #154

heikoh81 opened this issue Dec 23, 2018 · 65 comments
Labels

Comments

@heikoh81
Copy link

heikoh81 commented Dec 23, 2018

Hi there,

if I start my VUSolo 2 minutes before Kodi starts on my FireTVStick2, everything works fine.
Channel list is loaded (and also recordings, but I don't need recordings).

However, if my Kodi is already running and I start my VUSolo now, Kodi/Enigma2 wil never load channels.
I can see "PVR Manager is starting up, stuck at 0%".
I then have to restart KODI in order to see the channel list.

This has been a bug for several Kodi versions (I'm currently using Kodi 18 RC3).
Before Kodi RC3 the plugin was called VUSolo, but now it seems to be renamed to "Enigma2".
But I remember that a few versions back (maybe Kodi 14 or 15?) I was able to start my VUSolo after Kodi start, and channel list was loaded afterwards.

I hope this can be fixed soon,
best regards,

Heiko

@phunkyfish
Copy link
Member

The name change was just so it’s clear it’s not specifically for VU hardware.

I’ve confirmed the same issue on Libreelec. @ksooo any ideas here? I also remember this working before but I hardly ever restart my devices so didn’t notice.

@heikoh81
Copy link
Author

Thanks for acknowledging the bug.
Also, at most times, my sat receiver VUSolo is in deepstandby.
If I now start Kodi, I get this popup:
"Add-on couldn't be loaded. An unknown error has occured."
==> I think that no popup should be shown at all, or at least, the possiblity to disable this warning in settings.

Merry Christmas!

@phunkyfish
Copy link
Member

phunkyfish commented Dec 24, 2018 via email

@phunkyfish
Copy link
Member

phunkyfish commented Dec 24, 2018

Actually on second thought I don’t think this will be possible. The error message is what kodi returns because the addon failed to load.

Kodi needs to know the current state of the addon to attempt to reload later (assuming the initial bug is fixed). The behaviour would need to change for all PVR addons not just this one. For the majority of PVR users an error dialog if the addon failed to load would be in line with expectations.

@heikoh81
Copy link
Author

I could live with the popup, as long as Enigma2-Plugin resumes operation after my VUSolo hat booted up.
The plugin could check, e.g. once every minute (depending how much CPU load this check produces), if the box is available now.

@phunkyfish
Copy link
Member

The default behaviour should be start up the addon when accessing TV or Radio (if it wasn’t started on boot).

This wouldn’t be the addon handling this it would be the main pvr functionality in Kodi.

@phunkyfish
Copy link
Member

phunkyfish commented Jan 1, 2019

@sidey79 let's continue any further conversation in this issue.

@sidey79 Pasted from #142

Okay i'm on a different setup but the main problem is, that the pvr addon is loaded only at startup of kodi and not later when the receiver becomes active.

Log: https://gist.github.com/phunkyfish/1edb3d316574c4304b1b7081ea1348a6

I think, there is now sceduled job, which retries later to ininitalize the module:

Open It seem's that the webinterface cannot be reached. Make sure that you set the correct configuration options in the addon settings!

Does this URL return a response in a browser?: http://et9x00/web/deviceinfo
If the receiver isn't powered this can't get an response, but if it's powered on it returns data.

@phunkyfish
Copy link
Member

Kodi will try to start the addon each time you try to access PVR UI. It's not working though which is what we need to figure out.

Remember that when being used with kodi your Enigma2 box is essentially a server which should be running all the time which is the easiest fix and requires zero code changes ;)

@phunkyfish
Copy link
Member

phunkyfish commented Jan 1, 2019

@sidey79 pasted from #142:

Kodi will try to start the addon each time you try to access PVR UI. It's not working though which is what we need to figure out.

When i access the UI i get always this (tried serval times)

18:54:29.576 T:4087530272   DEBUG: HandleKey: 11 (0x0b, obc244) pressed, action is Select
18:54:29.576 T:4087530272   DEBUG: Activating window ID: 10701
18:54:29.689 T:3826377584   DEBUG: PushCecKeypress - received key  b duration 122
18:54:29.894 T:4087530272   DEBUG: ------ Window Deinit (Home.xml) ------
18:54:29.895 T:4087530272   DEBUG: FreeVisualisation() done
18:54:29.896 T:4087530272   DEBUG: ------ Window Init (MyPVRRecordings.xml) ------
18:54:29.896 T:4087530272    INFO: Loading skin file: MyPVRRecordings.xml, load type: KEEP_IN_MEMORY
18:54:29.955 T:4087530272   DEBUG: CDirectoryProvider[]: refreshing..
18:54:29.955 T:3975332720   ERROR: GetDirectory - Error getting
18:54:29.967 T:4087530272   DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------

Remember that when being used with kodi your Enigma2 box is essentially a server which should be running all the time which is the easiest fix and requires zero code changes ;)

This is not an option for me, and maybe also not for others.

@phunkyfish
Copy link
Member

Yes, I see the same, I just don't know why it's not trying to start the addon again.

I was kidding with the workaround. It's required functionality, any server can be down for a time, kodi should be able to recover if it's not available on start.

@heikoh81
Copy link
Author

heikoh81 commented Jan 1, 2019

Happy New Year :-)

I prefer to have my VUSolo in DeepStandby most of the time.
Reason: In normal Standby-mode, the tuner of the VUSolo is "on". This way, my SAT-Multiswitch (Kathrein) also cannot enter its powersave state. And so, the LNB would be powered all the time (-> decreased lifetime?)

@phunkyfish
Copy link
Member

Makes sense, will dig into this further after the holiday.

@M2k80
Copy link

M2k80 commented Jan 2, 2019

that the tuner is used in standby is normal for enigma2.
i have often read, that its best for streaming to set the box to standby, because only here no tuner get blocked from direct tv watching.

@phunkyfish
Copy link
Member

phunkyfish commented Jan 2, 2019 via email

@phunkyfish
Copy link
Member

@ksooo is it true that if the addon fails to start on boot of kodi it should try to start again if TV or Radio are accessed in the UI?

When this happens the UI says PVR Manager starting but nothing happens.

@phunkyfish
Copy link
Member

Ok, I can’t find anyway to get the addon to start after an initial fail.

It will only restart if it successfully loaded and an addon setting is changed that requires a restart.

@ksooo is this a known issue or would you like an issue created for it?

@bservet
Copy link

bservet commented Jan 24, 2019

I'd also love to see a fix for this (VU DUO2)... is there any chance of fixing this in the plugin or does the Kodi PVR code needs to be changed? Is that the scheduled job which tries to restart the plugin?

If the frequencies of that job could be changed AND the error message about loading the module could be suppressed it might provide a quick & dirty solution until a better method is found.

Thanks!

@phunkyfish
Copy link
Member

Could you post a debug log showing the behaviour, I.e. not starting up once your device is switched on?

I can then create a kodi bug based on that.

@bservet
Copy link

bservet commented Jan 25, 2019

I was surprised too see that I couldn't reproduce the problem (yet). However, according to Kodi I'm still running an old version, 2.4.10. I guess that the new version isn't available because I'm still running Kodi 17 and all your commits are for v18? Thanks!

@phunkyfish
Copy link
Member

phunkyfish commented Jan 25, 2019

That’s correct. I believe the issue is on kodi 18 ;)

@bservet
Copy link

bservet commented Jan 25, 2019

Well, it happened to me on 17 as well but I'd be happy to test the new version when V18 is finally released. Must be really soon now... :)

@phunkyfish
Copy link
Member

phunkyfish commented Jan 31, 2019

This is actually a missing feature in the addon, which is good as it's something I can remedy. Will try to have a look at this weekend. More details in the xbmc github linked issue above.

@phunkyfish
Copy link
Member

Ok, this is next up, I expect to have something in testbuilds in the next couple of weeks.

@heikoh81
Copy link
Author

This is great news. If you have a testbuild, could you provide a link and a description how to install the testbuild? I'm glad to help testing.

Meanwhile, I have Kodi 18 RC4 on FireTVStick 2.
I have Enigma2 Client 3.16.2. There is an update for version 3.17,0 however on installing I get this message:
"The dependency on binary.kodi.global.main.version 1.0" (it stops scrolling so I can't post more"
-> is this message due the RC4?

Best regards,
Heiko

@phunkyfish
Copy link
Member

phunkyfish commented Feb 15, 2019 via email

@phunkyfish
Copy link
Member

@bservet could you provide instructions on how you have the addon set up? The full addon name etc. and config? Maybe I can mimic what it does and build it into this addon. That would be cool.

@phunkyfish
Copy link
Member

This is already available in the kodi C++ addon API. PVR still uses the C API but when it moves this would be possible.

#189

@phunkyfish
Copy link
Member

So for the moment the addon you are using should be the chosen solution.

@bservet
Copy link

bservet commented Feb 26, 2019

Maybe the PVR addon could automatically call this add-on when the PVR is in deep standby?

@phunkyfish
Copy link
Member

As the PVR addons are binary they are far more limited in what they can do as far as interacting with other addons go. Python addons have much more access to do things like this I’m afraid. Please post any further commentary or ideas in the new issue related to this topic #189. Thanks

@phunkyfish
Copy link
Member

@heikoh81 please test all your use cases and create a new issue if you find anything that doesn't work.

3.19.0 should be available in binary addon repos in the next 24 hours.

@heikoh81
Copy link
Author

heikoh81 commented Mar 6, 2019

Thanks for the update.
I received 3.19.0 via Auto-Update yesterday 7 pm Central European Time. (FireTV Stick 2).

The behaviour is as expected:
Enigma2 receiver is in deep standby and Kodi has already started up.
I power on the Enigma2 receiver and put it to standby.
Kodi detects that the receiver is available and I can start streaming TV channels.

BUT:
When not watching TV, but Video files, Kodi constantly keeps showing popup-messages now:
"Enigma2 Client: Connection Established"
"Enigma2 Client: Server is unreachable"
This is constantly switching every 5 minutes.
Additionally, after stopping video and going back to TV, I can't start streaming again.
I have to restart Kodi; I even have to kill Kodi in FireTV Stick2 settings as it hangs completely.

I hope you can fix these glitches.
Greetings,
Heiko

@phunkyfish
Copy link
Member

Hmmm, can you provide a full debug log. Let’s start with the pop ups first. Maybe run so the pop ups appear two times.

@heikoh81
Copy link
Author

heikoh81 commented Mar 6, 2019

Here you go:
kodi.log

If I open http://192.168.178.242/web/deviceinfo in my browser, I get.
<e2deviceinfo><e2oeversion>OpenVuplus 2.1</e2oeversion><e2enigmaversion>2015-08-07-vti-master</e2enigmaversion><e2distroversion>VTi</e2distroversion><e2imageversion>8.2.3.</e2imageversion><e2driverdate>3.9.6-r22-20150623-vti0</e2driverdate><e2webifversion>OWIF 0.4.7</e2webifversion><e2fpversion>0</e2fpversion><e2devicename>Solo</e2devicename><e2frontends><e2frontend><e2name>Tuner A</e2name><e2model>BCM7325 DVB-S2 NIM (internal) (DVB-S2)</e2model></e2frontend></e2frontends><e2network><e2interface><e2name>eth0</e2name><e2mac>00:1d:ec:06:dc:01</e2mac><e2dhcp>True</e2dhcp><e2ip>192.168.178.242</e2ip><e2gateway>192.168.178.1</e2gateway><e2netmask>255.255.254.0</e2netmask></e2interface></e2network><e2hdds> </e2hdds></e2deviceinfo>

If I open http://192.168.178.242/web/movielist?dirname=%2Fhdd%2Fmovie%2F:

web.Server Traceback (most recent call last):

<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/hdd/movie/:/'
/usr/lib/python2.7/site-packages/twisted/web/server.py, line 132 in process
130    try:
131      resrc = self.site.getResourceFor(self)
132      self.render(resrc)
133    except:
/usr/lib/python2.7/site-packages/twisted/web/server.py, line 167 in render
165    """
166    try:
167      body = resrc.render(self)
168    except UnsupportedMethod, e:
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/base.py, line 105 in render
103                                plfunc(request)
104
105                        data = func(request)
106                        if data is None:
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/web.py, line 310 in P_movielist
308                        dirname = request.args["dirname"][0]
309                self.isGZ=True
310                return getMovieList(dirname, tag, request.args)
311
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/models/movies.py, line 86 in getMovieList
84        root = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + directory)
85
86        bookmarklist=[x for x in listdir(directory) if (x[0] != '.' and (isdir(join(directory, x)) or (islink(join(directory, x)) and exists(join(directory, x)))))]
87        bookmarklist.sort()

<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/hdd/movie/:/'

@heikoh81
Copy link
Author

heikoh81 commented Mar 6, 2019

Let’s start with the pop ups first. Maybe run so the pop ups appear two times.

If the error occurs, the popus appear constantly every 5 seconds!
All connections are wired, and I had not any connection problems 2 days ago.

@phunkyfish
Copy link
Member

There must be a timing issue then it gets stuck in a loop. The recheck time must be too quick for the /deviceinfo call.

@phunkyfish
Copy link
Member

phunkyfish commented Mar 6, 2019

I think it’s crashing your E2 device :(

Can you try restarting the device when it won’t play back (leave kodi as it is) and see does it come back up?

@phunkyfish
Copy link
Member

And afraid that’s not a full debug log. Can you restart when in debug mode so I can see the log from a full startup including the issue. Thanks

@phunkyfish
Copy link
Member

You are also running a very old image on your E2 device. Is the device old?

@heikoh81
Copy link
Author

heikoh81 commented Mar 6, 2019

The device is a VU+ Solo, it is several years old and has limited CPU.
While streaming, I can merely open the WebIF.
However, up to now, it served very well for my SAT -> IP use scenario.
Later today I did not have the described problem any more.
I can only give you a full debug log tomorrow.

Can you maybe tune the timeout values a little bit for older receivers to be recognized.
This has not been a problem with older versions of the plugin.

@phunkyfish
Copy link
Member

There is some use case such as an EPG update causing a slowness in the check for a live connection. Or maybe it’s a number of different processes across the addon and the device all happening at the same time.

@phunkyfish
Copy link
Member

Can try tuning but the solution is probably to avoid the connection attempts while playing back, performing EPG updates etc. This is not a small amount of work though.

Can you downgrade easily in the meanwhile? After you get me that log of course 😉

@phunkyfish
Copy link
Member

Could you also create a new issue for this please when you supply a new log?

@heikoh81
Copy link
Author

heikoh81 commented Mar 7, 2019

Can try tuning but the solution is probably to avoid the connection attempts while playing back, performing EPG updates etc. This is not a small amount of work though.

Can you downgrade easily in the meanwhile? After you get me that log of course 😉

I remember that VUSolo-pvr-plugin that I used before Enigma2-plugin had the option to enable/disable EPG grabbing while streaming.
I always had this disabled due to the poor CPU of my Enigma2 box (VuSolo).

Also, I don't need EPG/recordings or any other information in Kodi.
I access recordings directly in the videos category as an SMB share.

So it would be create if you integrate options to disable all grabbing etc. at all if wanted (checkboxes in the plugin setting).

Can you downgrade easily in the meanwhile? After you get me that log of course 😉

How can I do that? I have the option to install plugin from zip within kodi?
Where can I get the old vesion for FireTV Stick 2?

Will provide the .log later.

@phunkyfish
Copy link
Member

How do you upgrade currently? I’m not familiar with android. As far as I’m aware there is an addon to manage updates. I would try that.

As I said it will take a while to get everything in place to run a for Low spec E2 device. Proabably another couple of weeks.

@heikoh81
Copy link
Author

heikoh81 commented Mar 7, 2019

How do you upgrade currently? I’m not familiar with android. As far as I’m aware there is an addon to manage updates. I would try that.

I install via Kodi repository, I did not change any default settings.
Got the new version via Auto-Update.

As I said it will take a while to get everything in place to run a for Low spec E2 device. Proabably another couple of weeks.

Ok, would be great if you integrate this.

I hope I can reprodruce the problem tonight, as I turned all checkboxes in 3.19.0 to off yesterday and the problem stopped.
But maybe because it was running for a while and everything was loaded from enigma2 receiver.

@phunkyfish
Copy link
Member

I install via Kodi repository, I did not change any default settings.
Got the new version via Auto-Update.

Ok, then go the repo and hit update and it should allow you to pick a previous version (hopefully it works like this on Android).

Ok, would be great if you integrate this.

I hope I can reprodruce the problem tonight, as I turned all checkboxes in 3.19.0 to off yesterday and the problem stopped.
But maybe because it was running for a while and everything was loaded from enigma2 receiver.

Which checkboxes did you turn to off? That might give us a clue as to what is causing this. If you no longer have problems when everything is off is that not the problem solved? Or are some of those features required by you?

@heikoh81
Copy link
Author

heikoh81 commented Mar 7, 2019

I have done more testing:
Booted up Enigma2 receiver, waited 2 Minutes.
Started Kodi on FireTV Stick2.
Channels are being loaded, streaming possible, no error messages.
I stopped streaming, started it again, switched channels, no error message.

Then I stopped watching live TV, changed to "Videos" and started a recording.
As soon as the playback of a SMB-Share-File is started, the error messages keep popping up.
They won't stop even if playback has been stopped again.
Starting live streaming is no longer possible,
I have to restart (even kill) Kodi.

As far as I can say, the problems start as soon as playback of normal Video files start.

I'm working on good logs, I cleaned outt my channel list to 20 channels so that logging is not too big.

@phunkyfish
Copy link
Member

phunkyfish commented Mar 7, 2019

I wonder is it network saturation. Are the video files you are playing big? Do you have large video buffers set in kodi (advancedsettings.xml)?

@phunkyfish
Copy link
Member

It would be good to know if this only happens during playback. If so a fix is much easier.

@heikoh81
Copy link
Author

heikoh81 commented Mar 7, 2019

I wonder is it network saturation. Are the video files you are playing big? Do you have large video buffers set in kodi (advancedsettings.xml)?

These are normal SD mpeg2-files, some HD files, all .ts-recordings.
The network situation is excellent, everything is wired, the FireTV Stick2 has an ethernet adapter attached, so 100 Mbit. No stuttering, no problems.

No special settings in advancedsettings.xml except my MySQL database for watched videos.

It would be good to know if this only happens during playback. If so a fix is much easier.

I can say for sure that it only happens during playback of my SMB Video files.
It does not happen during streaming of live TV.

@phunkyfish
Copy link
Member

If you playback the TS recordings via the addon what happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants