Any Documentation on "physicalgraph device HubAction"?

Converting IP address to Hex is easy patrick has done that and for those who want the code:

private String convertIPtoHex(ipAddress) { 
    String hex = ipAddress.tokenize( '.' ).collect {  String.format( '%02x', it.toInteger() ) }.join()
    return hex

}

private String convertPortToHex(port) {
	String hexport = port.toString().format( '%04x', port.toInteger() )
    return hexport
}

Interestingly has anyone been able to get an IP address from a Hostname inside device code?