Disable Wifi by Timer

March 17, 2024

Disable Wifi by Timer

Alexa is still asleep… go back to bed.

Some people are night owls, whilst others are early birds.

Then there are children…

In my house, despite making it clear when is an acceptable time to get out of bed and when not, this is not always stuck to by the younger family members.

When this happens, the TV and Firestick are usually on within seconds.

This isn’t so bad if the kids are good at turn taking (!) but can be a problem if it turns into a race for who gets the remotes first thing in the morning… and waking up earlier and earlier gets a bit too frequent..

The power of automation has made things a little less disruptive and the kids a bit less tired.

Firestick can't connect to the Internet.

Private LAN, Wifi and Broadband

It is important to note the difference between these three things if you are not familiar with them.

  • Your Private LAN (Local Area Network) is the network that runs in your house, and can consist of wired and wireless (wifi) ethernet connections between devices. It may only exist as a wifi network from your home router, or could be a wired network with no wifi.

  • Wifi is the wireless networking, equivalent to the wired ethernet cables in a wired network. Usually wifi has some security details - a network name (also known as a Service Set ID - SSID) and a network key or password to connect to it.

  • Broadband is the connection out to the Internet from the home (assuming you’re not on dialup or another network connection type).

  • When someone says something like “My E-Corp Wifi has gone down - is anyone else’s working? " in a community group they actually mean the broadband not the wifi.

  • In this article, when I refer to wifi or wireless networks it means just that - networks that form part of your home Private LAN.

We Didn’t Start The Fire

If you have a Smart TV or Firestick adapter - or in fact any wifi capable device that does not have a physical Ethernet port - your only option for connecting them to the Internet is via Wifi.

Yes, there are additional adapters that you can buy, but for sake of argument, this approach will work for anything where Wifi is the only option.

Each Wifi capable device typically has one or more wireless network name and key stored away so that when they get within range of that network, they can connect.

Putting Out Fires

To stop a wifi enabled device from connecting to a network, the easiest thing to do is to remove the network. This could be done by disabling the interface on the router, or by changing the name or key of the Wifi network on the router.

This is easier on some devices than others, so it may or may not be an option for you. If you use a Mikrotik Access Point / Router, it is very straightforward.

Mikrotik devices

Whilst they are well known in some parts of the world, Mikrotik is not well known in the UK. This is a shame as their devices provide enterprise level configuration at consumer level prices.

Mikrotik routers, switches and access points run their own RouterOS. Whilst these have a browser based interface, Windows application and an Android Mikrotik application for GUI based configuration, they also have a powerful command line, similar to enterprise networking equipment by Cisco, Juniper and so on.

As such, they can be scripted for all sorts of different uses… provided you’re prepared to do a bit of testing and aren’t afraid to factory reset them if you get locked out.

The Mikrotik Access point I used can be found here on Amazon.com and here on Amazon.co.uk.

Mikrotik setup

On a Mikrotik device, the easiest way to stop Wifi devices connecting is to change the network name.

To do this, you will need to configure:

  • A script command to rename the network.

  • A scheduler job to run the rename script at a specified time.

  • A script command to revert the renamed wireless network back to its original name.

  • A scheduler job to run the revert script at a specified time.

The scripts will need to reference the wireless network interface and the SSID, and will work with both main wireless interfaces and virtual ones for guest networks.

Rename wifi:

/interface wireless set wlan1 ssid="inactive"
/interface wireless set wlan2 ssid="inactive"

Revert:

/interface wireless set wlan1 ssid="myhotspot"
/interface wireless set wlan2 ssid="myhotspot"

In Winbox or the Mikrotik browser interface, go to System > Scripts and create the rename and revert scripts.

Renamed network in Mikrotik step 1.

Next go to System > Scheduler and create the scheduler jobs that reference the script - make sure that these are set to run on the next occurrence, and that the interval is set to “1d 00:00:00” to run on a daily basis.

Renamed network in Mikrotik step 2.

A video demonstration can be found here.

Other Routers and Access Points

Making changes to other routers and access points may not be so easy, but there are options.

  • Some routers will have an SSH or other command line option.

  • It is possible to script the connection and settings change commands to these in principle by scripting externally (eg on a Windows or Linux machine on the network) and connecting to the access point on a schedule.

  • If you can’t access a router or access point, Mikrotik devices can be set to “Access Point only” and plug into a router Ethernet port.

  • The “thermonuclear option” is to put the router or access point onto a mains plug timer set to turn off before the kids usually get up, and then on when you are happy for them to start accessing the technology.

Conclusion

Hopefully this post can help some parents regain control of their mornings! There are multiple options open to anyone, even if it is the “thermonuclear” scheduled power-off.