Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 866 Bytes

README.md

File metadata and controls

56 lines (43 loc) · 866 Bytes

go-eiscp

eISCP protocol for Onkyo Provides minimal eISCP protocol

Example

Create connection

dev, err := eiscp.NewReceiver(*host)
if err != nil {
  panic(err)
}
defer dev.Close()
// Do something else.....

Set volume level to 50%

err := dev.SetVolume(uint8(50))
// Process error....

Get power state

enabled, err := dev.GetPower()
// Process error and state...

Write Onkyo command

err := dev.WriteCommand("PWR", "01")
// Process error...
// Usually requires wait response

Write raw eISCP message

msg := Message{}
msg.Destination = 0x31  // Destination object
msg.Version = 0x01      // ISCP version
msg.ISCP = []byte("SOME-Command")
err := dev.WriteMessage(msg)
// Process error....

Read raw eISCP message

msg, err := dev.ReadMessage()
// Process error and message...