Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamesnetherton/homehub-client
Golang client for the BT Home Hub router
https://github.com/jamesnetherton/homehub-client
client home-hub homehub
Last synced: 3 months ago
JSON representation
Golang client for the BT Home Hub router
- Host: GitHub
- URL: https://github.com/jamesnetherton/homehub-client
- Owner: jamesnetherton
- License: mit
- Created: 2016-09-03T16:11:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-03T12:25:13.000Z (over 4 years ago)
- Last Synced: 2024-10-03T09:33:56.329Z (3 months ago)
- Topics: client, home-hub, homehub
- Language: Go
- Size: 125 KB
- Stars: 12
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Home Hub Client
![Build](https://github.com/jamesnetherton/homehub-client/workflows/Build/badge.svg?event=push)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=600)](https://opensource.org/licenses/MIT)A golang client that can interact with BT Home Hub routers. Refer to the [compatibility matrix](matrix.md)
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](xpath.go) have been implemented.
If you're looking for a command line implementation of this library, check out my [Home Hub CLI](https://github.com/jamesnetherton/homehub-cli). There's also a [Prometheus exporter](https://github.com/jamesnetherton/homehub-metrics-exporter) that's loosely based on this client code.
## Usage
```golang
package mainimport (
"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)
}
}
```