Mac Disks plugin

kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Mac Disks plugin

Post 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
Asconasny
Posts: 161
Joined: Fri Jan 16, 2015 5:05 am

Re: Mac Disks plugin

Post 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
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post by kmarkley »

Well that's embarrassing. Just released bugfix v0.0.3.

Sorry about that.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Mac Disks plugin

Post by jay (support) »

Excellent, thanks for the contribution. I'll add it into the #new4indigo queue on social media.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post by kmarkley »

Releases new version 0.0.5:

• fix Indigo server API version
• refactor for efficiency
• GitHubPluginUpdater
• tweaks and bug fixes
koburg
Posts: 167
Joined: Thu Jul 27, 2017 4:14 am

Re: Mac Disks plugin

Post by koburg »

sorry but how do I make the url for the network disk

afp://user:[email protected]/Film/Folder1 ?

it do not work like this for me so what have I done wrong ?
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post by kmarkley »

koburg wrote:afp://user:[email protected]/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.
koburg
Posts: 167
Joined: Thu Jul 27, 2017 4:14 am

Re: Mac Disks plugin

Post 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: //[email protected]
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
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post 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:[email protected]/Film /Volumes/Film
What is the result?
koburg
Posts: 167
Joined: Thu Jul 27, 2017 4:14 am

Re: Mac Disks plugin

Post 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****\"'")
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post by kmarkley »

Have you tried using the smb url in the plugin (instead of afp)?
nev
Posts: 48
Joined: Wed Aug 19, 2015 8:29 am

Re: Mac Disks plugin

Post 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!!!!!
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Mac Disks plugin

Post 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.
User avatar
durosity
Posts: 4810
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Disks plugin

Post 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.
Computer says no.
User avatar
durosity
Posts: 4810
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Disks plugin

Post 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
Computer says no.
Post Reply

Return to “kmarkley's plugins”