Mac Commander Plugin (Legacy Ver 1.1.0)

User avatar
durosity
Posts: 4810
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Commander Plugin

Post by durosity »

There are two certainties in life.. death and taxes. Unless you're rich, then you just move your money offshore to a tax haven... And give it a few years and I'm sure the rich will be able to buy new robotic bodies so they'll never die. I wonder if they'll make custom unicorn or leprechaun models... or if they'll come with a free pina colada.
Computer says no.
User avatar
racarter
Posts: 562
Joined: Sat Jun 18, 2016 4:23 am
Location: North Yorkshire, UK
Contact:

Re: Mac Commander Plugin

Post by racarter »

At the risk of creating a black hole which will swallow us all up, could this Indigo plugin be used to shut down Indigo itself?

My problem is that I supply my Indigo Mac Mini via a UPS and I have the Energy Saver preferences set to shut down the Mac when the mains has failed and the UPS battery has only 2 minutes left. This results in a orderly shutdown before the power fails, which protects the Indigo database, but the Mac only auto-restarts after a dirty shutdown - so when the mains is restored the Mac stays off.

If I can shut down Indigo in an orderly manner before the UPS battery is exhausted I could then just let the Mac do a dirty shutdown when the battery is exhausted, then it would reboot when the mains was restored.

First world problems, eh? 8)
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Mac Commander Plugin

Post by Colorado4Wheeler »

Yes, quite easily. Perhaps the easiest way would be to create an applescript to do the task and have the plugin call the applescript.
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
racarter
Posts: 562
Joined: Sat Jun 18, 2016 4:23 am
Location: North Yorkshire, UK
Contact:

Re: Mac Commander Plugin

Post by racarter »

Colorado4Wheeler - I'll experiment. Thanks. :)
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Mac Commander Plugin

Post by howartp »

There was a thread recently about this.

The suggestion was to use power management to set a wake-up command in +1 hours time from now, every say 30 minutes.

Then the mac will turn itself on assuming power hasn't been off 30 minutes.


Sent from my iPhone using Tapatalk
mortenkols
Posts: 198
Joined: Wed Oct 29, 2014 2:02 pm
Location: Norway

Re: Mac Commander Plugin

Post by mortenkols »

Is this working under Indigo 7? Im able to start Kodi, but i can't shutdown kodi. Have also tried with App Store
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Mac Commander Plugin

Post by Colorado4Wheeler »

I have this working under I7 and I use it to start and stop Plex - pretty much Kodi's kissing cousin.
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
mortenkols
Posts: 198
Joined: Wed Oct 29, 2014 2:02 pm
Location: Norway

Re: Mac Commander Plugin

Post by mortenkols »

I have tried with kodi, apple store and FaceTime. i can start the applications but i can't shut them down.

6. des. 2016, 21.31.31
Action Group new action group 2 off
EPS - Mac Commander osascript -e 'set R to "eppc://**********@192.168.*.*"' -e 'using terms from application "Finder"' -e 'tell application "FaceTime" of machine R' -e 'quit' -e 'end tell' -e 'end using terms from
Attachments
Skjermbilde 2016-12-06 kl. 21.32.09.png
Skjermbilde 2016-12-06 kl. 21.32.09.png (33.72 KiB) Viewed 6868 times
Coolcaper
Posts: 322
Joined: Fri Aug 30, 2013 9:37 pm
Location: Australia

Re: Mac Commander Plugin

Post by Coolcaper »

Any chance of choosing Airplay speakers?
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Mac Commander Plugin

Post by Different Computers »

@CoolCaper, it's possible to select AirPlay sources via AppleScripts.

http://stackoverflow.com/questions/1590 ... pplescript
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
Coolcaper
Posts: 322
Joined: Fri Aug 30, 2013 9:37 pm
Location: Australia

Re: Mac Commander Plugin

Post by Coolcaper »

Different Computers wrote:@CoolCaper, it's possible to select AirPlay sources via AppleScripts.

http://stackoverflow.com/questions/1590 ... pplescript
Sure is, thanks. Nothing better than doing it a little more indigo style.

I'm a bit wary of AppleScript at the moment after all the commotion!


Sent from my iPhone using Tapatalk
notfamous
Posts: 14
Joined: Wed May 07, 2008 11:43 am

Re: Mac Commander Plugin

Post by notfamous »

First off thanks a ton for the plugin. I'd been settling in on a long project on how to accomplish much the same with my limited scripting skills and was relieved to find someone already built that.

One feature request that I believe that would be EXTREMELY helpful that I was reckoning how to easily accomplish in script: have the plugin parse the IP address of the control page making the request (I know Indigo passes this information) and ONLY execute the command on the machine making the request.

Right now I'm setting up my control pages more as a life "dashboard" and have buttons that launch applications, like the calendar app when I tap on the calendar on my control page, or SkySafari when I click on an image of Venus on my budding "weather" page.

The thing is, I have the control page windowed on three different computers in the house (not to mention "touch" access) in different locations, like consoles (loves me some mac mini). Right now, without coming up with a bunch of code to augment the Commander with a script, the easy out is to allow Commander to launch the app on every box. But now that I better understand how it works, I know you could easily capture and use the IP request address variable to great effect.

Oh, another tip: allow multiple IP addresses comma separated.

Thanks again.

Cheers,
Tim
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Mac Commander Plugin

Post by ckeyes888 »

Should the plugin work in 10.12?
Had it working in 10.8 but no joy since I upgraded to 10.12.

Thanks,

Carl
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Mac Commander Plugin

Post by Colorado4Wheeler »

What are you trying to do and I'll see if I can do some testing on my side.
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Mac Commander Plugin

Post by ckeyes888 »

Same as before. Running an app on a remote Mac.
The apps work fine when run on the remote mac.
I don’t see any errors in the log.
If I switch back to my 10.8 install it works fine.

Thanks,

Carl
Post Reply

Return to “Other Indigo Bits and Bytes”