Page 1 of 1
Rules that operate on selected wifi network

Posted:
Tue Mar 25, 2014 2:27 am
by acuriouslad
Is it possible to run a rule only if my Macbook Air is connected to certain wifi network?
Hence, moving movies I have downloaded from my iPhone to my network attached disk on my Airport Extreme Base Station and then deleting them to save room?
Re: Rules that operate on selected wifi network

Posted:
Wed Mar 26, 2014 12:23 pm
by Mr_Noodle
You'll have to use a custom script for that or if you just setup a rule to copy to an unavailable drive, Hazel will run the rule when you connect the drive later. I have thought about adding an attribute like "Network location" where you can configure things to be based off of wi-fi network if you wish but I'm still ascertaining whether it's really needed given that Hazel should handle off-line drives.
Re: Rules that operate on selected wifi network

Posted:
Thu Mar 27, 2014 12:43 am
by acuriouslad
Thanks Mr Noodle!
Will Hazel give me errors every time it tries to run and the drive isn't found?
Re: Rules that operate on selected wifi network

Posted:
Fri Mar 28, 2014 3:03 pm
by Mr_Noodle
Whoops, I just noticed that this was posted in the wrong forum. In the future, please keep questions out of the Tips forum. That is for people posting tips, not asking for them.
Re: Rules that operate on selected wifi network

Posted:
Mon May 19, 2014 5:51 pm
by chambrick
I'd like to re-ask the question above?
How does Hazel handle drives that are unavailable? Does it just log an error and move on? What is the interval that it checks? This is important to know so I know how quickly it will start processing once the drive is available again, as well as how much processing is happening by feeble attempts to connect when it's not available.
Re: Rules that operate on selected wifi network

Posted:
Wed May 21, 2014 4:56 pm
by Mr_Noodle
There are various factors, but in the best case, it won't do much processing at all when it detects it is offline. Worst case, it will use a back-off strategy where the check times become larger and larger. When a drive is mounted, it will detect it fairly quickly since there is a system notification for that.
Re: Rules that operate on selected wifi network

Posted:
Wed Aug 20, 2014 12:15 am
by ManhattanBeachBum
You can try using the free ControlPlane app:
http://www.controlplaneapp.comIt figures out your location based on rules you specify (which wifi you are connected to, what disks are mounted, etc.) Based on your location you can automatically perform actions (mount drives, change default printer, run shell scripts, etc.)
My MacBook Air automatically makes adjustments based on whether I'm at work or home. I'm sure you can find a way of using that to trigger something in Hazel. You could have it create a file that Hazel is looking for which triggers other actions or something like that. It's similar to Hazel in that it's very, very flexible.
Re: Rules that operate on selected wifi network

Posted:
Sat Dec 24, 2016 12:57 pm
by Zigzagi
Mr_Noodle wrote:You'll have to use a custom script for that or if you just setup a rule to copy to an unavailable drive, Hazel will run the rule when you connect the drive later. I have thought about adding an attribute like "Network location" where you can configure things to be based off of wi-fi network if you wish but I'm still ascertaining whether it's really needed given that Hazel should handle off-line drives.
I think it is important that network name attributes are allowed. That way, it will make creating rules more flexible for non-programmers.
I have a rule to move files to my network drive once my mac is connected to the particular wifi network.
When I am not connected to the particular network, Hazel runs but gives errors. I will prefer it to not run until my mac is connected to the particular network.