Skip to content
13112442872Public
forked from tg567/bemfa-wol

About

巴法TCP/MQTT监听进行网络唤醒开关电脑

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

巴法云实现小爱同学语音控制电脑开关机

实现mqtt和tcp两种方式。

打包

需要golang环境打包

命令行打包

1.git clone项目,切换到main分支。

2.GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o wol打包命令,根据使用环境更改GOOS和GOARCH的值;运行在路由器上等存储空间小的设备,打包建议用tcp连接方式,并且注释掉mqtt相关代码运行go mod tidy命令后再打包,减小执行文件大小。

GUI打包

1.git clone项目,切换到gui分支。

2.安装fyne

go install fyne.io/fyne/v2/cmd/fyne@latest
fyne install

3.CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc fyne release -os windows -appID com.tg567.bemfawol -appVersion 1.0.0 -icon ./icon.png -appBuild 1 -developer tg567 -certificate 123456 -password 123456打包命令,参数参考fyne项目或命令fyne release -h

使用

开机功能需要同一网段下运行

运行命令:./wol -uid xxx -topic xxx -mac 00:00:00:00:00:00 -broadcast 192.168.1.255 -ssh root@192.168.1.1

参数:

  -broadcast string
        broadcast address
  -f string
        log file path
  -mac string
        mac
  -ssh string
        ssh user@ipaddress
  -topic string
        topic
  -type string
        wol type, tcp/mqtt (default "tcp")
  -uid string
        bemfa uid

About

巴法TCP/MQTT监听进行网络唤醒开关电脑

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages