Quantcast
Channel: macOS/OS X (Mac) — Plex Forums
Viewing all articles
Browse latest Browse all 6828

Perfecting my PMS setup (with Wake/Sleep)

$
0
0

Hi all,

Long time user of Plex. Just have one minor kink I can't resolve before having the perfect setup for Plex at home. I was hoping you guys could lend a helping hand.

Problem:

My Mac is set to sleep after 15 mins. If I play an episode of 20 mins on a different device, the Mac immediately sleeps after it's done streaming. I'd prefer the Mac to sleep 15 minutes after it's done streaming. Is there any way to achieve this (preferably with scripts)?

Background story:

I've got PMS running on a Mac (10.10.3) with my media on an internal drive. In my attempts to have it running as efficient as possible, I've set sleep to 15 mins. The Mac serves to multiple clients (both remote/local). To circumvent the hassle of clients having to send WOL packets before opening Plex, I've set up my router with a script to wake my Mac, whenever it receives a request on port 32400. So instead of a 2-step procedure, I got it to wake simply by opening Plex. If anyone is interested, you need an Asus router with Merlin installed (DD-WRT should work as well), a PC with WOL capabilities and this script

The problem under the current energy saver settings in Mac, is that when a client starts playing a file at 12:00, the PMS tells my Mac to remain awake (pmset NoIdleSleep assertion) for as long as the stream is active. However, if the stream is stopped at 12:20, the Mac immediately goes to sleep because it's past its 15 minutes. I'm looking for a way to extend the sleep time to 12:35, i.e. 15 minutes after no active streams are detected. This way, the client can still navigate the Plex menus after playback has finished.

Since I enabled debug logging, I was thinking of a script that detects when the PMS log was last modified (during active streams, it updates its log every 5 seconds), and reset the 15 minutes sleep timer whenever the log has recently been changed (maybe with caffeinate?). I'm not sure if this is a viable option though. Any help regarding this would be much appreciated.

Server:

OSX (10.10.3)
i5, HD3000, 8GB
4TB (Internal HDD)
PMS v0.9.12.4


Viewing all articles
Browse latest Browse all 6828

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>