Skip to content

mirogta/vmhubctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vmhubctl

GitHub Workflow GitHub Issues GitHub Release GitHub Downloads GitHub Go Mod version GitHub License

CLI for VirginMedia Hub 3 using SMNP

How to Use

Create a .vmhubctl.yml config file based on the .vmhubctl.yml-template file.

  • Show help: vmhubctl --help
  • List some settings: vmhubctl list
  • Disable WiFi: vmhubctl disable wifi
  • Enable WiFi: vmhubctl enable wifi

How to build

mkdir -p bin
GOBIN=$PWD/bin go get golang.org/x/tools/cmd/stringer
./bin/stringer -type=Name ./oids
go build -o vmhubctl

NOTE: The stringer command needs to be re-ran after changing ./oids/name.go.

Compile and Install

The idea is to run this on Raspberri Pi connected via a LAN cable to the Wifi router, so that it could turn on and off Wifi at certain times.

For Raspberry Pi:

env GOOS=linux GOARCH=arm GOARM=5 go build -o vmhubctl
scp .vmhubctl.yml pi@pihole:~/
scp vmhubctl pi@pihole:~/
  • Install CRON via crontab -e:
# switch off wifi at 2300
0 23 * * * /home/pi/vmhubctl disable wifi --config /home/pi/.vmhubctl.yml
# switch on wifi at 0500
0 5 * * * /home/pi/vmhubctl enable wifi --config /home/pi/.vmhubctl.yml
  • Check if it was running: grep CRON /var/log/syslog
  • Check logs: cat ~/vmhubctl.log

Useful links

About

CLI for VirginMedia Hub 3 using SMNP

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages