def discover_hub_ip(self):
    try:
        r = requests.get(HUE_NUPNP_URL)
    except:
        raise APIException('Failed to send hub ip GET')
    try:
        json_resp = r.json()
    except:
        raise APIException('Failed to decode hub ip json response')
    if (len(json_resp) > 0):
        return [0]['internalipaddress']
    else:
        raise APIException('Failed to find hub ip')
def discover_hub_ip(self):
    try:
        r = requests.get(HUE_NUPNP_URL)
    except:
        raise APIException('Failed to send hub ip GET')
    try:
        json_resp = r.json()
    except:
        raise APIException('Failed to decode hub ip json response')
    if (len(json_resp) > 0):
        return [0]['internalipaddress']
    else:
        raise APIException('Failed to find hub ip')