Use Arduino with IR receiver/transmitter to relay signals from Samsung TV remote to Vizio Soundbar
Power button on the Samsung remote is relayed to the Vizio sound bar, and the source of the sound bar is switched to optical. Volume up/Volume down from Samsung remote relayed to Vizio sound bar.
Samsung remote uses Samsung protocol (obviously).
Vizio sound bar uses NEC protocol (not as obvious).