Letting the server machine sleep (macOS)

Here

{"activity":{},"busy":false,"clients":0,"disk":{"free":260814807040,"total":999860912128,"used":739046105088},"enabled":true,"keep":{"num":"","only":""},"padding":{"end":"","start":"0"},"path":"/Volumes/Media Center/DVR","stats":{"groups":27,"files":230,"jobs":3,"rules":4},"status":"running"}
iMac-5k:~ etienne$

According to that output, channels isnā€™t preventing sleep.

Two things that might be going on:

  • If you have a web browser open with the Channels DVR page, the DVR will not sleep as it thinks you are using it.

  • If you have Channels on the top shelf of your ATV and the app is focused, the ATV will make periodic requests to refresh the channels at the top of the screen which may keep your DVR awake.

Thanks for those hints

I have had the DVR page pinned to my tabs in Safariā€¦ It is now unpinned. I will report on whether or not it solves it.

So my computer has been sleeping like a baby today. It was the opened tab in safari that was keeping it awake.

So I guess I could re-installed the ā€œwake to recordā€ script now and see how it goes

1 Like

Thanks for confirming!

Iā€™ll put in a fix so the DVR doesnā€™t prevent sleep when the browser window is opem on the same machine and connected to 127.0.0.1

How has this been working out for everyone?

it is working OK for me, but iā€™ve noticed that the machine is waking up every minute or so and then going back to sleep. the cause is always GIGE so its related to some network activity but so far i have not been able to isolate what is actually causing it. i have a lot of machines in my network and multiple sleep proxies so right now itā€™s anyoneā€™s guess.

this is not good as itā€™s spinning up and down the external USB disk 100s of times per dayā€¦

rob

agreed. frequent spin up and spin down will eventually kill your hard drives. Hard drives that stay constantly spinning can last much, much longer. Sleep options might save you a few dollars a year on your electric bill. But turning off sleep is better for hardware longevity. You will make up the money you would have saved in electricity by not having to buy new hard drives.

yes - this is clearly a pathological situationā€¦ it would not be the first time one of my macs would not stay asleep. anyway as far as sleep is concerned i am completely obsessed with it - i have solar and also monitor my electric consumption, and i can see that sometime in the last year i ended up with an extra 200W running all the time. this is going to take my yearly electric bill from -$200 to +$200 and so iā€™m pretty motivated to make idle computers shut off. i just have not had the time to go around and figure out exactly what is going on.

anyway from time to time the backend computer is asleep when we start the tvOS client and usually we need to exit and re-enter the channels app in order to get the appleTV to see the server. a minor nuisance since everyone understands what to do when the recordings donā€™t show up.

rob

I donā€™t think you have calculated that extra charge correctly.

A typical HDD (for example a 3TB WD Red) uses about 3.9 watts while spinning idle.
A typical electricity provider charges about 12 cents per kilowatt hour.

If the hard drive was spinning idle for the entire year (as opposed to being powered off with hard drive sleep settings), you would save about 34 cents per month in electricity, or $4.10 for the year on your electric bill.

i was not trying to say that i think the HDD is burning 200W. i was trying to illustrate the fact that i am heavily invested in efficiency and power savings. ergo i want to get the sleep working right, and also track down that extra vampire load.

a typical electricity provider might charge 12c/kwh, but here in PGE territory, the top tier for the standard rate (E1) is something like 40.1c/kwh. because i am on EV-A, a non-tiered TOU plan for electric vehicle owners, i am paying 44c/kwh during peak hours. luckily under NEM-1 PGE has to pay me retail for the electricity i generate, so on sunny days during part of peak hours they are paying me that rate rather than the other way around. the deck is stacked against home solar operators as they define peak to be from 2PM to 9PM, which is BS.

@pfile has wake-on-lan been working for you? Is it reliable? The large timeouts I hacked in are causing some problems, so I want to figure out a good solution going forward.

wellā€¦ i turned it off last month because something was causing the machine to wake up every few minutes as described above. the constant spin up/down is pretty bad for the disk.

at this point i am seriously considering running the backend on a synology nas, but the tuners and the nas are in different places of the house and iā€™m a little worried about pumping so much data over my moca adapters. they are a little crappy and seem to lock up under heavy traffic. plus the nas is kind of wimpy so iā€™m worried about comskip performance. because i have not thought of a good solution to these problems, for now iā€™m still using the mac mini.

Do you have Channels in the top shelf area on the ATV? Itā€™s possible that is making periodic requestsā€¦ although it didnā€™t think it would be every few minutes.

nope - itā€™s one row below that. this would not be the first time that iā€™ve had a mac waking up like this for spurious reasons, so i donā€™t have any reason to suspect channels as the culprit. all i know is the cause is GIGEā€¦

Iā€™ve been off the forums for a while now. Can anyone update me on how this feature works now?

Do we still need to hack in the feature or Wake on Lan is now built in the latest release of the channel server app?

i think it worksā€¦ but why do you say itā€™s a hack? the server does not run with elevated privileges and so you need the wake-helper app to allow it to set the wake times without requiring a password each timeā€¦

well because the first time I tried it it felt like a hack! Iā€™m no expert and everytime I have to deal with Terminal commands, it feels like a hack to me.

Sorry about the terminology.

So it still needs a helper to make it wake on lan right?

yes, the wake helper is still in the very latest install script, so as far as i know itā€™s still necessary. but once thatā€™s been installed i donā€™t think you have to do it again.

i guess the channels devs could write a gui installer for everything, but theyā€™ve chosen to go command line on us :slight_smile:

rob

There was a bug previously where the computer wouldnā€™t go to sleep if you had a browser window open on the machine with the DVR interface. That should be fixed.

We havenā€™t had many others testing this feature, but it should work. If you have issues let us know and weā€™ll try to fix them. If itā€™s working well, let us know also and we will make this easier to set up for others.