Wake screen of Mac hosting Indigo

Posted on
Thu Nov 24, 2022 10:27 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Wake screen of Mac hosting Indigo

Howdy my folks!

This is something I used to be able to do with AppleScript (I think) but that's long since dead. I want to be able to have an action setup on a trigger to automatically wake my Mac mini's screen from sleep whenever that trigger/action group is run. Anyone familiar with a way of doing this with Python or perhaps a plugin? I had a search of the forums but didn't see anything that seemed relevant.

Computer says no.

Posted on
Thu Nov 24, 2022 5:47 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Wake screen of Mac hosting Indigo

There was the Mac Commander plugin, but I don't think it's updated any more, and is not going to be compatible with the next version of Indigo.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Wed Nov 30, 2022 4:53 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Wake screen of Mac hosting Indigo

Yeah I did try that but alas doesn’t seem to run any scripts I’ve created without an error (although that Mac be macOS restrictions on it controlling that function). Annoying really, seems like it should be such an easy thing to do.

Computer says no.

Posted on
Wed Nov 30, 2022 5:58 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Wake screen of Mac hosting Indigo

Hey guys,

Found this little AppleScript that might do it:

Code: Select all
set wakeAfterSeconds to "5"
set myPassword to "the password for your Mac account that's running Indigo"

set now to do shell script "date -r $(date +%s) '+%m/%d/%y %H:%M:%S'"
set wakeTime to do shell script "date -jv +" & wakeAfterSeconds & "S -f " & ¬
   quoted form of "%m/%d/%y %H:%M:%S" & " " & quoted form of now & " " & ¬
   quoted form of "+%m/%d/%y %H:%M:%S"
do shell script "pmset schedule wake " & quoted form of wakeTime password myPassword with administrator privileges


Save this AppleScript in an external file and execute it from the Execute Script action. You could likely do the whole thing in a shell script and run it from the Run Shell Script action, but I didn't want to figure out the changes (I just lifted the above script from slashdot).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Dec 01, 2022 4:49 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Wake screen of Mac hosting Indigo

There is a "caffeinated" terminal command that might work?

Also, what do you want the computer to do after it's woken up? Maybe the solution is to use step2 to achieve step1.

ie.
Code: Select all
os.system("open /Applications/Safari.app https://forums.indigodomo.com/viewtopic.php?f=81&t=26696")


That just woke up my computer and went to this thread.

Bill
My Plugin: My People

Posted on
Mon Dec 12, 2022 7:50 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Wake screen of Mac hosting Indigo

Oh that’s great I’ll try them when I get back from holiday! Much appreciated


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Mon Jan 09, 2023 3:30 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Wake screen of Mac hosting Indigo

Hmm.. neither of those work when I remotely activate an action group using indigo touch. It shows in the Indigo log with no errors, but the screen doesn't wake.

Any other ideas? :(

Computer says no.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests