That's the right cable. You'll want to turn off the TV speakers in the TV Audio Setup Menu.
The TV HDMI 1 is an input from another video source besides your antenna so if you have something connected to provide a video signal to the TV, then keep that connection intact.
What is feeding the Onkyo that has you connecting an HDMI out of it to the TV? A DVD player?
If you are feeding another component video signal to the TV (DVD perhaps) via the Onkyo, you can use another audio connection out of that component directly to the Onkyo and bypass using the TV to process that component's audio. It will sound better if you do.
So, like this:
Cable =======> TV ===> TV Audio Out =======> Onkyo Audio In via optical cable.
DVD Video Out (HDMI) ========> TV HDMI 1 in.
DVD Audio out (digital coax or optical cable) ==============> Onkyo audio in
Aerial Acoustic 8s/McIntosh D100 MC205 MC501s MR85 MX135/Oppo BDP-95/Sony 4K/ZUMA/Roon