Automating turning off Wi-Fi at night

Our Macs are hardwired and our iOS devices use Wi-Fi. Does anyone know how to automate turning off (and then on) Wi-Fi from one of our Macs? Does Keyboard Maestro help with that? We have an Airport Extreme Router, so we would need to use Airport Utility to achieve this. Are there terminal commands to do this?

I have my router hardwired to a manual timer. That is perhaps not the ideal solution.

The next step I can imagine is to have an admin control setting to turn on/off the router. My Synology station has such an approach.

I cannot otherwise imagine how you might use any type of remote software access method to turn on a router that is turned off. It would fall back to a separate electronic switch. Perhaps this is where a WiFi/BlueTooth controllable switch would come in handy.

–
JJW

1 Like

Thanks, but I specifically do not want to turn off the router. Just Wi-Fi. Of course, I could have a wired-only router and a separate, second router for Wi-Fi access, but ideally, I’d like to just turn on and off the Wi-Fi part in the Airport Extreme and not the entire router.

Why do you want to turn off the WiFi on a schedule? Depending on what you’re trying to accomplish there may be a better way to go about it.

1 Like

Most modern routers have an option to schedule wifi.

4 Likes

Thanks for the “modern routers” comment. I need to look into this separately. Maybe time to get rid of the Airports - they’ve been working extremely reliable, though, so I’d be sad to see them go.

If you run airport utility, then go to Advanced, you’ll see a timed access setting for WiFi. It looks like you can specify a MAC address, and a schedule for access.

1 Like

You can go hi tech with programming router or adding a WeMo switch or so something as crude and efficient as this :slight_smile:

SL1500

Thanks, @JohnAtl, but this does the exact opposite of what I want. I prevents certain clients from connecting to WiFi. What I want is to switch off WiFi overnight altogether, so it should be off entirely. Like going into Airport Utility -> Wireless, then switch Network Mode to Off at a certain time, and then to “Create a Wireless Network” or “On” at another time.

I don’t actually have an airport router, so I can’t help with that, I can however agree with @vco1 that most modern routers do allow this.

I know that with my google wifi I can create a family control schedule to disable network access at certain times of the day.

The reason that I am writing this post at all is that I am curious as to why you even need this?

My assumption is that you have kids or something and you want to limit there access at so that you know they are going to bed instead of sitting on YouTube or something. Not having kids I am going to avoid suggesting how to parent them, but I would innately feel a non technical solution is best.

Back to actual solutions, if like me you have a box full of routers, what you can do is simply turn off the wifi network on your airport, drop in another router that is configured as a switch, which covers the house in wifi and then as others have suggested, place that on a power point timer.

Like others, I too am curious as to why you want to turn off the WiFi at certain times.

Anyway, there is (or was) a utility for controlling Airport routers:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

You might want to consider symlinking to a more convenient path.

Assuming it still exists, which I would think is the case since the Airport routers are still for sale, you could experiment with that to see if it has the functionality you need, then use the facility in Keyboard Maestro to schedule via cron to execute the appropriate shell scripts. Note that your Mac needs to be awake at the appropriate times for the KM macro to work. There is also a way from the command line to schedule times for waking up. I cannot recall the command right now; it’s been a while since I last played with this, but if you cannot find it I can probably find the scripts I wrote when I was experimenting with that.

Of course Apple might eventually kill off this utility now that they have killer off the Airport product line, so this may only be a temporary solution.

I believe this is for controlling ‘airport’ on the computer itself, rather than an Airport router.

Here are some pieces that might be helpful, though I know nothing about them. Looks interesting though.

It looks like the property raSt is Wireless Network Mode and setting that to 3 will disable wireless. But then there is bsNM, which also says it is Wireless Mode.

KISS

Install a 2nd WiFi router in bridge mode. Change the WiFi password on your main router and connect the kids to the new WiFi network. Connect the new “kids” router to an old-school timer and call it a day :rofl:

If you are versed in networking you can assign a V-Lan to this 2nd router, and enable L2 isolation on their WiFi network. Crank up the firewall settings and add OpenDNS to their network and call it a day.
Whatever they do want effect your network…

1 Like

Thanks to everyone for contributing. I will go with a second router in bridge mode that handles WiFi and then put it on a timer.
Why am I doing it? We have a “no-ray” policy at home at night, so DECT phones, WiFi and everything else emitting rays gets switched off during certain hours. I know many here believe these are not harmful or its harm might be negligible. I tend to disagree. Also, depending on your neighbors, your home might get lit at night by their equipment, but at least I can shut down what we control. And radio signals, cell phone signals and very soon 5G also penetrate our house. Nothing we can do against it, but at least we can stop contributing to the “electro-smog” while we are sleeping.

1 Like

Well you can always shield your :house_with_garden:

2 Likes

We can argue the differences of this in summer versus winter. In any case, presuming the comment is serious, we have no way to shut off our radiation other than that we are dead, which is rather silly to say the least. Otherwise, the remark might benefit from an emoticon or such to indicate that it is somewhat tongue-in-cheek :stuck_out_tongue: rather than tending potentially to snarky.

—
JJW

2 Likes

Please note, @veit is looking for a solution to his wish to turn off Wi-fi at night, we’re here to discuss that.

3 Likes

Here in the UK British Telecoms Hub 6 allows it’s wifi to be turned off and back on at any preset time during the day… Is that not common?https://en.m.wikipedia.org/wiki/BT_Smart_Hub. Having been with BT over the last 15 I’ve never used anyone else modem/router units so sorry to say my experience is limited.