Mac Apps plugin

Posted on
Sat Feb 11, 2017 1:39 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Mac Apps plugin

This is another very simple plugin (like my others), that I nevertheless find useful and hope some others will as well.

Mac Apps just presents applications/helpers/daemons as Indigo relay devices and reports some statistics about them.

This is a half-replacement for the Mac System plugin, which unfortunately has not been updated in a while. A separate plugin replaces the other functionality of Mac System.

(I used, and relied on, Mac System but it stopped working with some applications, and I got infrequent but persistent "ServerCommunication" errors that I could never quite track down. So I decided to take the basic concept and rewrite it from scratch.)


Details: https://github.com/kmarkley/Indigo-Mac- ... /README.md
Download: https://github.com/kmarkley/Indigo-Mac- ... ses/latest

Posted on
Wed Feb 15, 2017 11:31 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Mac Apps plugin

Excellent, thanks for the contribution. I'll add it into the #new4indigo queue on social media.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Aug 05, 2017 10:00 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

New version 0.0.4 released:

• fix Indigo server API version
• get cores count from `sysctl`
• refactor for efficiency
• GitHubPluginUpdater
• tweaks and bug fixes

Posted on
Sat Aug 05, 2017 11:00 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Apps plugin

Thanks for building this plugin.. I also used the old Mac System plugin until it was abandoned.. this one is much more stable!

Computer says no.

Posted on
Sun Jan 14, 2018 7:34 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

this is a very cool plugin

I have tested some apps

there is one app which I can not turn on but I can close it which is most important
is it the app not allowing it or something like that ?

Posted on
Sun Jan 14, 2018 8:23 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

Hi koberg. That is a little unusual.

First, check if the application has a ".app" extension (possibly hidden). If you don't see it in the Finder, choose File>Get Info from the menu, and disclose the Name & Extension section.

If the application does not have a ".app" extension, use the Helper type plugin device in Indigo.

If that doesn't fix it, I'll need some more information. Like the name and full path to the application.

Posted on
Sun Jan 14, 2018 8:29 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

one question is it because it is located like this?

applications / Cisco / Cisco AnyConnect Secure Mobility Client.app

in a folder ?

I can still quit it when it is launched but it say error quitting but it quits
and also say error launching but do not launch in the event log.

Posted on
Sun Jan 14, 2018 8:35 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

all right I got it running it was the folder I forgot sorry.

I can now start and quit it I use the command "other process name" to quit

and it is working now but still got this error

Code: Select all
Mac Apps Error                  failed to quit application "Cisco/Cisco AnyConnect Secure Mobility Client"


but quit and launch is working.

Posted on
Sun Jan 14, 2018 9:02 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

You may still have the folders wrong. I think the first part should look like this.
Attachments
Screen Shot 2018-01-14 at 9.00.05 AM.png
Screen Shot 2018-01-14 at 9.00.05 AM.png (73.14 KiB) Viewed 5465 times

Posted on
Sun Jan 14, 2018 9:06 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

yes that is also working did that thanks

still got this error in the log

Code: Select all
Mac Apps Error                  failed to quit application "Cisco AnyConnect Secure Mobility Client"


but still quit

Posted on
Sun Jan 14, 2018 9:26 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

Turn on debug logging for the plugin and try again. That should provide more information on the error.

I suspect you may be better off with using the forced quit method. Try it and see if there are any adverse effects.

Posted on
Sun Jan 14, 2018 10:15 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

