App that turns wifi on and off

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Turns WiFi on and off according to a schedule on an openwrt router

newkit/luci-app-wifischedule

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Turns WiFi on and off according to a schedule on an openwrt router

  • wifischedule: Shell script that creates cron jobs based on configuration provided in UCI and does all the other logic of enabling and disabling wifi with the use of /sbin/wifi and /usr/bin/iwinfo . Can be used standalone.
  • luci-app-wifischedule: LUCI frontend for creating the UCI configuration and triggering the actions. Depends on wifischedule.

You can create user-defined events when to enable or disable WiFi. There are various use cases why you would like to do so:

  1. Reduce power consumption and therefore reduce CO2 emissions.
  2. Reduce emitted electromagnatic radiation.
  3. Force busincess hours when WiFi is available.

Regarding 1: Please note, that you need to unload the wireless driver modules in order to get the most effect of saving power. In my test scenario only disabling WiFi saves about ~0.4 Watt, unloading the modules removes another ~0.4 Watt.

Regarding 2: Think of a wireless accesspoint e.g. in your bedrom, kids room where you want to remove the ammount of radiation emitted.

Regarding 3: E.g. in a company, why would wireless need to be enabled weekends if no one is there working? Or think of an accesspoint in your kids room when you want the youngsters to sleep after 10 pm instead of facebooking.

You can create an arbitrary number of schedule events. Please note that there is on sanity check done wheather the start / stop times overlap or make sense. If start and stop time are equal, this leads to disabling the WiFi at the given time.

Читайте также:  Настройка адаптера wifi atheros

Logging if enabled is done to the file /var/log/wifi_schedule.log and can be reviewed through the «View Logfile» tab. The cron jobs created can be reviewed through the «View Cron Jobs» tab.

Please note that the «Unload Modules» function is currently considered as experimental. You can manually add / remove modules in the text field. The button «Determine Modules Automatically» tries to make a best guess determining regarding the driver module and its dependencies. When un-/loading the modules, there is a certain number of retries ( module_load ) performed.

The option «Force disabling wifi even if stations associated» does what it says — when activated it simply shuts down WiFi. When unchecked, its checked every recheck_interval minutes if there are still stations associated. Once the stations disconnect, WiFi is disabled.

Please note, that the parameters module_load and recheck_interval are only accessible through uci.

UCI Configuration wifi_schedule

UCI configuration file: /etc/config/wifi_schedule :

config global option logging '0' option enabled '0' option recheck_interval '10' option modules_retries '10' config entry 'Businesshours' option enabled '0' option daysofweek 'Monday Tuesday Wednesday Thursday Friday' option starttime '06:00' option stoptime '22:00' option forcewifidown '0' config entry 'Weekend' option enabled '0' option daysofweek 'Saturday Sunday' option starttime '00:00' option stoptime '00:00' option forcewifidown '1' 

This is the script that does the work. Make your changes to the UCI config file: /etc/config/wifi_schedule

Then call the script as follows in order to get the necessary cron jobs created:

wifi_schedule.sh cron|start|stop|forcestop|recheck|getmodules|savemodules|help cron: Create cronjob entries. start: Start wifi. stop: Stop wifi gracefully, i.e. check if there are stations associated and if so keep retrying. forcestop: Stop wifi immediately. recheck: Recheck if wifi can be disabled now. getmodules: Returns a list of modules used by the wireless driver(s) savemodules: Saves a list of automatic determined modules to UCI help: This description. 

About

Turns WiFi on and off according to a schedule on an openwrt router

Источник

How to Turn Off Wi-Fi Automatically? (4 Ways to Turn Wi-Fi Off)

As humans, we always look for ways to simplify our lives. From the transport means to the tools we use at work. It is no surprise that we also want to avoid daily repetitive tasks such as toggling Wi-Fi on and off .

The challenge arises when you realize information on automating this simple task is hard to find. Take a sigh of relief as we look into different ways to turn off your Wi-Fi automatically.

How to Turn Off Wi-Fi AutomaticallyWhy Is it Necessary to Turn Off Your Wi-Fi?

There are many reasons for you to turn off your Wi-Fi. Some of them include:

  • Wi-Fi routers operate using electricity. When you are not using Wi-Fi, switching it off is advisable to cut electricity bills and conserve energy. We’re all trying to be greener, aren’t we?
  • Wi-Fi emits radio-frequency waves, which is a form of radiation. Switching off the Wi-Fi router cuts off these emissions that are dangerous to human health (in large doses).
  • Even though manufacturers make routers to withstand 24/7 use, switching off your router at night ensures better protection against damage by power surges and prolongs the life of your router.
  • Switching off the router enhances the signal quality in the morning. Daily rebooting sorts out technical issues from the previous night.
