homehub-client

Golang client for the BT Home Hub router

MIT License

Stars
12

Home Hub Client

A golang client that can interact with BT Home Hub routers. Refer to the compatibility matrix to see the firmware versions supported by each release. The master branch is currently proven against firmware versions SG4B1000B540 and SG4B1A006100.

At present, only a small set of the available APIs have been implemented.

If you're looking for a command line implementation of this library, check out my Home Hub CLI. There's also a Prometheus exporter that's loosely based on this client code.

Usage

package main

import (
	"fmt"
	"github.com/jamesnetherton/homehub-client"
)

func main() {
	hub := homehub.New("http://192.168.1.254", "admin", "p4ssw0rd")
	hub.Login()

	version, err := hub.Version()
	if err == nil {
		fmt.Printf("Home Hub Version = %s", version)
	}
}