Thanks for your reply. In the meantime I found out how to do it, was not as complicated as I thought.
Below is video of the final result.
The remote has four activities: WatchTV, Music, WatchMovie and Gaming. Each activity will power on the necessary equipment: tv, surround system, decoder, computer or led strip.
So eg activity WatchTV turns on the tv, decoder, led strip and sound system. Buttons needed to control the activity are enabled or disabled. For music activity it is useless to have the numeric buttons enabled, so in my flow these buttons are disabled.
The universal remote works either with simple ir commands over mqtt or http commands (to control vlc for movie). Music activity works with raspberry pi with shairport-sync (airplay). Shairport-sync has mqtt support, so I can control the playlist with mqtt commands. It also publishes the song and artist information over mqtt, so I can display it in the remote dashboard interface.
The activity buttons are also linked with homekit thanks to homekit bridged node. So I can ask siri to turn on any activity, like WatchTV.