V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
memcache
V2EX  ›  问与答

小米路由器组成的 mesh 网络,如何定时重启子路由呢?

  •  
  •   memcache · 20 天前 · 828 次点击
    • 诉求:子路由器经常掉速,重启下可以用一段时间,想着定时重启下子路由
    • 问题:发现小米 wifi app 上仅有定时重启整个路由的功能,对于子节点只有重启功能,没有定时重启的功能
    • 特来求助下 v 友们~
    6 条回复    2025-08-21 22:27:39 +08:00
    n2l
        1
    n2l  
       20 天前
    可以上软路由,然后小米路由器做 AP ,之前我用 3 个 AX3000T 组网,其中一个拨号,结果总是掉线,待机量也就 20 几个,后来换成软路由拨号就好了,
    datocp
        2
    datocp  
       20 天前
    这种有 ssh 最好,可以自己在其它路由用 sshpass 进行远程登录重启

    sshpass -p 'your_password' ssh user@remote_host 'sudo reboot'

    其它的分析网页的有点麻烦,但是当年也尝试成功了。


    Reboot TP-Link Router TL-WA7510N using Curl
    Posted By Abir Pathak on Nov 2, 2015 | 1 comment
    Tags: automated, curl, reboot, script, TL-WA7510N, tp-link, WA7510N
    I have a TP-Link outdoor AP point router:
    Hardware Version: WA7510N v2
    It sometimes freezes and I need to manually reboot it. My downloads suffer and I am a bit OCDic about continuous downloads and no speed wasted.
    So, I had been trying to find a way to have an automated process for that.
    The router has this URL for rebooting it:
    http://192.168.1.254:8888/userRpm/SysRebootRpm.htm?Reboot=Reboot
    You need your username/password with curl:
    (Make sure to replace the correct IP, port, username and password for your router)

    CURL Command Line:
    1
    curl -D -s --header "Referer: http://192.168.1.254:8888/userRpm/SysRebootRpm.htm" -u "admin:password" "http://192.168.1.254:8888/userRpm/SysRebootRpm.htm?Reboot=Reboot"
    Note: Adding referer header is very important. Without it, you will get an error:
    “You have no authority to access this router”
    Another way you can do this is if you can find your Authorization key.
    (In case you need to keep your script out in the open. And don’t want to put your username and password for everyone to see.)
    Once you login to your router in your web browser, just look at any HTTP request/response. You can use Developer tools (F12) -> Network (Chrome). Or maybe an HTTP capture tool like Fiddler, Charles etc. In any of the request/responses you capture you’ll be able to see a header like: Authorization:Basic ABCdef123456
    You can use it like this:
    1
    curl -D -s --header "Authorization:Basic ABCdef123456" --header "Referer: http://192.168.1.254:8888/userRpm/SysRebootRpm.htm" "http://192.168.1.254:8888/userRpm/SysRebootRpm.htm?Reboot=Reboot"
    No need to add username and password in this command. Unfortunately you’ll need to find your Authorization string manually.
    You can also put this command in a batch script.
    cxe2v
        3
    cxe2v  
       20 天前
    买个小米的智能插座,定时关闭开启插座
    memcache
        4
    memcache  
    OP
       20 天前
    @n2l 那这个三个 ap 应该实现不了无感切换把?比如从 A 路由器附近走到 B 路由器附近,手机可以从 A AP 无感切换到 B AP
    @datocp 小米路由器咋开启 ssh 啊
    @cxe2v 这个好,简单暴力!
    n2l
        5
    n2l  
       20 天前
    @memcache 肯定中继啊,用软件测过,自动切换,
    memcache
        6
    memcache  
    OP
       20 天前
    @n2l 嗯嗯,我本来还以为普通中继会没有 mesh 路由切换那么丝滑。不过需要购入一个软路由,有一些成本,hhh

    结帖了,我抓取了页面 API, 写了一个脚本,结合定时调度(如青龙),实现定时重启子路由的功能。
    脚本地址: https://github.com/chenqimiao/pyMiWiFi ,有需要的朋友可以参考下
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   960 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 21:11 · PVG 05:11 · LAX 14:11 · JFK 17:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.