denonavr

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_URL           string = "/goform/formMainZone_MainZoneXmlStatus.xml"
	STATUS_Z2_URL        string = "/goform/formZone2_Zone2XmlStatus.xml"
	STATUS_Z3_URL        string = "/goform/formZone3_Zone3XmlStatus.xml"
	MAINZONE_URL         string = "/goform/formMainZone_MainZoneXml.xml"
	COMMAND_URL          string = "/goform/formiPhoneAppDirect.xml"
	NET_AUDIO_STATUR_URL string = "/goform/formNetAudio_StatusXml.xml"
)
View Source
const ALL_ZONE_STEREO = "ALL ZONE STEREO"

Sound modes

Variables

View Source
var CHANGE_INPUT_MAPPING = map[string]string{
	"Favorites":      "FAVORITES",
	"Flickr":         "FLICKR",
	"Internet Radio": "IRADIO",
	"Media Server":   "SERVER",
	"Online Music":   "NET",
	"Spotify":        "SPOTIFY",
}
View Source
var HDTUNER_SOURCES = []string{
	"HD Radio",
	"HDRADIO",
}
View Source
var NETAUDIO_SOURCES = []string{
	"AirPlay",
	"Online Music",
	"Media Server",
	"iPod/USB",
	"Bluetooth",
	"Internet Radio",
	"Favorites",
	"SpotifyConnect",
	"Flickr",
	"NET/USB",
	"Music Server",
	"NETWORK",
	"NET",
}
View Source
var SOUND_MODE_MAPPING = map[string][]string{
	"MUSIC": {
		"PLII MUSIC",
		"DTS NEO:6 MUSIC",
		"DTS NEO:6 M",
		"DTS NEO:X M",
		"DOLBY D +NEO:X M",
		"DTS NEO:X MUSIC",
		"DOLBY PL2 MUSIC",
		"DOLBY PL2 M",
		"PLIIX MUSIC",
		"DOLBY PL2 X MUSIC",
	},
	"MOVIE": {
		"PLII MOVIE",
		"PLII CINEMA",
		"DTS NEO:X CINEMA",
		"DTS NEO:X C",
		"DTS NEO:6 CINEMA",
		"DTS NEO:6 C",
		"DOLBY D +NEO:X C",
		"PLIIX CINEMA",
		"DOLBY PLII MOVIE",
		"MULTI IN + VIRTUAL:X",
		"DOLBY PL2 CINEMA",
		"DOLBY PL2 C",
		"DOLBY PL2 X MOVIE",
	},
	"GAME": {
		"PLII GAME",
		"DOLBY D +NEO:X G",
		"DOLBY PL2 GAME",
		"DOLBY PL2 G",
		"DOLBY PL2 X GAME",
	},
	"AUTO":        {"None"},
	"STANDARD":    {"None2"},
	"VIRTUAL":     {"VIRTUAL"},
	"MATRIX":      {"MATRIX"},
	"ROCK ARENA":  {"ROCK ARENA"},
	"JAZZ CLUB":   {"JAZZ CLUB"},
	"VIDEO GAME":  {"VIDEO GAME"},
	"MONO MOVIE":  {"MONO MOVIE"},
	"DIRECT":      {"DIRECT"},
	"PURE DIRECT": {"PURE_DIRECT", "PURE DIRECT"},
	"DOLBY DIGITAL": {
		"DOLBY DIGITAL",
		"DOLBY D + DOLBY SURROUND",
		"DOLBY D+DS",
		"DOLBY DIGITAL +",
		"STANDARD(DOLBY)",
		"DOLBY SURROUND",
		"DOLBY D + +DOLBY SURROUND",
		"NEURAL",
		"DOLBY HD",
		"DOLBY HD + DOLBY SURROUND",
		"MULTI IN + DSUR",
		"MULTI IN + NEURAL:X",
		"MULTI IN + DOLBY SURROUND",
		"DOLBY D + NEURAL:X",
		"DOLBY DIGITAL + NEURAL:X",
		"DOLBY DIGITAL + + NEURAL:X",
		"DOLBY ATMOS",
		"DOLBY AUDIO - DOLBY SURROUND",
		"DOLBY TRUEHD",
		"DOLBY AUDIO - DOLBY DIGITAL PLUS",
		"DOLBY AUDIO - TRUEHD + DSUR",
		"DOLBY AUDIO - DOLBY TRUEHD",
		"DOLBY AUDIO - TRUEHD + NEURAL:X",
		"DOLBY AUDIO - DD + DSUR",
		"DOLBY AUDIO - DD+   + NEURAL:X",
		"DOLBY AUDIO - DD+   + DSUR",
		"DOLBY AUDIO - DOLBY DIGITAL",
		"DOLBY AUDIO-DSUR",
		"DOLBY AUDIO-DD+DSUR",
	},
	"DTS SURROUND": {
		"DTS SURROUND",
		"DTS NEURAL:X",
		"STANDARD(DTS)",
		"DTS + NEURAL:X",
		"MULTI CH IN",
		"DTS-HD MSTR",
		"DTS VIRTUAL:X",
		"DTS-HD + NEURAL:X",
		"DTS-HD",
		"DTS + VIRTUAL:X",
		"DTS + DOLBY SURROUND",
		"DTS-HD + DOLBY SURROUND",
		"DTS-HD + DSUR",
		"DTS:X MSTR",
	},
	"AURO3D":     {"AURO-3D"},
	"AURO2DSURR": {"AURO-2D SURROUND"},
	"MCH STEREO": {
		"MULTI CH STEREO",
		"MULTI_CH_STEREO",
		"MCH STEREO",
		"MULTI CH IN 7.1",
	},
	"STEREO":        {"STEREO"},
	ALL_ZONE_STEREO: {"ALL ZONE STEREO"},
}
View Source
var SOURCE_MAPPING = map[string]string{
	"TV AUDIO":       "TV",
	"iPod/USB":       "USB/IPOD",
	"Bluetooth":      "BT",
	"Blu-ray":        "BD",
	"CBL/SAT":        "SAT/CBL",
	"NETWORK":        "NET",
	"Media Player":   "MPLAY",
	"AUX":            "AUX1",
	"Tuner":          "TUNER",
	"FM":             "TUNER",
	"SpotifyConnect": "Spotify Connect",
}
View Source
var TELNET_MAPPING = map[string]string{
	"FAVORITES": "Favorites",
	"FLICKR":    "Flickr",
	"IRADIO":    "Internet Radio",
	"IRP":       "Internet Radio",
	"SERVER":    "Media Server",
	"SPOTIFY":   "Spotify",
}
View Source
var TELNET_SOURCES = []string{
	"CD",
	"PHONO",
	"TUNER",
	"DVD",
	"BD",
	"TV",
	"SAT/CBL",
	"MPLAY",
	"GAME",
	"HDRADIO",
	"NET",
	"PANDORA",
	"SIRIUSXM",
	"SOURCE",
	"LASTFM",
	"FLICKR",
	"IRADIO",
	"IRP",
	"SERVER",
	"FAVORITES",
	"AUX1",
	"AUX2",
	"AUX3",
	"AUX4",
	"AUX5",
	"AUX6",
	"AUX7",
	"BT",
	"USB/IPOD",
	"USB DIRECT",
	"IPOD DIRECT",
}
View Source
var TUNER_SOURCES = []string{
	"Tuner",
	"TUNER",
}

