Community discussions

 
Binser
just joined
Topic Author
Posts: 24
Joined: Fri Dec 28, 2018 7:50 pm

Script to disable Wlan when no user are logged on

Tue Jun 11, 2019 8:46 pm

Hello,

I am well on my way to make our MikroTiks environmentally friendly. I have reduced their power output, assigned the mode button to switch wlan on or off, and now I would like the router to disable wlan when all users have disconnected from wlan.

But I haven't figured out this last part yet.

Do you have any ideas how my script can tell that noone is logged on wlan?

Thanks. :)
 
sid5632
Member
Member
Posts: 323
Joined: Fri Feb 17, 2017 6:05 pm

Re: Script to disable Wlan when no user are logged on

Wed Jun 12, 2019 1:46 am

Are you going to enable the WLAN as soon as somebody logs on as well then?
 
2frogs
Member
Member
Posts: 474
Joined: Fri Dec 03, 2010 1:38 am

Re: Script to disable Wlan when no user are logged on

Wed Jun 12, 2019 6:53 am

Put this in scheduler:
:if ( [ :len [/interface wireless registration find] ] <= 0 ) do={ /interface wireless disable wlan1; :log info "No Wireless Users - Wireless Disabled";}
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1038
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Script to disable Wlan when no user are logged on

Wed Jun 12, 2019 6:17 pm

assigned the mode button to switch wlan on or off, and now I would like the router to disable wlan when all users have disconnected from wlan.
Can you post this script?
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 

Who is online

Users browsing this forum: No registered users and 2 guests