Exemple #1
0
 public static void Main(string[] args)
 {
     try
     {
         new ConsoleCommandWatcher().Run();
     }
     finally
     {
         ZWaveManagerFactory.Destroy();
     }
 }
Exemple #2
0
            public void Should_dump_switch_information()
            {
                try
                {
                    var container = IoC.Initialize();
                    var network   = container.GetInstance <ZWaveNetwork>();

                    var switches = network.GetAllSwitches();
                    Console.WriteLine(JsonConvert.SerializeObject(switches, Formatting.Indented));
                }
                finally
                {
                    ZWaveManagerFactory.Destroy();
                }
            }
Exemple #3
0
            public void Should_set_switch_state_on_device()
            {
                try
                {
                    var container = IoC.Initialize();
                    var network   = container.GetInstance <ZWaveNetwork>();

                    var result = network.SetSwitchState(new ZWaveValueIdentity(25479126, 2, 72057594076282880), SwitchState.Off);
                    result.IsSuccessful.ShouldBeTrue();
                }
                finally
                {
                    ZWaveManagerFactory.Destroy();
                }
            }
Exemple #4
0
 protected void Application_End()
 {
     ZWaveManagerFactory.Destroy();
     Log.Debug("Application ({0}) ending", ApplicationId);
 }