Functions

This section is empty.

Types

type DenonAVR

type DenonAVR struct {
	Host string
	// contains filtered or unexported fields
}

func NewDenonAVR

func NewDenonAVR(host string, telnetEnabled bool) *DenonAVR

func (*DenonAVR) AddHandleEntityChangeFunc

func (d *DenonAVR) AddHandleEntityChangeFunc(attribute string, f func(interface{}))

Add a new function that is called when a attribute of this entity has changed

func (*DenonAVR) ConnectTelnet added in v0.2.10

func (d *DenonAVR) ConnectTelnet() (*telnet.Conn, error)

func (*DenonAVR) CursorControl

func (d *DenonAVR) CursorControl(cursorControl DenonCursorControl) int

func (*DenonAVR) GetAttribute

func (d *DenonAVR) GetAttribute(name string) (interface{}, error)

func (*DenonAVR) GetSoundModeList

func (d *DenonAVR) GetSoundModeList() []string

func (*DenonAVR) GetSurroundMode

func (d *DenonAVR) GetSurroundMode(zone DenonZone) string

func (*DenonAVR) GetZoneInputFuncList

func (d *DenonAVR) GetZoneInputFuncList(zone DenonZone) map[string]string

func (*DenonAVR) IsOn

func (d *DenonAVR) IsOn() bool

func (*DenonAVR) MainZoneMute

func (d *DenonAVR) MainZoneMute() error

func (*DenonAVR) MainZoneMuteToggle

func (d *DenonAVR) MainZoneMuteToggle() error

func (*DenonAVR) MainZoneMuted

func (d *DenonAVR) MainZoneMuted() bool

func (*DenonAVR) MainZoneUnMute

func (d *DenonAVR) MainZoneUnMute() error

func (*DenonAVR) Pause

func (d *DenonAVR) Pause() int

func (*DenonAVR) Play

func (d *DenonAVR) Play() int

func (*DenonAVR) SetAttribute

func (d *DenonAVR) SetAttribute(name string, value interface{})

Set an attribute and call entity Change function if changed

func (*DenonAVR) SetMoni1Out

func (d *DenonAVR) SetMoni1Out() error

func (*DenonAVR) SetMoni2Out

func (d *DenonAVR) SetMoni2Out() error

func (*DenonAVR) SetMoniAutoOut

func (d *DenonAVR) SetMoniAutoOut() error

func (*DenonAVR) SetSelectSourceMainZone

func (d *DenonAVR) SetSelectSourceMainZone(source string) int

func (*DenonAVR) SetSoundModeMainZone

func (d *DenonAVR) SetSoundModeMainZone(mode string) int

func (*DenonAVR) SetVolume

