Introduction
This plug-in allows to declare as devices : disk volumes and applications.
For disk volumes :
- allows to mount/unmount volumes,
- has an option to force unmount,
- prevent sleeping (option) of volumes,
- launch/quit application,
- can close the application window to do a kind of "silent" launch,
- has an option to force quit application
Typical use of this plugin is managing an iTunes instance as a media server, on the same mac than the Indigo server. The kind of scenarios I use are :
- Turn on the media service :
- When the house wakes up, a trigger turns on the raid disk (using a reay device)
- When the disk volume is mounted (i.e. disk volume device becomes on), a trigger launches iTunes by setting the Application device to On
- Then you can use iTunes Plug-in or Airfoil plugin as usual
- Turn off the media service :
- When the house goes to sleep, a trigger sets the application device to off to stop iTunes,
- When iTunes device is off, a trigger unmount the disk volume (i.e. sets disk volume device to off),
- When the disk volume is off, then the raid drive relay device is set off.
Plugin setup
Release history and latest version are here : https://github.com/bipphilippe/Indigo-D ... m/releases .
The plug-in configuration contains only elements for debug purpose.
Application device
This type of device is mainly dedicated to usual MacOS X applications, i.e.: softwares with a .app extension, mainly installed in the Applications folder.
Configuration
To create a device looking for an Application, create a new device of Type "Mac System" and Model "Application".
The name used in this screen does not need to be the name of the application.
The basic device settings allow you to define :
- The name of the application without the .app extension; this name is case sensitve.
- Close window after launch without stopping the application (using a standard applescript script).
- "Force quit" if you want the application to be forces quit when the device is set to off by the user. Force quit allow to prevent the application staying open because of an opened dialog box but will close the application without saving data.
- "Use special path" if your application is not in the application directory.
- "Use special process name" if the process name created by the application is not the same that the name of the application.
- "Use special special windows close command if you want to use another applescript that the basic one to close the application window after launch.
States
The device has the following states :
- On/Off: according if the application is running or not
- Process ID: Id of the mac OS process running the application
- Process Status: a value between :
- Idle : process that is sleeping for longer than about 20 seconds (reflected by a "paused" status icon)
- Running : process that is running or sleeping for less than about 20 seconds
- Stopped : stopped process (reflected by a "stopped" status icon)
- Waiting : process in uninterruptible wait (reflected by a "paused" status icon)
- Zombie : dead process (a ``zombie'') (reflected by a "red circle" status icon)
- Off : no process running
- Last start time
- Elapsed running time
- Percentage CPU usage
- Percentage memory usage
Action
The device has the following Action :
- "Close application window" that allows to call the script defined to close the application windows.
Helper device
This type of device is mainly dedicated to helper applications. These applications are often launched when you open your session. They are not located in the Applications folder but behave in some way as an application. You can start and stop them using the device if needed.
Configuration
To create a device looking for an Application, create a new device of Type "Mac System" and Model "Helper Application".
The name used in this screen does not need to be the name of the helper application.
The device settings screen allows you to define :
- The helper Application Name, without .app extension.
- The helper application directory path. This path is not the standard Application directory. It is something more complex that I will explain hereafter.
In the majority of the Application Helpers, these ones are launched during user session opening. The list of the helpers can be seen in the Mac system preferences called "users and group".
On the "Login Items" tab, you can see a list of items.
Some of them are Application Helpers.
If you find the one that you are looking for, just right-click on it and select "Reveal in finder".
This will open a finder window, with the Helper Application selected.
The name of the application is to be keyboarded in the device configuration " Helper Name" item.
The path to the directory that has been open is to be keyboarded in the device configuration " Helper directory path" item.
A sticky note in this forum is tracking log of all the Helper configuration that I tried or that users gently signaled to me : http://forums.indigodomo.com/viewtopic. ... 62&t=14182.
States
The device has the same states that the Application device.
Action
The device has no Action defined.
Daemon device
This type of device is mainly dedicated to daemon processes. These processes are often launched when you open your session. They are not located in the Applications folder and do not behave as an application. You can stop them using the device but it is not guaranteed that you can start them.
Configuration
To create a device looking for an Application, create a new device of Type "Mac System" and Model "Daemon".
The name used in this screen does not need to be the system name of the daemon.
The device settings screen allows you to define :
- The daemon process name.
- The daemon full path and name, that will be used to start or stop the daemon using the two following parameters.
- The deamon start command arguments. They are used to ask to the daemon manager to start it. It allows the "On" command of the device to work.
- The deamon stop command arguments. They are used to ask to the daemon manager to gently stop it. Leaving it empty will do a forced quit on "Off" command.
A sticky note in this forum is tracking log of all the daemon configuration that I tried or that users gently signaled to me : http://forums.indigodomo.com/viewtopic. ... 62&t=14182.
States
The device has the same states that the Application device.
Action
The device has no Action defined.
Disk volume device
Configuration
To create a device looking for a disk volume, create a new device of Type "Mac System" and Model "Disk Volume".
The name used in this screen does not need to be the name of the volume.
The device settings allow you to define :
- The name of the volume ; this name is case sensitve.
- Check "Force unmount" if you want the application to be forced unmount when the device is set to off by the user. Force quit allow to prevent the volume staying mounted because of an opened file but will unmount without saving data.
- Check "Keep awaken" if you want the disk to say awake even if your Mac preferences are set to make the disks to sleep. I use it for my RAID drive as it is too slow to wake up, allowing the other drive going to sleep as usual.
States
The device has the following states :
- On/Off : according if the volume is mounted or not
- Volume type: type of the file system
- Volume size: size of the volume
- Volume device: system device hosting the volume
- Volume Status: one value between these ones :
- On: the volume is mounted and available
- Not mounted: the disk is powered on but the volume in not mounted (reflected by a "stopped" status icon)
- Off: the disk is powered off (or not plugged in)
- Last awake ping time: last time a waking up signal has been sent to the volume by the plug-in (when "Keep awaken" option is on)
- Used percentage: % of disk used