Plugin and Hardware Controller

I’m looking into creating a plugin and a hardware controller. Im gonna use IPC for the coms between the plugin and hardware device but I have an issue. if I have multiple plugins on each channel how do I select a plugin for the hardware device to control. say I have one plugin each loaded on 10 channels. and i select plugin number 4 how can I communicate with just that plugin and not all 10. I know I can create a plugin ID and construction and keep track but this involves knowing which plugin is focused which I cannot figure out. gainedFocus does works but id prefer the user to simply select the plugin anywhere inclduing the daws window handle. focus only works if they select the actual editor inside. any ideas.