INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Streaming and sleeping.  (Read 447 times)

Wasper

  • Recent member
  • *
  • Posts: 29
Streaming and sleeping.
« on: May 08, 2021, 11:13:22 pm »

Hello,

My pc goes to sleep while I'm streaming.  I do see the powercfg /request made by MC.  It stays there around 10 seconds before going away(expected behavior?). On every track change a new request is made.  I would expect that to reset the sleeping timer to 0 but it doesn't as my pc goes to sleep.  Sleeping when idle is a desired behavior that is working flawlessly on non streaming mode.
Since, my old car died and got a real one, I want to stream MC into it with no sleeping interruption.

Update:
Problem already posted here: https://yabb.jriver.com/interact/index.php?topic=124334.0

20 minutes was perfect as it is longer than mostly all songs... Why not put the request for the song length + 5 minutes.  And even if this add an extra 5 minutes before going to sleep mode and you really care, then you can do it manually with the remote!

Maybe the expiration time could be in a parameter.  I don't get the relation between the playlist and the sleeping time.  IMO, if PC reach sleep time and you are not in the 5 seconds gap while track is changing, then, the PC will sleep, but, I'm probably wrong.  Is there a shell command that could tell me that MC is currently streaming?  If so, I can manage my own keep awake service...

I used to have a router that supported WOL from WAN, but, new one is a packaged one without that possibility.  My plan to fix that is to use an AC smart plug to turn off/on the PC.  As I'm always putting my PC to hibernation after 30 minutes, I think it's safe to do an AC power off from that state and then restart the PC to gain access to library trough port forwarding.  Anyone could confirm that AC shutdown in hibernate mode is safe?  Of course, I do need to fix the hibernate while streaming problem first...   
Logged

Wasper

  • Recent member
  • *
  • Posts: 29
Re: Streaming and sleeping.
« Reply #1 on: May 13, 2021, 08:56:02 pm »

Just in case it could give some idea to people...  I did succeed to fix all my problems

Used some programming skills though.

I turned off Sleeping/Hibernation.

I did turn on windows firewall log and parse it to see external IP connection Streaming).
I wrote into a file the timestamp on track change event while playing to zone with plugin installed (Playing on LAN).
I parse powercfg /requests (OS lock).
I look at user idle time (User playing with the interface).

I added a scheduled task in every 20 minutes in Windows.
I combine all those factor to decide or not to shutdown my HTPC.
The good thing is that I can put different threshold for every case (streaming, on LAN, user input, OS sleeping lock, etc...)

The real good thing is that my HTPC support wake on lan from S5 state.
As my router doesn't support wake on wan anymore, the cheapest way was a smart plug.  Cutting off AC power and bringing it back with the good Bios setting after a power failure allow me to wake the HTPC from everywhere.

Not sure about how good it is to turn off computer so often but google seems to say that it has their pro and con but it's not worst than a lifetime opened device.

I do now have the control!  It's often a thin line with computer but we usually able to make it behave like we want with lots of pain!
Logged
Pages: [1]   Go Up