======
Use this package to connect to and interact with HD HomeRun devices.
go get github.com/mh-orange/hdhomerun
package main
import(
"fmt"
"github.com/mh-orange/hdhomerun"
)
func main() {
for discoverResult := range hdhomerun.Discover(nil, time.Millisecond*200) {
if discoverResult.Err != nil {
fmt.Printf("Error during discovery: %v\n", discoverResult.Err)
} else {
fmt.Printf("hdhomerun device %s found at %s\n", discoverResult.Device.ID(), discoverResult.Device.Addr())
}
}
}
package main
import(
"github.com/mh-orange/hdhomerun"
"net"
)
func main() {
device, _ := hdhomerun.ConnectTCP(&net.TCPAddr{net.IP{192,168,1,100}, 65001, ""})
tuner := device.Tuner(0)
tuner.Tune("auto", 177000000)
}
package main
import(
"fmt"
"github.com/mh-orange/hdhomerun"
"net"
)
func main() {
device, _ := hdhomerun.ConnectTCP(&net.TCPAddr{net.IP{192,168,1,100}, 65001, ""})
tuner := device.Tuner(0)
for result := range tuner.Scan() {
if result.Err != nil {
fmt.Printf("Error scanning for channels: %v\n", err)
continue
}
fmt.Printf("Found channel %s\n", result.Channel.Name)
}
}