And this is the code I'm using in FlicHub studio to handle the matter events for volume-up, volume-down, volume-set, toggle operations and preset handling.

FlicHub Studio - QuickJS code in Google Drive