Kodi Community Forum

Full Version: VNSI client keeps VDR server awake
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I'm new to this forum. Have been fiddling around with Kodi for quite some time now, most stuff works... Now I set up a dedicated VDR-Box (Ubuntu based) as a headless server with a twin DVB-T receiver card and the VNSI-Server plugin. The first and at the moment only client is a Raspbmc. The Server is configured to shutdown after 30 mins of inactivity. Unfortunately it does not shut down at all. Netstat reveals there is an active connection from the (always running) Raspbmc box with the VNSI Kodi plugin, despite the fact that box is not streaming TV but doing nothing or something else than TV. I checked all the settings, raised the EPG update period to the max and activated powersaving, nothing helps. How do I prevent this connection to stay alive when not watching TV on My Kodi Box? Any hints appreciated.

Cheers

Tom
(2015-04-08, 10:45)TOMBN Wrote: [ -> ]...Unfortunately it does not shut down at all. Netstat reveals there is an active connection from the (always running) Raspbmc box with the VNSI Kodi plugin, despite the fact that box is not streaming TV but doing nothing or something else than TV. I checked all the settings, raised the EPG update period to the max and activated powersaving, nothing helps. How do I prevent this connection to stay alive when not watching TV on My Kodi Box? Any hints appreciated.
Are you using a special vdr-distribution or did you build your ubuntu-vdr-box by yourself? Some vdr-distributions (like yaVDR) have a suppression of the auto-shutdown-feature from vdr, if something like a xbmc-/kodi-connection, samba- or nfs-share, ssh-connction and such things are active. So maybe your problem is a feature, and it is located at the VDR.

cheers, jennix
Hi
I've the same configuration (headless server, yaVDR and Raspi) and the same problem.

My TV and Kodi are talking by CEC, so Kodi should be aware when the TV is off (I hope Huh ). But also then Kodi sends "something" which keeps the vdr alive; It would be great if somebody could give a short explanation about the mechanism behind and if there is any way inside Kodi to identify the switched-off TV and to stop sending vdr-keep-alive messages.

Actual I always have to shutdown the raspi per tv remote control first and then next time to climb behind the cupboard to re-boot the raspi, which actual has a very low Womans Acceptance Factor, which jeopardizes the whole project Tongue

Cheers
Steffen
Kodi can't detect a powered off TV and if it could it still won't know whether it is supposed to keep running of not. It is common behaviour that a server (vdr) won't shut down as long as clients are connected.
You always can force a powerdown of your vdr server if you like by i.e. writing a little script for this.
Hello FernetMenta

thanks for your answers, it gives me the confidence that I've nothing overseen in the manual.

(2015-05-09, 15:45)FernetMenta Wrote: [ -> ]Kodi can't detect a powered off TV and if it could it still won't know whether it is supposed to keep running of not.
That's why I'm said Kodi and the TV are talking to each other by CEC (remote control via HDMI connection). When looking into the CEC settings ("System/Settings/Input Devices" CEC adaptor), there's one setting "When TV is switched off, then Ignore/Shutdown/standby": I've just set that to "Shutdown", and straight after turning the TV off, Kodi shutted down instantly, and a few minutes later the server followed to switch off.

That indicates to me that Kodi is aware about the TV status as such.

Then as next I changed the "When TV is switched off" to "Standby". But when now switching off the TV, I can still see in WireShark, that there's still a lot of communication ongoing on port 34890, which is, as it looks, the EPG data exchange of the VNSI Plugin.

But I don't know the internal mechanisms in Kodi, so I don't know what a standby mode means for Kodi, and if the plugins are anyhow informed about such a mode change, and why VNSI is still trying to update the EPG data in a standby mode.

But while playing with the settings, I saw the name of the author of the VNSI plugin, and it looks that I've found by luck the perfect person to talk to Blush


(2015-05-09, 15:45)FernetMenta Wrote: [ -> ]It is common behaviour that a server (vdr) won't shut down as long as clients are connected.
You always can force a powerdown of your vdr server if you like by i.e. writing a little script for this.

the server-keep-alive and also any forced shutdowns would work (keep alive is quite obviously working fine, but for a forced shutdown I would need to clearly identify from the server side that the server is actual not needed)

OT: I've just made a forced server shutdown and see now Kodi searching for the server IP once a second, but no WoL is coming to restart the server - it that correct?

Basically I think if the VNSI would not request some data anymore during a Kodi standby, that would make the server switching off. But I've no idea if the plugin is able to identify a kodi standby mode at all.

What's your perspective on this?

best regards
Steffen
Quote:Basically I think if the VNSI would not request some data anymore during a Kodi standby, that would make the server switching off. But I've no idea if the plugin is able to identify a kodi standby mode at all.

The VNSI addon does not request any data by itself. Either PVR polls through VNSI or the vnsiserver plugin sends updates when on EPG changes. I am not familiar with CEC but that seems a weirs kind of a standby. Do you know what exactly goes standby? If kodi goes standby it should stop PVR manager and VNSI addon which would close the socket to the server.
Ok, I understand

so I assume it's then the PVR manager who keeps the server connection alive. I'll have a look into and try to figure out more details.

I'll be back :-)

best regards
Steffen
I don't see a problem with pvr manager. can you post a debug log including this cec standby mode?
Hi FernetMenta
sorry for the late answer, I missed your reply..

Here you can see a log:
http://xbmclogs.com/pb7rhr93b#line-5051

This is the results of a few trials (with logging complete on, so no component specific logging only). To my surprise I couldn't found anything in the log which sounds like standby, so finally I used the system time to reference to: I switched the TV at 18:37:00 and turned it on again 30 secs later. I can't see anything obvious at that time in the log, unfortunately, and if I would not know that Kodi shuts down nicely when configuring that for "TV off", I would say that there is no reaction on the TV state, but it is (anywhere..)

I'll try now the same with component specific logging to see if anything happens in the CEC- Adaptor, and maybe I can make also a log out of a TV off shutdown..

to be continued..
Now I found it in the CEC debug messages:

In
http://xbmclogs.com/p4jydtrz9#line-3723
and
http://xbmclogs.com/p4jydtrz9#line-6434

I can see the on/off message from the TV. But I can't see any reaction on that in the rest of the log..?
Hi

now I made the test what happens if the CEC setting is set to "Shutdown when TV goes off"

The result can be found here:

http://xbmclogs.com/ptfucpwer#line-4946

As shown, Kodi nicely shuts down when I switch the TV off, which means the TV state is monitored and handled by Kodi- somehow...

But who knows what should happen when Kodi is set into this mysterious "standby" mode, and how this could stop the PVR- Manager from keeping the remote vdr server awake?

Any ideas?

Cheers
Steffen
I would ask this question in the generic pvr or pi section of the forum. I am not familiar with cec and don't even know if the pi has a standby mode. If you get an answer it would be nice to link it to this thread
I think I have seen in the code that Kodi asks the PVR add-on every 10 secs for the amount of used/free disk space on the associated PVR server. If the add-on does not cache something, this clearly would keep the server alive. Unfortunately, the "periodically query disk space feature" cannot be activated, as far as I know.
Regarding CEC and Kodi standby: yes, Kodi knows about TV being switched off. If Kodi goes to standby this means the program is no longer running actively, thus if Kodi is actually in standby (suspend to RAM, that is), there cannot be any network traffic produced by Kodi! This makes me think that going to standby seems not to work (for you guys).

Imo, this is the root cause of the problem for the server not going down: Kodi is actually not going to standby when it is supposed to do so.
Hello Ksooo

please find my answers here: http://forum.kodi.tv/showthread.php?tid=...pid2003766