homehub cli
v0.8.0
可以与BT Home Hub路由器相互作用的CLI。
对于执行快速重新启动或从家庭枢纽提取统计信息有用。
下载操作系统的版本之一。请阅读发行说明,以确保它与您的家庭中心固件版本兼容。或参考兼容性矩阵。
对于 *Nix和OS X:
./homehub-cli
对于Windows:
homehub-cli.exe
按TAB
键显示所有可用命令。您可以通过以下操作获得特定命令的帮助:
CommandName --help
您可以通过指定所需的函数以及Home Hub身份验证详细信息来运行CLI Shell之外的IndivDual命令。
./homehub-cli Reboot --huburl=http://192.168.1.254 --username=admin --password=secret
如果命令需要参数,则可以这样传递。
./homehub-cli WiFiFrequency24GhzChannelSet 6 --huburl=http://192.168.1.254 --username=admin --password=secret
huburl
和username
参数默认为标准的Home Hub IP地址和管理用户名。因此,如果您愿意,可以省略这些参数,只需指定password
即可。
有关所有选项,请参见./homehub-cli --help
。
您可以在Docker容器中运行CLI:
docker run -ti --rm jamesnetherton/homehub-cli
运行特定命令:
docker run -ti --rm jamesnetherton/homehub-cli About --password=secret
如果您需要覆盖轮毂URL或用户名参数,只需将它们添加到“ Docker Run”命令中:
docker run -ti --rm jamesnetherton/homehub-cli About --huburl=http://192.168.1.254 --username=admin --password=secret
首先检查CLI是否与路由器硬件兼容。您可以运行About
命令的命令,以查看对HomeHub-CLI的固件版本进行了测试和验证。
您可以通过EnableDebug
命令在CLI中启用调试。
启用调试:
EnableDebug true
禁用调试:
EnableDebug false
启用调试后,只要执行命令,您就会看到HTTP请求和响应。
该项目使用GO模块。确保您使用兼容的GO版本来构建项目。
git clone [email protected]:jamesnetherton/homehub-cli.git
make build
生成的二进制文件输出到build
目录。