Sorry, I’m confused.
At the present time, all custom Groovy DTHs run in the cloud. They are not eligible to run locally.
Many of the stock groovy DTHs (the ones written and distributed by Samsung itself) do work locally. And custom edge drivers can work locally. But not custom Groovy code.
So I’m having a hard time following the description of the problem.
As far as connecting a hue bulb directly to a Samsung/Aeotec hub, technically you can but neither company will support it because it will tend to mess up your Zigbee Network as it is an unreliable repeater. See the community FAQ code.
FAQ: Do I need the Hue Bridge/Hub to Use a Hue Bulb with SmartThings?