If your Onkyo is an N series (network enabled) ,make a sensor and use the Onkyo/Integra ISCP commands...
You need to send the string:
ISCP !1PWRQSTN
You should put that in ASCII, hit convert, then get:
49 53 43 50 10 09 01 21 31 50 57 52 51 53 54 4e
You need to add 0D 0A to the end to provide the return character (to send the command), and a prefix of 0x - and strip all spaces.
So you think you should send...
0x4953435010090121315057525153544e0d0a
However - ascii to hex doesn't deal with the null space you need....
0x4953435000000010000000090100000021315057525153544e0d0a
To port 60128 on your Onkyo - assuming you've enabled Telnet access
You need to use TCP/IP, not telnet - I didn't find telnet very successful with Onkyo.
You should then get back...
if the power is off...or
if the power is on...