https://github.com/denwwer/hyperion-ng
hyperion-ng is library that helps communicate with Hyperion-NG.
https://github.com/denwwer/hyperion-ng
api go hyperion
Last synced: about 1 month ago
JSON representation
hyperion-ng is library that helps communicate with Hyperion-NG.
- Host: GitHub
- URL: https://github.com/denwwer/hyperion-ng
- Owner: denwwer
- License: mit
- Created: 2025-01-17T14:24:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-28T16:21:18.000Z (over 1 year ago)
- Last Synced: 2026-05-18T13:50:12.487Z (2 months ago)
- Topics: api, go, hyperion
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://goreportcard.com/report/github.com/denwwer/hyperion-ng)

[](https://pkg.go.dev/github.com/denwwer/hyperion-ng)
**hyperion-ng** is library that helps communicate with [Hyperion-NG](https://hyperion-project.org/) JSON API.
## Install
```
go get -u github.com/denwwer/hyperion-ng
```
## Examples
```go
import (
"log"
"github.com/denwwer/hyperion-ng"
"github.com/denwwer/hyperion-ng/model"
)
func main() {
// Create configuration
conf := hyperion.Config{
VerboseLog: false,
Connection: hyperion.Connection{
Token: "6c224a4c-6ebf-491a-9d70-fb7681ca2a59",
Type: hyperion.ConnectHTTP,
Host: "192.168.53.130",
Port: 8090,
SSL: false,
Timeout: 10,
},
}
// Create client with custom header options
cl := hyperion.NewClient(conf, hyperion.WithHeader(map[string]string{"my-header": "value"}))
// Get full information
info, err := cl.ServerInfo()
if err != nil {
log.Panic(err)
}
// Manage Instances
for _, instance := range info.Instances {
log.Printf(`name: "%s" active: %t`, instance.Name, instance.Running)
err = cl.Instance(instance.Instance, model.InstanceCmdStop)
if err != nil {
log.Fatalln(err)
}
}
// Manage Components
for _, comp := range info.Components {
if comp.Switchable() {
err = cl.ComponentState(comp.Name, false)
if err != nil {
log.Fatalln(err)
}
}
}
// List user defined effects
for _, effect := range info.Effects.Users() {
log.Printf(`name: "%s"`, effect.Name)
}
// Change video mode
err = cl.VideoMode(model.VideoMode2D)
if err != nil {
log.Fatalln(err)
}
}
```
Additional doumentation on [pkg.go.dev](https://pkg.go.dev/github.com/denwwer/hyperion-ng)