bravia

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package bravia provides a struct for controling Sony BRAVIA displays over IP. The BRAVIA REST API spec can be found at https://pro-bravia.sony.net/develop/integrate/rest-api/spec/index.html.

This has been tested with Sony XBR TVs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display added in v0.2.0

type Display struct {
	Address      string
	PreSharedKey string
	Log          *zap.Logger

	RequestDelay time.Duration
	// contains filtered or unexported fields
}

func (*Display) AudioVideoInputs added in v0.2.0

func (d *Display) AudioVideoInputs(ctx context.Context) (map[string]string, error)

func (*Display) Blank added in v0.2.0

func (d *Display) Blank(ctx context.Context) (bool, error)

func (*Display) Healthy added in v0.2.2

func (d *Display) Healthy(ctx context.Context) error

func (*Display) Info added in v0.2.0

func (d *Display) Info(ctx context.Context) (interface{}, error)

func (*Display) Mutes added in v0.2.0

func (d *Display) Mutes(ctx context.Context, blocks []string) (map[string]bool, error)

func (*Display) Power added in v0.2.0

func (d *Display) Power(ctx context.Context) (bool, error)

func (*Display) SetAudioVideoInput added in v0.2.0

func (d *Display) SetAudioVideoInput(ctx context.Context, _, input string) error

SetAudioVideoInput sets the input of the display to the given input. Input format is everything tha comes after 'extInput:'. Examples can be found at https://pro-bravia.sony.net/develop/integrate/rest-api/spec/resource-uri-list/index.html.

func (*Display) SetBlank added in v0.2.0

func (d *Display) SetBlank(ctx context.Context, blanked bool) error

func (*Display) SetMute added in v0.2.0

func (d *Display) SetMute(ctx context.Context, block string, mute bool) error

SetMute sets mute on all blocks, not just the given block. The bravia API does not currently support setting mute on a specific block.

func (*Display) SetPower added in v0.2.0

func (d *Display) SetPower(ctx context.Context, power bool) error

func (*Display) SetVolume added in v0.2.0

func (d *Display) SetVolume(ctx context.Context, block string, vol int) error

func (*Display) Volumes added in v0.2.0

func (d *Display) Volumes(ctx context.Context, blocks []string) (map[string]int, error)

type Error added in v0.2.1

type Error struct {
	// contains filtered or unexported fields
}

func (*Error) Error added in v0.2.1

func (e *Error) Error() string

type Info

type Info struct {
	Product    string `json:"product"`
	Language   string `json:"language"`
	Model      string `json:"model"`
	Serial     string `json:"serial"`
	MACAddress string `json:"macAddr"`
	Name       string `json:"name"`
	Generation string `json:"generation"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL