Is it possible to specify your own URL trigger (local IPs) on a LAN?

I have been using the Remote Trigger to initiate macros. However, I need to run the same setup in an area with zero wireless access. I am wondering if I setup my own LAN with a router and access point, if it is possible to manually code local IPs as the trigger? In other words, can I use URL triggers in a LAN environment? If so, how would I do this? Thanks so much!

Welcome to the forums!

The Remote trigger relies on a connection to a specific server maintained by @peternlewis (the developer of Keyboard Maestro) and therefore requires an Internet connection.

If I'm understanding your situation correctly, you have a wired LAN with no access to the Internet. If this is the case, you could use the Public Web trigger by setting up a web server, and it would only be "Public" in the scope of your local area network.

mild warning

If the machine serving the web server were eventually connected to the Internet, you would want to be aware of the additional security risk and ensure that your network has NAT and firewall configurations that lock down the open port from Keyboard Maestro and protect it from the open web (luckily, in this particular sense, most setups are secure by default).

Good luck, and come back with any questions!

1 Like

I have moved this question to the Questions & Suggestions category.

As @avtraino notes, you can use the inbuilt web server locally. You can also use remote Apple Events to make requests to another Mac across the network. You could presumably also use ssh to the local Macs and send commands that way (via osascript for example).

Thank you so much @avtraino and @peternlewis! I really appreciate the response. My next question is "where do I actually input the local URL string when using the Public Web Trigger? I see there is a "by URL" option dropdown but not sure if that is the right thing to be using and if so, what the URL address protocol should be.

More context. I have been using the Remote Trigger function to control a music application (Ableton Live 11). I have wireless buttons (Flic 2 and the Flic Hub) which use the URL strings provided by the Remote Trigger to trigger specfic music clips in Ableton. There are about 24 triggers in total that I use during any given performance. It works well. However, I will be running performances in areas with zero WiFi. My solve is to set up a LAN so that I can continue to use the same method - Wireless buttons (now connected only to the local network) that pass the URL string to Keyboard Maestro and trigger music clips.

Thanks so much!
J

Any place you currently call a URL like:
https://trigger.keyboardmaestro.com/t/<UniqueID1>/<UniqueID2>?TriggerValue

You can replace that URL with:
http://<hostname>:<Port>/action.html?macro=<YourMacroUUID>&value=<TheTriggerValueToPass>

<hostname> can be the local IP address of the machine serving the web server, or its "Computer Name" set in System Preferences > Sharing

1 Like