Disable Wi-Fi Over Night to Save Energy

This article is the first in a series where I will be discussing various topics related to MikroTik devices and their configuration.

I’ve been looking for ways to save energy and I recently discovered that turning off the Wi-Fi interfaces on my MikroTik hAP ax^3 (C53UiG+5HPaxD2HPaxD) router at night can make a difference. I used to leave my router on 24/7, but by turning off the Wi-Fi interfaces during hours when I’m not using them, I’m not only reducing my energy consumption and lowering my electricity bill, but I’m also doing my part to be more environmentally friendly. It’s a small change, but it’s an easy and effective way to make a positive impact on the planet.

To make it even easier to turn off and on my MikroTik router’s Wi-Fi interfaces, I created two schedules. One schedule turns the Wi-Fi off at 1am every night, and the other schedule turns it back on at 6am in the morning. Each schedule calls a script that turns the Wi-Fi off or on, respectively. This way, I don’t have to remember to manually turn off the Wi-Fi at night or turn it back on in the morning. The schedules and scripts do it all for me automatically. If you’re interested in doing this for your own router, I’ll show you the steps that I took to set it up.

Create the Scripts

  1. Go to your MikroTik router’s configuration (page) and navigate to System -> Scripts.
  2. Create two Scripts as shown below:

  1. Adjust the Source field´s Script to your needs:
/interface/wifiwave2/enable <interface-name>
/interface/wifiwave2/disable <interface-name>

Create the Schedules

  1. Go to your MikroTik router’s configuration (page) and navigate to System -> Scheduler.
  2. Create two Schedules as shown below:

  1. Adjust the Schedules to your needs. Name, Start Date and Start Time.
  2. Use the name of the Script in the “On Event” field to trigger the Script when the Schedule is running.

That’s all there is to it! Now, every day at 1am, the Scheduler “DisableWifiScheduler” is turning your Mikrotik router´s Wi-Fi off by calling the Script “DisableWifi”. At 6am in the morning, the Scheduler “EnableWifiScheduler” will call the Script “EnableWifi” to turn it back on.


Alternative: The Terminal Way

If you are more familiar with the Terminal, you can create the Scripts and the Schedules in four quick command lines.

Create the Scripts via Terminal

/system script add name=DisableWifi source="/interface/wifiwave2/disable <interface-name>"
/system script add name=EnableWifi source="/interface/wifiwave2/enable <interface-name>"

Create the Schedules via Terminal

/system scheduler add name=DisableWifiScheduler start-date=month/day/year start-time=hh:mm:ss interval=1d on-event=DisableWifi
/system scheduler add name=EnableWifiScheduler start-date=month/day/year start-time=hh:mm:ss interval=1d on-event=EnableWifi

UPDATE June 2023

Does it make sense to turn off wifi at night? Well, actually not really, because many devices do not work without an Internet connection. Not only does the home server stop working, but the cell phones are also causing problems. Updating is often scheduled for the night and they need a wifi connection to the Internet to load scheduled software updates. Since the distance between the main wireless devices and the router is quite large, I decided to turn off only the 5GHz wifi at night.