public static async Task <string> GetFirstOrDefaultVeraDeviceIp() { try { VeraNetworkDeviceModel deviceInfoUi7 = await LocateVeraDeviceAsync(); VeraDevice veraDeviceUi7 = deviceInfoUi7.Devices.FirstOrDefault(); if (veraDeviceUi7 != null) { return(veraDeviceUi7.InternalIP); } } catch { return("error"); } return("error"); }
public static async Task <List <VeraDevice> > GetVeraDevices() { try { var json = await PluginHttpClient.GetStream(BaseLocatorUrl); if (json.Equals(string.Empty)) { return(null); } VeraNetworkDeviceModel deviceInfoUi7 = await LocateVeraDeviceAsync(); return(deviceInfoUi7.Devices); } catch { } return(null); }