1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Trigger Guest WiFi via 'Smart' Button?

Discussion in 'Asuswrt-Merlin' started by necromancyr, May 23, 2020 at 3:13 PM.

  1. necromancyr

    necromancyr Occasional Visitor

    Joined:
    Aug 20, 2018
    Messages:
    10
    Ok, this is a bit of an oddball request but...bear with me.

    Is there a way to send a command to Merlin to turn on guest wifi for a period of time through some kind of command/trigger?

    I dislike having my guest wifi on all the time, but I always forget to turn it on when we do have guests. What I'd like to do is have a button setup through SmartThings and WebCore that sends a command to my router that turns on the Guest WiFi for the preset period of time whenever the button gets pressed.

    This way, guests could just hit the button and turn it on w/o me having to stop grilling, bartending, etc. :)

    I realize this is somewhat outside the norm - but I figured I'd ask here (before the SmartThings or WebCore forums) because if there's no way to send the command, this pretty much is DOA.
     
  2. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,939
    Location:
    USA
    I’ve never done it, but I would start by testing with these commands, using 2.4Ghz Guest network #1 in the example.
    Code:
    nvram set wl0.1_bss_enabled=1
    nvram commit
    service restart_wireless
    The restart wireless could be a dealbreaker since it will take down all wireless for a moment. Someone may know a better wl command to do the same.
     
  3. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    3,382
    Code:
    wl -i wl0.1 radio off >/dev/null 2>&1
    sleep 10
    wl -i wl0.1 radio on >/dev/null 2>&1
    
    I don't know if this will load the nvram variable though
     
    dave14305 likes this.
  4. TechTinkerer

    TechTinkerer Regular Contributor

    Joined:
    Feb 12, 2020
    Messages:
    108
    Location:
    Land of the distanced happydance
    Quite an interesting idea guest vpn on a schedule-timer..maybe with wps button
     
  5. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,939
    Location:
    USA
    This would be a good iOS shortcut, in fact I had started recreating scMerlin as an iOS shortcut at one point during lockdown.
     
  6. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    3,382
    i could expose all the functions as CLI commands if that'd help?
     
    L&LD likes this.
  7. alba666

    alba666 Occasional Visitor

    Joined:
    Apr 9, 2016
    Messages:
    11
    Hmmm, I think the Asus Alexa skill does exactly what you are trying to do.
     
  8. necromancyr

    necromancyr Occasional Visitor

    Joined:
    Aug 20, 2018
    Messages:
    10
    Wow, didn't expect so many great responses so quickly! The Asus Alexa skill does look like it does what I would want - but it doesn't seem to work on the ac86u, which is what I have. Also, I'm a bit concerned there's some exposure of the router there from a security perspective that I'm not skilled enough to check - but I can't validate that. Not certain if it would be a locally processed command or something from Amazon servers.

    And apologies if this is a stupid/basic question - still learning a bit. Aside from the command line, how would you send these commands to the router? (The follow-up to that adds "securely" to the end, but I think knowing at all how to send commands to the router would be useful.) Please just point me to a guide if you know of a good one or manual I'm missing as well. Feel like this would be really powerful to understand fully. Would this be doable through scMerlin or similar?