Page 1 of 1

Mac Disks plugin

PostPosted: Sat Feb 11, 2017 1:38 pm
by kmarkley
This is another very simple plugin (like my others), that I nevertheless find useful and hope some others will as well.

Mac Disks just presents local disks and network shares 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 did not support network shares, 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

Re: Mac Disks plugin

PostPosted: Sat Feb 11, 2017 4:18 pm
by Asconasny
Great plugin!

I´ve setup a local disk (usb) working good

network disk i get this warning:

Mac Disks Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 194, in actionControlDimmerRelay
NameError: global name 'app' is not defined


regards
Asconasny

Re: Mac Disks plugin

PostPosted: Sat Feb 11, 2017 5:43 pm
by kmarkley
Well that's embarrassing. Just released bugfix v0.0.3.

Sorry about that.

Re: Mac Disks plugin

PostPosted: Wed Feb 15, 2017 11:31 am
by jay (support)
Excellent, thanks for the contribution. I'll add it into the #new4indigo queue on social media.

Re: Mac Disks plugin

PostPosted: Sat Aug 05, 2017 11:58 am
by kmarkley
Releases new version 0.0.5:

• fix Indigo server API version
• refactor for efficiency
• GitHubPluginUpdater
• tweaks and bug fixes

Re: Mac Disks plugin

PostPosted: Mon Dec 11, 2017 3:31 pm
by koburg
sorry but how do I make the url for the network disk

afp://user:password@server.local/Film/Folder1 ?

it do not work like this for me so what have I done wrong ?

Re: Mac Disks plugin

PostPosted: Mon Dec 11, 2017 4:27 pm
by kmarkley
koburg wrote:
afp://user:password@server.local/Film/Folder1

This is the correct general form.

First, be sure that the disk is not already mounted. From the Finder, select Go->Connect to Server and enter the same URL. Does this mount the disk?

The plugin doesn't really have much debugging, but if you turn it on and post the results it might help narrow it down a little.

Re: Mac Disks plugin

PostPosted: Tue Dec 12, 2017 8:26 am
by koburg
Code: Select all
afp://Koburgstation.local/Film


This path is working on the GO to ind finder but not in the ma disk.

here is from the log:

updating states on device "nr 2 dum":
Mac Disks Debug identifier: //admin@koburgstation.local
Mac Disks Debug actionControlDimmerRelay: nr 2 dum
Mac Disks Error failed to mount volume "Film"
Mac Disks Debug mount: realpath /Volumes/Film: No such file or directory

Re: Mac Disks plugin

PostPosted: Tue Dec 12, 2017 11:56 am
by kmarkley
I'm sorry this isn't working for you. Hopefully we can figure out if the issue is the plugin or something else on your system.

The plugin just uses shell commands to mount/unmount disks. Please make sure the disk is not mounted, then open a terminal window and run these two commands (sequentially):

Code: Select all
/bin/mkdir /Volumes/Film

/sbin/mount -t afp afp://user:password@Koburgstation.local/Film /Volumes/Film

What is the result?

Re: Mac Disks plugin

PostPosted: Tue Dec 12, 2017 1:32 pm
by koburg
ok I will try this but I just got this working thru action groups also

python sript.

Code: Select all
os.system("osascript -e 'mount volume \"smb://Koburgstation/Film\" \
as user name \"****User****\" with password \"****Password****\"'")

Re: Mac Disks plugin

PostPosted: Tue Dec 12, 2017 2:20 pm
by kmarkley
Have you tried using the smb url in the plugin (instead of afp)?

Re: Mac Disks plugin

PostPosted: Sun May 06, 2018 7:59 am
by nev
I have been trying to get this network function working as well. It would be highly valuable to get this network disk function working vs the local in my view. I got it to work, but found something strange. I noticed that it would only work when I used the admin accounts for the user name and password even if the other users also were given admin access. I verified this with multiple network shares. The only accounts that worked were the system default admin accounts.

Anyways, working great now! thanks for all of this work, very useful!!!!!

Re: Mac Disks plugin

PostPosted: Sun May 06, 2018 9:18 am
by kmarkley
There is an issue with newer operating systems that I didn't realize because I was running an older one.

The traditional method of mounting a network drive no longer works because /Volumes is now a protected directory:
Code: Select all
mkdir /Volumes/DiskName
mount -t smbfs smb://user:password@DiskURL/DiskName /Volumes/DiskName

Version 0.0.9 of the plugin (just posted to plugin store) includes an option in the plugin config to use the open command instead:
Code: Select all
open -g smb://user:password@DiskURL/DiskName
This also unavoidably opens a Finder window on the network drive.

Re: Mac Disks plugin

PostPosted: Wed Sep 21, 2022 5:37 am
by durosity
I noticed the Mac Apps app has been updated for Indigo 2022.1, is there any plans for this one to be updated? Since I updated this plugin reports as working, but doesn't actually detect that disks are mounted or not.

Re: Mac Disks plugin

PostPosted: Fri Mar 17, 2023 5:27 am
by durosity
Interestingly since 2022.2 came out this now seems to be reporting disks as mounted correctly for me.. although still hoping there's gonna be a python 3 update :D