here is what the log says
whiteout force quit
Code: Select all
Mac Apps Debug                  updating states on device "NewsHosting VPN":
   Mac Apps Debug                      elapsed_secs: 1606
   Mac Apps Debug                      elapsed_time: 26:46
   Mac Apps Debug                       percent_cpu: 0.025
   Mac Apps Debug                  actionControlDimmerRelay: cisco vpn
   Mac Apps                        launching application "Cisco AnyConnect Secure Mobility Client"
   Mac Apps                        "cisco vpn" on
   Mac Apps Debug                  updating states on device "cisco vpn":
   Mac Apps Debug                      elapsed_time: 00:00
   Mac Apps Debug                        last_start: 2018-01-14 17:12:17
   Mac Apps Debug                        onOffState: True
   Mac Apps Debug                       percent_cpu: 5.7875
   Mac Apps Debug                       percent_mem: 0.1
   Mac Apps Debug                        process_id: 5079
   Mac Apps Debug                    process_status: running
   Mac Apps Debug                  actionControlDimmerRelay: cisco vpn
   Mac Apps Error                  failed to quit application "Cisco AnyConnect Secure Mobility Client"
   Mac Apps Debug                  62:66: execution error: Cisco AnyConnect Secure Mobility Client modtog en fejl: Bruger annullerede. (-128)
   Mac Apps                        "cisco vpn" off
   Mac Apps Debug                  updating states on device "cisco vpn":
   Mac Apps Debug                      elapsed_time:
   Mac Apps Debug                        onOffState: False
   Mac Apps Debug                       percent_cpu: 0.0
   Mac Apps Debug                       percent_mem: 0.0
   Mac Apps Debug                        process_id:
   Mac Apps Debug                    process_status: off


The force quit is not working as good I have to hit off twice before it is working but in normal mode it is working first time. but also with the error.

force quit.

Code: Select all
   Mac Apps Debug                  updating states on device "NewsHosting VPN":
   Mac Apps Debug                      elapsed_secs: 1727
   Mac Apps Debug                      elapsed_time: 28:47
   Mac Apps Debug                       percent_cpu: 0.0375
   Mac Apps Debug                  validateDeviceConfigUi: application
   Mac Apps Debug                  deviceStopComm: cisco vpn
   Mac Apps Debug                  deviceStartComm: cisco vpn
   Mac Apps Debug                  actionControlDimmerRelay: cisco vpn
   Mac Apps                        launching application "Cisco AnyConnect Secure Mobility Client"
   Mac Apps                        "cisco vpn" on
   Mac Apps Debug                  updating states on device "cisco vpn":
   Mac Apps Debug                      elapsed_secs: 1
   Mac Apps Debug                      elapsed_time: 00:01
   Mac Apps Debug                        last_start: 2018-01-14 17:14:31
   Mac Apps Debug                        onOffState: True
   Mac Apps Debug                       percent_cpu: 5.5625
   Mac Apps Debug                       percent_mem: 0.1
   Mac Apps Debug                        process_id: 5147
   Mac Apps Debug                    process_status: running
   Mac Apps Debug                  actionControlDimmerRelay: cisco vpn
   Mac Apps Error                  failed to quit application "Cisco AnyConnect Secure Mobility Client"
   Mac Apps Debug                  command not available
   Mac Apps Debug                  updating states on device "cisco vpn":
   Mac Apps Debug                      elapsed_secs: 5
   Mac Apps Debug                      elapsed_time: 00:05
   Mac Apps Debug                       percent_cpu: 0.0
   Mac Apps Debug                       percent_mem: 0.2
   Mac Apps Debug                  actionControlDimmerRelay: cisco vpn
   Mac Apps                        quitting application "Cisco AnyConnect Secure Mobility Client"
   Mac Apps                        "cisco vpn" off
   Mac Apps Debug                  updating states on device "cisco vpn":
   Mac Apps Debug                      elapsed_secs: 0
   Mac Apps Debug                      elapsed_time:
   Mac Apps Debug                        onOffState: False
   Mac Apps Debug                       percent_mem: 0.0
   Mac Apps Debug                        process_id:
   Mac Apps Debug                    process_status: off

Posted on
Sun Jan 14, 2018 11:41 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

Looks like your application isn't playing nice with System Events, which is why you get a "user cancelled" error. Not much I can do about this beyond suggesting you use the force option.

The force error looks like you just tried it too soon. There is a short delay before the force command will work. I see now how I can improve the plugin and eliminate the delay. But in the meantime if you wait 10sec or so before turning off the device, it should work.

Posted on
Sun Jan 14, 2018 12:47 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Apps plugin

okay thanks

Posted on
Sun Jan 14, 2018 2:06 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Apps plugin

New version 0.0.6 posted to plugin store (also available via plugin update menu item):

• Fixed bug where force off (kill) command was not available until device had completed a full update cycle.
• Fixed rare (split-second timing) bug when ps data changed just prior to device update method being called.
• Split device types into sub-classes for readability improvement

Who is online

Users browsing this forum: No registered users and 1 guest