Wake OSX with PlexConnect

With the removal of Bonjour in PMS 9.8, you can manually register the bonjour services to allow the web or ios clients to wake a mac. Problem is that the AppleTV wont' wake a mac to access PlexConnect. In order to do so, you can register the web and dns server that PlexConnect creates with the following commands. 

 

dns-sd -R "PlexConnect_DNS" _domain._udp. . 53 pdl=application/dnsserver
dns-sd -R "PlexConnect_Web" _http._tcp. . 80 pdl=application/webserver
dns-sd -R "PMS" _pms._tcp. . 32400 pdl=application/pmsserver

 

The commands need to be run individually in separate terminal windows and stay running in order to keep the bonjour services registered. I'm sure you could wrap these in LaunchAgents if you want it to run at login without keeping the shells open. I'm using an Airport Extreme for my home router so not sure if this works in environments without it.

Great find mate, I am sure there will be quite a few people who will be happy about this.

With the removal of Bonjour in PMS 9.8, you can manually register the bonjour services to allow the web or ios clients to wake a mac. Problem is that the AppleTV wont' wake a mac to access PlexConnect. In order to do so, you can register the web and dns server that PlexConnect creates with the following commands. 
 

dns-sd -R "PlexConnect_DNS" _domain._udp. . 53 pdl=application/dnsserver
dns-sd -R "PlexConnect_Web" _http._tcp. . 80 pdl=application/webserver
dns-sd -R "PMS" _pms._tcp. . 32400 pdl=application/pmsserver
 
The commands need to be run individually in separate terminal windows and stay running in order to keep the bonjour services registered. I'm sure you could wrap these in LaunchAgents if you want it to run at login without keeping the shells open. I'm using an Airport Extreme for my home router so not sure if this works in environments without it.

Complete Apple newbie here, but general tech nerd. I have noticed that Plex does not wake my sleeping mac when accessed remotely by my iOS device, as you stated due to Bonjour's removal. This is a huge downside for me as my main purpose is to use it to stream to my devices when I am away from home, where my mac is located. Keeping my mac on continuously is not an option which is why I require it to be woken from sleep when my iOS device requests access to the server.

You mentioned you can register the services manually to allow iOS clients to wake a sleeping mac, do you have any further information on this? I have been searching all night, any help is much appreciated.

P.S. Sorry for waking a sleeping thread ( pun intended )

Complete Apple newbie here, but general tech nerd. I have noticed that Plex does not wake my sleeping mac when accessed remotely by my iOS device, as you stated due to Bonjour's removal. This is a huge downside for me as my main purpose is to use it to stream to my devices when I am away from home, where my mac is located. Keeping my mac on continuously is not an option which is why I require it to be woken from sleep when my iOS device requests access to the server.

You mentioned you can register the services manually to allow iOS clients to wake a sleeping mac, do you have any further information on this? I have been searching all night, any help is much appreciated.

P.S. Sorry for waking a sleeping thread ( pun intended )

If you are only trying to wake your mac via the iOS apps, you only need to register the bonjour service for PMS

dns-sd -R "PMS" _pms._tcp. . 32400 pdl=application/pmsserver

Just run that command from Terminal and leave it open. Then put your mac to sleep. Now fire up the iOS app and it should wake your mac. In order for this to work when outside your home network, you need a router that supports bonjour registration and forwarding. I use an Airport Extreme as my main router and have Back-2-Mac enabled. That allows the requests to wake my Mac when i'm off network. I don't know if any other routers work so if you're not using an Airport Extreme, it might not work.


If you are only trying to wake your mac via the iOS apps, you only need to register the bonjour service for PMS

dns-sd -R “PMS” _pms._tcp. . 32400 pdl=application/pmsserver

Just run that command from Terminal and leave it open. Then put your mac to sleep. Now fire up the iOS app and it should wake your mac. In order for this to work when outside your home network, you need a router that supports bonjour registration and forwarding. I use an Airport Extreme as my main router and have Back-2-Mac enabled. That allows the requests to wake my Mac when i’m off network. I don’t know if any other routers work so if you’re not using an Airport Extreme, it might not work.

You are an absolute lifesaver! spent all night playing around with "Network Beacon" and dns-sd but this has indeed allowed me to use Plex from iOS without first waking my iMac. I do indeed use Time Capsule and have Back-2-Mac enabled. I will double check this tommorow from a second remote location, although technically it will be no different, it will provide me with peace of mind lol.

Now this is working I see no reason not to become a Plex subscriber  :) Awesome software, and great help. Thankyou so much

Again Reviving .. 

Can we run these three command as daemon . Can anyone write  script. I tried and its waking up mac without having library   :(

Again Reviving .. 

Can we run these three command as daemon . Can anyone write  script. I tried and its waking up mac without having library   :(

I can post the launchctl scripts when i get home from work tonight

I can post the launchctl scripts when i get home from work tonight

Thanks Mate, Will wait .. 

Already built into openplex if using OSX.

https://github.com/wahlmanj/PlexConnect/blob/master/update/OSX/com.plexconnect.wake_dns.plist

https://github.com/wahlmanj/PlexConnect/blob/master/update/OSX/com.plexconnect.wake_pms.plist

https://github.com/wahlmanj/PlexConnect/blob/master/update/OSX/com.plexconnect.wake_web.plist

Already built into openplex if using OSX.

How does it work? HOw to install ? Thanks

Instruction in my signature.

Instruction in my signature.

I did fresh installation with your theme. Everything is perfect. I have added those 3 plist file in launchdaemons folder too. They have got loaded too with pid. 

Still Plexconnect is not able to wake mac to connect PMS .. ( mac is sleeping) . Please advice. 

I have tested these and they work. I would say the issue is local with your Mac. There is numerous thing that could prevent your Mac waking. Can you test with the iOS app “fing” and see if you can wake your Mac from sleep with just the app?


https://itunes.apple.com/us/app/fing-network-scanner/id430921107?mt=8

Yes it wakes. Also  I ran those 3 commands in separate terminals and that is also working . 

but with you theme and plist files. PLexconnect is not able to wake mac. Where shall i keep these 3 plist files?

srry for trouble. 

Cheer

I believe they are supposed to reside in /Library/LaunchAgents. Try a different theme?

I believe they are supposed to reside in /Library/LaunchAgents. Try a different theme?

I see plexconnect.bash.plist in /Library/Launch/Daemons . Hence kept in same folder

Here is Pid

2880 - com.plexconnect.wake_pms

2877 - com.plexconnect.wake_web

2873 - com.plexconnect.wake_dns

412 - com.plexapp.plexmediaserver.32944

401 - com.plexapp.helper

 

let me try basic theme

Another Update - I did Fresh Installation  with basic (ibaa) theme using open plex. and copied those 3 Plist file under /Library/Launchdaemon Directory. 

I did load all of them manually for current session. 

Well it worked this time. Plexconnect on Atv 3 can wake MAC OS and i was able to see Library. 

But it didn't load post mac os reboot. Need to find the right directory or way to start these 3 daemons. 

Cheers. 

They belong in ~/Library/LaunchAgents/

its a common issue with mavericks that there are waking issues when a mac is sleeping, thanks will try the terminal command above for the ios plex - but I doubt it will work on mine.. fingers crossed.

nope didn't work