Control Sonos Soundbar Volume with Apple TV Remote via Infrared

I was recently helping someone set up a new TV and we were running into trouble with one thing - controlling their Sonos soundbar&rsquo;s volume when the soundbar only had an optical TOSLINK input. The output coming from the TV this way was a fixed volume, and without a dedicated remote for the soundbar (not sure if it never came with one or if it was lost along the way) our only way to control…