Go library for interacting with T-Mobile Home Internet gateways (Nokia and Arcadyan models).
- Authenticate with Nokia and Arcadyan gateways
- Reboot gateway devices
- Retrieve signal strength information
- Check gateway status
- Make custom HTTP requests to gateway APIs
go get github.com/hugoh/tmhi-gateway/v2package main
import (
"fmt"
"time"
gateway "github.com/hugoh/tmhi-gateway/v2"
)
func main() {
cfg := &gateway.GatewayConfig{
Host: "192.168.12.1",
Username: "admin",
Password: "your-password",
Timeout: 5 * time.Second,
}
gw := gateway.NewArcadyanGateway(cfg)
result, err := gw.Login()
if err != nil {
panic(err)
}
fmt.Println("Logged in:", result.Success)
}- Nokia (
NewNokiaGateway(cfg)) - Arcadyan (
NewArcadyanGateway(cfg))
All gateway implementations satisfy the Gateway interface:
type Gateway interface {
Login() (*LoginResult, error)
Reboot() error
Request(method, path string) (*InfoResult, error)
Info() (*InfoResult, error)
Status() (*StatusResult, error)
Signal() (*SignalResult, error)
}LoginResult- Authentication result with token/session infoStatusResult- Gateway status check resultSignalResult- Signal strength information (4G/5G metrics)InfoResult- Gateway information response
- mise (task runner and tool manager)
# Run all tests
mise test
# Run CI checks (lint + test + coverage)
mise ciMIT License - see LICENSE for details.