Beispiel #1
0
 private async void LightOff(object sender, EventArgs e)
 {
     var cmd = new Nanomite.Core.Network.Common.Command()
     {
         Type = CommandType.Action, Topic = "LivingRoomLightOff"
     };
     await client.SendCommandAsync(cmd);
 }
Beispiel #2
0
        private async void LoggingOffClicked(object sender, EventArgs e)
        {
            var cmd = new Nanomite.Core.Network.Common.Command()
            {
                Type = CommandType.Action, Topic = "SetLogLevel"
            };
            LogLevelInfo logMessage = new LogLevelInfo()
            {
                Level = LogLevel.Off.ToString(),
            };

            cmd.Data.Add(Any.Pack(logMessage));

            await client.SendCommandAsync(cmd);
        }