public void StartCleaning() { if (!string.IsNullOrEmpty(_ip)) { using (var device = new MiDevice(_ip, _token)) { var response = device.Send("app_start"); } } }
public void Test_GetStatus() { if (!string.IsNullOrEmpty(_ip)) { using (var device = new MiDevice(_ip, _token)) { var response = device.Send("get_status"); // in cleaning 3 == spot cleaning? // in cleaning 2 == ✔ zone // in cleaning 1 == ✔ general } } }
public void Test_CleanZone() { if (!string.IsNullOrEmpty(_ip)) { using (var device = new MiDevice(_ip, _token)) { var response = device.Send("app_zoned_clean", new int[] { 20047, 24303, 24097, 25853, 1 }); var resultStrings = response.As <List <string> >(); Assert.IsNotNull(resultStrings); Assert.AreEqual(1, resultStrings.Count); Assert.AreEqual("ok", resultStrings.First()); } } }