func (e Exlink) SourceHDMI1() error {
	err := e.Send(hdmi1)
	if err != nil {
		return err
	} else {
		return nil
	}
}
switch to source input HDMI1
package exlink
import (
	"encoding/hex"
	"github.com/jacobsa/go-serial/serial"
	"io"
)
const (
	powerOn    = "082200000002d6"
	powerOff   = "082200000001d5"
	volumeUp   = "082201000100d4"
	volumeDown = "082201000200d3"
	speakerOn  = "08220c060000c4"
	speakerOff = "08220c060001c3"
	hdmi1      = "08220a000500c7"
	hdmi2      = "08220a000501c6"
)
const (
	baudRate    = 9600
	dataBits    = 8
	stopBits    = 1
	minReadSize = 4
)
type Exlink struct {
	port io.ReadWriteCloser
}
func Open(device string) (Exlink, error) {
	options := serial.OpenOptions{
		PortName:        device,
		BaudRate:        baudRate,
		DataBits:        dataBits,
		StopBits:        stopBits,
		MinimumReadSize: minReadSize,
	}
	port, err := serial.Open(options)
	if err != nil {
		return Exlink{}, err
	} else {
		exlink := Exlink{port: port}
		return exlink, nil
	}
}
func (e Exlink) Send(code string) error {
	b, err := hex.DecodeString(code)
	if err != nil {
		return err
	}
	_, err = e.port.Write(b)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) Close() error {
	err := e.port.Close()
	if err != nil {
		return err
	} else {
		e.port = nil
		return nil
	}
}
func (e Exlink) PowerOn() error {
	err := e.Send(powerOn)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) PowerOff() error {
	err := e.Send(powerOff)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) VolumeUp() error {
	err := e.Send(volumeUp)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) VolumeDown() error {
	err := e.Send(volumeDown)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) SpeakerOn() error {
	err := e.Send(speakerOn)
	if err != nil {
		return err
	} else {
		return nil
	}
}
func (e Exlink) SpeakerOff() error {
	err := e.Send(speakerOff)
	if err != nil {
		return err
	} else {
		return nil
	}
}