Exemple #1
0
        public async Task <string> RegisterHueBridge(string HueBridgeIp)
        {
            ILocalHueClient client = new LocalHueClient(HueBridgeIp);
            //Make sure the user has pressed the button on the bridge before calling RegisterAsync
            //It will throw an LinkButtonNotPressedException if the user did not press the button
            var appkey = await client.RegisterAsync("CaptiosusDomum", "ThinkpadT470");

            //Save the app key for later use

            await _userContext.AddBridgeToUser(new Dal.Entities.HueBridgeEntity(HueBridgeIp, appkey));

            return(appkey);
        }