I'm not good with types, but I was working on something in the past and the following got me going. I'd be interested in hearing if this works for you...

Try
$homeserver[0].value

or
$homeserver[0].text