Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PowerOffTV ¶
func PowerOffTV() error
PowerOffTV sends a "standby" command to the TV (logical address 0).
func PowerOnTV ¶
func PowerOnTV() error
PowerOnTV attempts to turn the TV on by sending "on 0" over CEC.
func StartCECListener ¶
func StartCECListener(remoteEvents chan<- RemoteCommand)
StartCECListener spawns cec-client in a goroutine, parses its output, and sends recognized remote commands into remoteEvents.
func SwitchToHDMI ¶
SwitchToHDMI sends an "Active Source" command based on your hdmiInput (1, 2, etc.). See the cec-client spec for physical address codes. For example, "2.0.0.0" = 20:00 in hex.
Types ¶
type RemoteCommand ¶
type RemoteCommand int
RemoteCommand is a simple enum for recognized CEC button presses.
const ( RemoteUnknown RemoteCommand = iota RemoteLeft RemoteRight RemoteSelect )
Click to show internal directories.
Click to hide internal directories.