macOS 10.14: switch Bluetooth on/off based on location

I use the same laptop in 2 locations. In one location I use bluetooth to operate the mouse and keyboard, whereas in the other I don't use bluetooth at all.

Apart from the seemingly defunct ControlPlane and Macro Polo there any way to automatically switch bluetooth on/off based on my location on macos 10.14 (i.e. when I am connected to a specific Wifi), i.e. via the Automator or scripting?

PS: I'm aware that the question has been asked before (Automatically turn bluetooth on or off depending on current network (MBP running Lion)). But the URL in the accepted answer is broken and ControlPlane has numerous issue with macOS Sierra and later, as well as in the developers own words "This project is in need of assistance.". So IMO the accepted answer is no longer a viable solution for macOS. The other answer using Macro Polo has not been supported since Snow Leopard, and ControlPlane is a direct port of it.


Solution 1:

This is just one of the many things that you can do with Keyboard Maestro which is $36 but which enables you to do at least 1,000 different things with your Mac. You can have triggers for sleep/wake, or when you are on a certain Wi-Fi network, or at specific times of day, etc.

Those triggers can then run AppleScript events, or execute keyboard commands, or mouse commands, or shell scripts, or a large suite of actions built-in to Keyboard Maestro.

You can download it here for free and try it for ~30 days.

The developer is very responsive to emails, as well as hosting an active discussion forum where the developer is active, but so are many Keyboard Maestro users (including me).