Jump to content

EmbyCon pings server while asleep


PontusN

Recommended Posts

PontusN

Hi!
 

Emby Server 4.2.1 on Windows.

 

I have a Vero 4K unit that runs Kodi 18.4 as we speak. This unit is "made to be always on", but there is an option for it to go to sleep.

However, the sleep on this unit has no effect on EmbyCon always connection to the server.

The Windows server is usually in sleep mode due to no-one watching, but EmbyCon now always keeps it awake.

Is there an option in EmbyCon to only "connect" to the server while being "used" ? 

 

//Pontus

Link to comment
Share on other sites

PontusN

Hi, how do you know that this happens?

 

#1: The computer never goes to sleep, in the few cases that it does, it wakes up instantly.

#2: The user I have set up for Kodi is seen in the dashboard as "last seen 0 seconds ago". This is never higher than 15 minutes.

Link to comment
Share on other sites

TeamB

Do you have a screen saver set up in Kodi? EmbyCon goes into sleep mode when the Kodi screen saver kicks in.

There are a few settings in EmbyCon that can alter the way it contacts the server and how often it does it. Setting intervals to zero usually disables them.

 

If you can provide a server log from around the time the server is being kept awake I should be able to see if and what EmbyCon connections are occurring.

Edited by TeamB
Link to comment
Share on other sites

PontusN

This is the logfile from today.

You should be able to see a lot of activity from tonight 00-07 and 14-16.

During this time i feel that the server should have been asleep but was not.

serverlog.txt

Link to comment
Share on other sites

TeamB

in the overnight period all I see are some WebSocket connections:

    Line 84: 2019-11-08 01:16:17.046 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 87: 2019-11-08 01:16:17.118 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 119: 2019-11-08 02:02:46.074 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 120: 2019-11-08 02:02:46.100 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 139: 2019-11-08 02:49:15.050 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 140: 2019-11-08 02:49:15.122 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 231: 2019-11-08 03:35:45.060 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 232: 2019-11-08 03:35:45.087 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 251: 2019-11-08 04:23:15.069 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 252: 2019-11-08 04:23:15.143 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 276: 2019-11-08 05:09:45.061 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 277: 2019-11-08 05:09:45.088 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 369: 2019-11-08 05:56:14.055 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 370: 2019-11-08 05:56:14.083 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 461: 2019-11-08 06:42:44.059 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 462: 2019-11-08 06:42:44.148 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 549: 2019-11-08 07:29:13.056 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 550: 2019-11-08 07:29:13.083 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 646: 2019-11-08 08:15:42.057 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 647: 2019-11-08 08:15:42.130 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 738: 2019-11-08 09:01:58.055 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 739: 2019-11-08 09:01:58.126 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 853: 2019-11-08 10:19:54.061 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 854: 2019-11-08 10:19:54.087 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32
    Line 1012: 2019-11-08 11:06:07.593 Info HttpServer: WS http://192.168.1.149:8096/embywebsocket?api_key=77673918063b4ab08f46dc35cdb01176&deviceId=51AA5A3E134C41258DE12FF621113F42. UserAgent: EmbyConWebSocket
    Line 1013: 2019-11-08 11:06:07.666 Info HttpServer: HTTP POST http://192.168.1.149:8096/emby/Sessions/Capabilities/Full?format=json. UserAgent: EmbyCon-1.9.32

A WebSocket is a continuous connection a client makes to a server to communicate activity and events more easily than having to open and close sockets all the time.

Here is some background https://en.wikipedia.org/wiki/WebSocket

 

The problem you may be facing is EmbyCon expects the WebSocket to be open ALL the time, when it sees a ping time out or the connection drop it tries to reconnect, this could be what is keeping you server awake.

 

You can turn off web sockets in the services settings in the EmbyCon add-on : Services -> Enable Emby Remote Control

Link to comment
Share on other sites

PontusN

What unit are all those settings in ? 
Seconds? Minutes?

 

"Check New Content" was already set to "0".

"Background Image check" and "Random Movie Update" was not. Set those to 0 too.

 

Saw there was a "Cache Server Updates" setting to in Advanced. Did not untick that.

Edited by PontusN
Link to comment
Share on other sites

TeamB

@@PontusN
These are the settings you should try In the EmbyCon add-on settings:

 

Events -> Cache Artwork in the backgrounds = Off

Events -> Cache image interval minutes = 0

Services -> Enable Emby remote control = Off

Services -> Background image update interval = 0

Services -> New content check interval = 0

Services -> Random movies interval = 0

 

Restart Kodi

Link to comment
Share on other sites

TeamB

I tested today for 6 hours with the above settings with the default skin and there were no connections from EmbyCon in the servers logs apart from the initial start up auth connection.

Link to comment
Share on other sites

sualfred

The Embuary skin refreshs widget every ~10 minutes, that is mostly the reason.

I could add an interruption if the screensaver is active if that helps.

Link to comment
Share on other sites

PontusN

That would be excellent!

 

I recently got another issue with the skin.

The "All movies" menu disappeared after what I guess was a widget update, and could not be added again. Will try to reinstall the skin.

 

What is the main difference between Embuary(Embycon) and "Emby for Kodi"?

Link to comment
Share on other sites

TeamB

The main difference btween Emby for Kodi and EmbyCon is that Emby for Kodi syncs youe media items to the local Kodi DB where EmbyCon uses a load as you need it approach where it loads a page of items as you view them.

Link to comment
Share on other sites

sualfred

@@PontusN

 

Please try the attached script version and let me know if it helps. Remember to enable a Kodi screensaver. The default "Dim" or "Black" is enough.

 

But I really suggest you to change your sleep policy actions on the server/NAS. I'm using 2 Nvidia Shields in my network and switched my energy saving rules to a traffic and hardisk activity monitor.

 

If you are using Debian/Ubuntu you can take a look at my used script:

https://github.com/sualfred/personal_scripts/tree/master/autoshutdown

 

It's based on a fork that is included in OMV and works very well. It's not my work, just ripped out of OMV and changed things to run it without having OMV as OS.

 

script.embuary.helper-1.3.3a.zip

Link to comment
Share on other sites

PontusN

So Emby for Kodi would be a faster and more rapid solution than Embycon but still use Emby as info provider?

Because my main issue now is that if I don't use Emby on my Vero4k, it does not understand the Nfo files provided my Emby, but still think it's local info, so it does not scrape.

Link to comment
Share on other sites

sualfred

As long as @@TeamB has not removed the required window properties, the "All movies" item will still be visible for EmbyCon only users:


		<visible>[Library.HasContent(movies)
		| [System.HasAddon(plugin.video.embycon) + [
		String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.0.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.1.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.2.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.3.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.4.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.5.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.6.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.7.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.8.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.9.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.10.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.11.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.12.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.13.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.14.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.15.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.16.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.17.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.18.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.19.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.20.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.21.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.22.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.23.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.24.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.25.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.26.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.27.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.28.type),movies)
		| String.IsEqual(Window(home).Property(plugin.video.embycon-view_item.29.type),movies)
		]]]</visible>

You can try a main menu reset in the skin settings, too. I've changed nothing in this regard.

Link to comment
Share on other sites

TeamB

Yes my bad, the main menu item window properties are tired to the Background loop. I also just confirmed the background loop does not trigger any requests over time so you can safely tuen that one back on.

 

Services -> Background image update interval = 20

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...