rgbSelector hex code action

I’m writing my own device handler for milight bulbs.

I’ve been able to modify some LIFX bulb code as a framework, but it’s 95% new code at this point.

I’m down to my last couple of hurdles and the rgbSelector has me stumped. I need to get an hex color code from it. I found several thread about the same problem from different developers, but I haven’t been able to mesh it together.

It doesn’t work, calls the URL with “null” or even uses an empty string as the value as the get variable/

I’ve uploaded my code to PasteBin: http://pastebin.com/UEhVKPzX

If someone could point me in the right direction or tell me what I’m doing wrong I would be grateful.

Doug