Yes, you need a hdmi connection for cec. If your only connection is optical, you will need a universal remote that controls roku tv's and soundbars.
The reason your Hisense roku tv remote controls the vizio soundbar is that the vizio responds to vizio tv commands, and it just happens that Hisense uses the same IR code set as vizio tv's do. So the roku remote has vizio tv commands in its database, which for your luck happens to control both hisense roku tv, and vizio soundbar. Its done be IR only, no passing of commands over wires like cec does.
As for universal remote I suggest the One-For-All urc-7935 streamer remote, wiorks great on Roku tv's and controls soundbars. Its a one device remote that can control three different devices, certain area of the remote are dedicated to certain device. Its a learning remote too. You can find them cheap on ebay.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.