Autostart NAS from pressing play on UNAVAILABLE video

Server Version#: v1.31.1.6716-ca0c45ff8
Player Version#: Shield TV

I have two machines:

  • One runs my Plex Media Server and uses less that 10 watts and is on all the time.
  • The other is my NAS which contains all the media and uses over 800 watts and is only on when watching something.
  • I don’t want to leave the NAS running all the time because of the power costs.
  • The Plex Media Server machine NFS mounts the media on the NAS.
  • When the NAS is off, the videos show up as UNAVAILABLE.

Right now, I have to start the NAS server locally before watching anything.

However, it is a problem for my remote Managed Users, as I have not found a way to automatically start the NAS when a remote user tries to play a video. They just get a popup saying the video is UNAVAILABLE unless the NAS is up.

Is there any way to automatically start my NAS when a remote Managed User tries to play an unavailable video?

Thanks!

There is nothing in Plex because that operation is at the network file sharing layer (well below the application).

Your NAS should have power management software which will spin down the HDDs when idle for more than X minutes.

To make this work with Plex:

  1. The NAS is always on but the HDDs will spin down when not needed.
    – they will spin up when you add media
    – they will spin up when PMS does nightly maintenance (if needed)
    – they will spin up to play media

  2. This works because PMS can tell there is content under the ‘root’ folder (each folder listed in your library sections). This is cached by NFS so you’re good as long as NFS is running.

I’m surprised at 800 watts. That’s big. I have a 110TB NAS , with Xeon and all the trimmings, that comes in at 350 watts

HDDs need 12 watts to keep spinning.

The NAS uses ZFS raid so all the drives spin all the time
Also, the CPU’S alone use 200 watts even if the drives are not spinning.
Compare that with the 10 watts the nuc-like server uses.

Thanks for your reply!

Well that Zucks :frowning:

This is why I use XFS and mdadm.

ZFS is great for SSDs — I will not deny that. IMHO, it shouldn’t be used for HDDs
(TrueNAS)

If there was even a log message (INFO or DEBUG) which the server put out to say it tried to access the media file, that would be enough. (ie, with tail -f on the log).

I will open a feature request to see if at least that can be done… It doesn’t seem like it would take much development.

While the feature request seems simple, the implementation of it with WOL is not.

The moment you says “Plex supports WOL”, someone will want to have “Remote WOL”. Frankly, that’s a logistics and privacy disaster because it requires the MAC address of every adapter used and the attached IP addresses.

Yes, but I don’t really want even 200 watts running 24/7.

I don’t use WOL. I use an APC power controller.

And I wouldn’t expect plex support to have anything to do with it.

All I need is a simple log message with metadata id and user/account id included. Like you get when a user marks an item as watched.

WOL was what I could see them offering and I could make a case for given the applicability for everyone.

For APC, in spite of my vested interest since I use their products too, won’t fly for a moment to have PMS talk to “Some Power Controller” and turn on device “X” when it wants to play media. NOT going to happen. There are too many brands. It would be a development nightmare

Best I can offer is WOL because it works for everyone “ON LAN ONLY” . I can champion that.

If you want to go make a feature request, feel free to write it out thoroughly.

As for your server and the power usage –

  1. I’ve heard how power costs are skyrocketing. Mine went up 50% this year.
  2. I know and that’s what sucks. You got a Cruise Ship now but the fuel costs are killing you.

My server sits here and costs me about $40 / month to operate not including A/C in summer months.

As for Cruise Ship – I truly do relate
Parts that matter:

  • E5-2690v4
  • 256GB ECC DDR4
  • 10 GBE dual NICs
  • 12x12TB HDDs plus 9 SSDs
  • Nvidia P2200

I don’t understand you reply…

Plex would not be supporting anything (power controllers, wol or anything else). All this would do is add a message to the log. No support is necessary whatsoever.

Are you misunderstanding my request? It is hardly even a “feature”. It is just one small addition to the many many log messages which are already issued. I was actually suprised that there was nothing already in the DEBUG log when an unavailable file is played.

The Plex Server is not what would start the NAS. I would do that based on the log message. No plex feature needed. I would do all the work of controlling the APC controller.

It seems I am. I apologize.

I was of the impression you want PMS to trigger.

If you’re asking me for “What can you trigger on?” I can do that.

in “Plex Media Server.log” (Debug logging enabled)

(Best choice)

  1. “MDE:” (where the media decision engine is determining how to play the media)

(Least choice)

  1. “TPU:” (where the transcoder is firing up and active to transcode) . This doesn’t happen with every playback

There is a timing / logistics issue you’ll have with NFS. From the moment PMS wants to start playing before the NAS is ready. WIll you use hard mounts to force the stall ?

YES, plex DEBUG logging IS enabled. But no message is issued re unavailable file.

I would take care of the timing issues. Ie, the user would likely have to press PLAY again when the NAS is up, but that is hardly much of an inconvenience.

I use NFS mounts. My remote users would just have to wait a few minutes before pressing PLAY again. No big deal though…

Are you a Plex developer, or should I issue a separate feature request?

I am the Linux packaging developer and one of the support engineers.
My expertise is in Linux having started in Unix. (been at it more years than I care to admit)

If you’ve used the Debian packaging, that’s one of the things I’ve written.

So you’re not seeing any logging for “UNAVAILABLE FILE”. … That’s interesting.

I will go check that.

You mean you might be able to make this happen!!!??? That would be awesome! If you need a feature request, I would like to run it by you before posting, so there is no confusion about what I am asking for. Would that be OK?

It’s probably one line of code in the PMS…

I don’t know. I have to look FIRST

Getting them to print an ERROR if media is missing MIGHT BE SOMETHING I could get… BUT FIRST I need look :slight_smile:

If possible, include metadata_item id and account_id (exactly like this) when an item is marked PLAYED:

DEBUG - [Req#5d2e] Library item 63781 'The 'Burbs' got played by account 1!

But it would be:

DEBUG - [Req#5d2e] Library item 63781 'The 'Burbs' is unavailable.  account 1!

Or similar.

P.S. I would love to beta test a release with this in it!

I counted the places (those which are obvious to me) they’d have to modify.

37 different places would require changes.

That’s a lot bigger than “1 line of code”.

Let’s step back a second and reevaluate .

How big is your media library ( Items and TB storage used) ?

Chatting with FordGuy61, He has an idea which might be slick enough to work NOW

Over 100TB. Thousands of items.

I have to boot the NAS for precise numbers. What is the idea?

You mean if you grep for this message:

Library item 63781 'The 'Burbs' got played by account 1!

it shows up in 37 places?