Scheduling on/off wifi

It looks like there is an uci commit missing, otherwise when you go into the Wireless Overview panel, it's going to look incorrect.

It should be:

0 23 * * * uci set wireless.wifinet2.disabled=1; uci commit; wifi
0 7 * * * uci set wireless.wifinet2.disabled=0; uci commit; wifi

The wifi command restart the whole wifi, so expect to loose ALL your wifi connections around 23h.

Just be careful that your kids never learn to pull the power plug of your router at 22:59 and to re-power it at 23:01.

1 Like

I don't think they will be able to figure that out lol, maybe when they get older.

So there is not some sort of more elobrate sceduler that will process tasks next time the router is powered noting that the job has not been processed?

It looks like the wifi sceduler app could be expanded to pick interfaces to disable quite simply it is lua scriipt based ? it is just a shame it uses cron to execute it's task which has inherent drawbacks.

:joy:

I do have these kind of smart kids... And they make me proud.

Not tested:

0/10 23,0-7 * * * uci show wireless.wifinet2.disabled | (! grep -q "='1'") && uci wireless.wifinet2.disabled=1 && uci commit && wifi
01 7 * * * uci set wireless.wifinet2.disabled=0; uci commit; wifi

Joke aside, I don't personally kill the whole kid's wifi. My intentions are different because I want to leave LAN working for them (printer, NAS, local servers, etc.). It could also send their phones to use LTE and slurping all that LTE data unknowingly. So I use the firewall to block the traffic to WAN instead with time restriction and MAC. That's another approach and depends on the amount of peripherals connected to your kids wifi.

I know that there is MAC spoofing and SSH shananigans, but this is another level of hacking...

1 Like

My kids are quite young but in time im sure they will be hacking my stuff.

Currently they sneak their tablets into their room and play movies off my plex server or you tube, there is no need for any of them to have any sort of internet or lan connection after bed time.

We get issues if I put down my phone they unlock their time with google family link without me knowing and stay up all night watching movies.

I have set up adblock but im unsure if I can apply that to a specific interface but that is my next task.

:rofl: this sounds so familiar.

The technology only goes so far. It's too stupid... I can turn off wifi or turn off the firewall and etc, but then a few minutes later there will be some legit need... like they finished their kindle book and need the next in the series. Or they have to do a school assignment, or their friend who they haven't seen in months now due to COVID wants to do a video chat. or whatever.

We have a lot of stuff scheduled, but it's just an approximation to the right policy.

I have been reading about Anacron on ubuntu is there a simular feature on openwrt to rescedule missed tasks ?

Let's hope they are not on the forum with us already :grin:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.