cec.go
is a Go interface to LibCEC.
Make sure you have libcec and it's header files installed (apt-get install libcec-dev
)
go get github.com/chbmuc/cec
A simple example to turn on the TV:
package main
import (
"fmt"
"github.com/chbmuc/cec"
)
func main() {
c, err := cec.Open("", "cec.go")
if err != nil {
fmt.Println(err)
}
c.PowerOn(0)
}