Mac Disks plugin

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

Mac Disks plugin

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

Posted on
Sat Feb 11, 2017 4:18 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Mac Disks plugin

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

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

Re: Mac Disks plugin

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

Sorry about that.

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 Disks 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 11:58 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Disks plugin

Releases new version 0.0.5:

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

Posted on
Mon Dec 11, 2017 3:31 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Disks plugin

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 ?

Posted on
Mon Dec 11, 2017 4:27 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Disks plugin

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.

Posted on
Tue Dec 12, 2017 8:26 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Disks plugin

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

Posted on
Tue Dec 12, 2017 11:56 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Disks plugin

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?

Posted on
Tue Dec 12, 2017 1:32 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mac Disks plugin

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****\"'")

Posted on
Tue Dec 12, 2017 2:20 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Disks plugin

Have you tried using the smb url in the plugin (instead of afp)?

Posted on
Sun May 06, 2018 7:59 am
nev offline
Posts: 48
Joined: Aug 19, 2015

Re: Mac Disks plugin

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!!!!!

Posted on
Sun May 06, 2018 9:18 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Mac Disks plugin

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.

Posted on
Wed Sep 21, 2022 5:37 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Disks plugin

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.

Posted on
Fri Mar 17, 2023 5:27 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Mac Disks plugin

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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 15 guests