Читайте также:  Забыл пароль от настроек wifi

How Do You Turn Wi-Fi Off Automatically?

Turning Wi-Fi off automatically is definitely better than doing it manually. Manual methods will become tedious over time since you have to unplug (or turn off) the router every night. Using automatic methods makes things much easier You just have to create a schedule once, and you don’t have to think about it after.

There are a bunch of ways to set your router to automatically go off and back on within the periods you set. We look into these methods in the sections below. These methods are efficient and easy to use since they require one-time configuration and nothing more.

A mechanical or digital outlet timer needs to be plugged into a wall socket. The router’s power cable is then plugged into the power port on the timer. The steps to set it up are simple and easy to follow.

Outlet Timer

Check the plugs on your timer to ensure they are compatible with your wall socket outlet. First, you have to plug the timer into an outlet and turn on the switch. Input the time you want your timer to go off and back on using its dials (or keys).

Recommended reading:

Plug the router into the timer since both need power to work efficiently. You will not need to make any further adjustments to the timer as long as the timer has a power supply throughout.

If you wish to change the time your router goes off, change the intervals on the timer.

If your router has a built-in timer, you won’t have to use the timer outlet. It is a better feature since it works best for parental control and allows remote access.

You need to log in to your router’s management page and navigate to the router settings to access this feature. The steps vary depending on the type of router you have. However, they are usually under parental control settings . To be sure, consult your router’s manual or contact the manufacturer.

You can set the inbuilt timer to cut the internet connection at particular times and turn it back on when you want to use the internet.

Note: This method doesn’t disable your Wi-Fi – it just prevents devices from connecting to Wi-Fi. So, if you want to completely turn your Wi-Fi off, this is not a viable option.

Some Internet service providers and router manufacturers have applications that allow you to access the router through your phone and control all the settings. Good examples are the Google Home app, NETGEAR Nighthawk app, and TP-Link. Once you download these applications, they give you access to the router’s settings and allow you to set on and off times.

Some other providers may not have applications to help you access your router remotely. In this case, third-party apps such as Tasker can be useful. With this particular app, you get to turn off Wi-Fi on your phone automatically. The timer will automatically go on and off according to the task you created in the app.

Читайте также:  Pixma g3411 настроить wifi

VIDEO TUTORIAL – How to Create a Wi-Fi Auto OFF Task in Tasker

Note: Third-party apps you install on your phone, like Tasker, can disable Wi-Fi on your phone, but will not disable Wi-Fi on your router – your router will still send the Wi-Fi signal.

Every router has the so-called default IP address that you can use in a browser to access the router settings. When you access the settings page, you can control the router and enable/disable Wi-Fi or create a schedule (on some router models) that would disable the Wi-Fi automatically. With these schedulers, you can disable Wi-Fi overnight or during any time of day.

The first step is to key in the default IP address in your Web browser’s search bar and press enter. The most common addresses used by various router models are 192.168.0.1 and 192.168.1.1. Then, you will have to key in your password and router address in order to log in. They are usually found on a label at the back of your router.

Once you log in, you will have to look for a Wi-Fi scheduler. It is often located under Wireless Settings > Advanced. Below, you can see how to disable Wi-Fi automatically on a NETGEAR router.

STEP 1 – Go to Wireless > Advanced tab > Wireless Settings . You can set a separate schedule for 2.4 and 5 GHz – you can disable one or both bands. Click on Add a New Period .

STEP 2 – Set Start/End times and Recurrence Pattern . You can select just certain days or create a daily Wi-Fi AUTO OFF Schedule.

Conclusion

Setting your router to switch itself on or off automatically simplifies one more aspect of your life. The various methods listed above ensure you do not have to go to your router every night and turn it off. We hope our tips made your life a little bit easier.

Hey, I’m Jeremy Clifford. I hold a bachelor’s degree in information systems, and I’m a certified network specialist. I worked for several internet providers in LA, San Francisco, Sacramento, and Seattle over the past 21 years.

I worked as a customer service operator, field technician, network engineer, and network specialist. During my career in networking, I’ve come across numerous modems, gateways, routers, and other networking hardware. I’ve installed network equipment, fixed it, designed and administrated networks, etc.

Networking is my passion, and I’m eager to share everything I know with you. On this website, you can read my modem and router reviews, as well as various how-to guides designed to help you solve your network problems. I want to liberate you from the fear that most users feel when they have to deal with modem and router settings.

My favorite free-time activities are gaming, movie-watching, and cooking. I also enjoy fishing, although I’m not good at it. What I’m good at is annoying David when we are fishing together. Apparently, you’re not supposed to talk or laugh while fishing – it scares the fishes.

Источник

Оцените статью
Adblock
detector