Applescript to wake computer

905 views
Skip to first unread message

Rusty Wandall

unread,
Oct 24, 2015, 2:56:11 PM10/24/15
to QLab
I have an onstage computer that I trying to put to sleep then wake up again via OSC commands to Qlab so I can have the display completely off during scene changes.  The OSC commands are being sent by a separate mac running Qlab.  I have found an easy way for the computer to sleep via an applescript.  I haven't been able to figure out a way to wake the computer via an OSC command after it's asleep.  Is this possible?

Thanks!
Rusty

Paul Gotch

unread,
Oct 24, 2015, 3:22:00 PM10/24/15
to QLab
On Sat, Oct 24, 2015 at 11:56:11AM -0700, Rusty Wandall wrote:
> applescript. I haven't been able to figure out a way to wake the computer
> via an OSC command after it's asleep. Is this possible?

You need to send a Wake On Lan 'magic' packet to the machine. They need
to be on the same network segment for this to work any kind of router
in between means it won't work.

Also in the 'engery saver' preference 'wake for network access' must
be ticked.

There are several things you can use to send WoL packets for example
the comanndline version of:

http://www.depicus.com/wake-on-lan/wake-on-lan-for-apple-mac

is free. Or there are python scripts

https://pypi.python.org/pypi/wakeonlan/0.2.2

or there are many things which do it that you can compile yourself.

However you do it you can then write an Apple Script run via a Script
command to call run the program which sends the WoL packet.

-p
--
Paul Gotch
--------------------------------------------------------------------

Joshua Langman

unread,
Oct 24, 2015, 6:35:57 PM10/24/15
to QLab
Why not: 

(a) have QLab fire a video cue of a solid black image on the built-in-display; or

(b) Apple Script the display brightness?

What is to be gained by actually putting the machine to sleep?

Josh

Rich Walsh

unread,
Oct 24, 2015, 7:03:50 PM10/24/15
to ql...@googlegroups.com
You might get some mileage out of researching sleeping the display rather than the computer. This will pull up a lot of options in Google: apps, command line tools, shell scripts… Exactly how you do it depends on your OS – in Mountain Lion I can't seem to sleep the display easily but I can wake the display with

do shell script "caffeinate -u -t 1"

You could send that over ssh or as a remote Apple Event.

Rich

Sam Kusnetz

unread,
Oct 24, 2015, 7:14:51 PM10/24/15
to ql...@googlegroups.com

October 24, 2015 at 2:56 PM
I have an onstage computer that I trying to put to sleep then wake up again via OSC commands to Qlab so I can have the display completely off during scene changes.  The OSC commands are being sent by a separate mac running Qlab.  I have found an easy way for the computer to sleep via an applescript.  I haven't been able to figure out a way to wake the computer via an OSC command after it's asleep.  Is this possible?

Whether or not this is possible, we do not recommend allowing a computer to sleep while QLab is running. Peripherals, including displays, sometimes come back online after wake up slowly enough to confuse QLab, and that's a recipe for trouble.

Cheerio
Sam

--
Sam Kusnetz | Figure 53 Field Operative
s...@figure53.com

micpool

unread,
Oct 25, 2015, 10:03:02 AM10/25/15
to QLab
On Saturday, October 24, 2015 at 11:35:57 PM UTC+1, Joshua Langman wrote:
Why not: 

(a) have QLab fire a video cue of a solid black image on the built-in-display;

This is not the same thing at all. Black with the backlight on is considerably brighter than a scene in sleep.
 
or

(b) Apple Script the display brightness?

Yes this is the same but… It only applies to a built in screen. And you  cannot script it directly. 

Mic

Rich Walsh

unread,
Oct 25, 2015, 11:37:22 AM10/25/15
to ql...@googlegroups.com
On 25 Oct 2015, at 14:03, micpool <m...@micpool.com> wrote:

(b) Apple Script the display brightness?

Yes this is the same but… It only applies to a built in screen. And you  cannot script it directly. 

If it's an external display can't you just turn it off? Put it on a non-dim…

Rich

Alexander (Mailing List) Taylor

unread,
Oct 25, 2015, 11:42:26 AM10/25/15
to ql...@googlegroups.com
Wouldn’t pulling power from the external display cause OS X to refresh all the screens?  Sounds like some intermediary device would be needed to trick the computer into thinking the screen was always attached…

Alexander

--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Gotch

unread,
Oct 25, 2015, 11:49:15 AM10/25/15
to ql...@googlegroups.com
On 25/10/2015 15:42, Alexander (Mailing List) Taylor wrote:
> Wouldn’t pulling power from the external display cause OS X to refresh
> all the screens? Sounds like some intermediary device would be needed
> to trick the computer into thinking the screen was always attached…

Yes, you'd need an EDID emulator in between to convice it that the
screen never went away. However you'll still run the risk of HDCP
renegotiation causing issues, unless you go via analogue where there's
not going to be HDCP.

-p

micpool

unread,
Oct 25, 2015, 12:31:21 PM10/25/15
to QLab, pa...@chiark.greenend.org.uk
If you go VGA and have a screen which doesn't come up with a logo or menu when switched on you can use a VGA  active splitter/linedriver

You connect a VGA monitor  to the local monitor port on the splitter, this is what the computer thinks it is connected to.

You run the isolated/line driver feed to your on stage monitor and can then power this up and down without affecting the computer

Mic

Andy Dolph

unread,
Oct 25, 2015, 2:20:15 PM10/25/15
to ql...@googlegroups.com
Or use an EDID emulator that you can turn off HDCP assuming you don't actually need it.

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages