Jump to content

Putting PC to Sleep whilst EmbyServer is streaming


GeorgeCalli

Recommended Posts

GeorgeCalli

I’m trying to automate putting my PC (Windows 10, Emby Version 4.8.10.0) to sleep at an allocated time using a Script, Task Scheduler, and PowerShell, but I want to keep it awake when media (like movies or music) is playing.

However, while playing media, I receive the message: “Emby Server is idle with no significant activity, putting the PC to sleep.” Emby Server’s CPU usage is 0%.

I’ve tried using the Emby Server API key and localhost, but I can’t get PowerShell to recognize that Emby Server is playing movies or music even though PowerShell sees it as idle i.e. the server.

I’ve even tried monitoring network traffic, CPU usage, CPU spikes or a combination thereof.

Has anyone had experience with this and can offer a solution? Any suggestions on how to prevent the PC from sleeping when Emby Server is playing?

Your assistance will be appreciated.

Thanks.

P/S Apologies: I just notice that I posted this under Android Server and not Windows. Unfortunately, I don't know how to move.

Edited by GeorgeCalli
Link to comment
Share on other sites

Quote

However, while playing media, I receive the message: “Emby Server is idle with no significant activity, putting the PC to sleep.” Emby Server’s CPU usage is 0%.

I

Hi, what gives you this message? that is not an emby message. We don't have that text anywhere.

Link to comment
Share on other sites

GeorgeCalli

Windows Powershell gives me the message. 

So sorry that I wasn't clear!

Thought I'd ask, maybe someone would know what of the Emby Server I needed to monitor. Apologies for not being clearer. 

Link to comment
Share on other sites

GeorgeCalli

My question in simpler terms:

I'm trying to prevent my PC from going to sleep when media (like movies or music) is playing on Emby.

I want the PC to sleep only via script, task scheduler, and PowerShell.

Has anyone found a solution for keeping the PC awake while Emby is active?

Link to comment
Share on other sites

Quote

I'm trying to prevent my PC from going to sleep when media (like movies or music) is playing on Emby.

Hi, on Windows, Emby will already handle this for you.

Link to comment
Share on other sites

GeorgeCalli

Thanks for that.

I was watching a movie on TV through Emby, and PC went to sleep.

Hence the reason I'm looking into this.

Also, If I'm streaming music through Emby, PC also goes to sleep.

I'm trying to prevent PC going to sleep if I'm streaming media.

Link to comment
Share on other sites

All you need to do is setup windows sleep mode normally.
 

Link to comment
Share on other sites

On 10/25/2024 at 10:25 AM, GeorgeCalli said:

Thanks for that.

I was watching a movie on TV through Emby, and PC went to sleep.

Hence the reason I'm looking into this.

Also, If I'm streaming music through Emby, PC also goes to sleep.

I'm trying to prevent PC going to sleep if I'm streaming media.

By PC do you mean the same machine as the server?

Link to comment
Share on other sites

GeorgeCalli

I did exactly that, but whilst streaming a movie, PC went to sleep and subsequently Emby and movie stopped.

Link to comment
Share on other sites

GeorgeCalli

Yes, same machine.

It's a Windows 10 computer that also runs Emby for Windows.

Link to comment
Share on other sites

GeorgeCalli

Some feedback

I reset the power settings to default and checked settings ensuring sleep is set to allocated time.

Streamed music from Emby and noticed that the computer went to sleep even though music was playing.

Exactly what had happened whilst playing a movie.

This is what I was trying to overcome.

Thank you.

 

Edited by GeorgeCalli
Grammar
  • Thanks 1
Link to comment
Share on other sites

GeorgeCalli
On 10/28/2024 at 2:50 AM, Luke said:

By PC do you mean the same machine as the server?

Yes.

Link to comment
Share on other sites

On 10/28/2024 at 9:08 AM, GeorgeCalli said:

Some feedback

I reset the power settings to default and checked settings ensuring sleep is set to allocated time.

Streamed music from Emby and noticed that the computer went to sleep even though music was playing.

Exactly what had happened whilst playing a movie.

This is what I was trying to overcome.

Thank you.

 

Can we please look at a specific example?

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...