func (d *DenonAVR) SetVolume(volume float64) error

func (*DenonAVR) SetVolumeDown

func (d *DenonAVR) SetVolumeDown() error

func (*DenonAVR) SetVolumeUp

func (d *DenonAVR) SetVolumeUp() error

func (*DenonAVR) StartListenLoop

func (d *DenonAVR) StartListenLoop() error

func (*DenonAVR) StopListenLoop added in v0.2.8

func (d *DenonAVR) StopListenLoop()

func (*DenonAVR) TogglePower

func (d *DenonAVR) TogglePower() error

func (*DenonAVR) TurnOff

func (d *DenonAVR) TurnOff() error

func (*DenonAVR) TurnOn

func (d *DenonAVR) TurnOn() error

type DenonCommand

type DenonCommand string
const (
	DenonCommandPower          DenonCommand = "PW"
	DennonCommandZoneMain      DenonCommand = "ZM"
	DenonCommandMainZoneVolume DenonCommand = "MV"
	DenonCommandMainZoneMute   DenonCommand = "MU"
	DenonCommandSelectInput    DenonCommand = "SI"
	DenonCommandCursorControl  DenonCommand = "MN"
	DenonCommandNS             DenonCommand = "NS"
	DenonCommandMS             DenonCommand = "MS"
	DenonCommandVS             DenonCommand = "VS"
	DenonCommandZone2          DenonCommand = "Z2"
	DenonCommandZone3          DenonCommand = "Z3"
)

type DenonCursorControl

type DenonCursorControl string
const (
	DenonCursorControlUp     DenonCursorControl = "CUP"
	DenonCursorControlDown   DenonCursorControl = "CDN"
	DenonCursorControlLeft   DenonCursorControl = "CLT"
	DenonCursorControlRight  DenonCursorControl = "CRT"
	DenonCursorControlEnter  DenonCursorControl = "ENT"
	DenonCursorControlReturn DenonCursorControl = "RTN"
	DenonCursorControlMenu   DenonCursorControl = "MEN ON"
)

type DenonNetAudioStatus

type DenonNetAudioStatus struct {
	XMLName xml.Name `xml:"item"`
	SzLine  []string `xml:"szLine>value"`
}

type DenonXML

type DenonXML struct {
	XMLName          xml.Name     `xml:"item"`
	FriendlyName     string       `xml:"FriendlyName>value"`
	Power            string       `xml:"Power>value"`
	ZonePower        string       `xml:"ZonePower>value"`
	RenameZone       string       `xml:"RenameZone>value"`
	TopMenuLink      string       `xml:"TopMenuLink>value"`
	VideoSelectDisp  string       `xml:"VideoSelectDisp>value"`
	VideoSelect      string       `xml:"VideoSelect>value"`
	VideoSelectOnOff string       `xml:"VideoSelectOnOff>value"`
	VideoSelectList  []ValueLists `xml:"VideoSelectLists>value"`
	ECOModeDisp      string       `xml:"ECOModeDisp>value"`
	ECOMode          string       `xml:"ECOMode>value"`
	ECOModeList      []ValueLists `xml:"ECOModeLists>value"`
	AddSourceDisplay string       `xml:"AddSourceDisplay>value"`
	ModelId          string       `xml:"ModelId>value"`
	BrandId          string       `xml:"BrandId>value"`
	SalesArea        string       `xml:"SalesArea>value"`
	InputFuncSelect  string       `xml:"InputFuncSelect>value"`
	NetFuncSelect    string       `xml:"NetFuncSelect>value"`
	SelectSurround   string       `xml:"selectSurround>value"`
	VolumeDisplay    string       `xml:"VolumeDisplay>value"`
	MasterVolume     string       `xml:"MasterVolume>value"`
	Mute             string       `xml:"Mute>value"`
}

type DenonZone

type DenonZone string
const (
	MainZone DenonZone = "MAIN"
	Zone2    DenonZone = "Z2"
	Zone3    DenonZone = "Z3"
)

type DenonZoneStatus

type DenonZoneStatus struct {
	XMLName         xml.Name `xml:"item"`
	Zone            string   `xml:"Zone>value"`
	Power           string   `xml:"Power>value"`
	InputFuncList   []string `xml:"InputFuncList>value"`
	RenameSource    []string `xml:"RenameSource>value>value"`
	SourceDelete    []string `xml:"SourceDelete>value"`
	InputFuncSelect string   `xml:"InputFuncSelect>value"`
	VolumeDisplay   string   `xml:"VolumeDisplay>value"`
	RestorerMode    string   `xml:"RestorerMode>value"`
	SurrMode        string   `xml:"SurrMode>value"`
	MasterVolume    string   `xml:"MasterVolume>value"`
	Mute            string   `xml:"Mute>value"`
	Model           string   `xml:"Model>value"`
}

type TelnetEvent

type TelnetEvent struct {
	RawData string
	Command string
	Payload string
}

type ValueLists

type ValueLists struct {
	Index string `xml:"index,attr"`
	Table string `xml:"table,attr"`
}

Jump to

Keyboard shortcuts

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