Ejemplo n.º 1
0
        public void Reset()
        {
            //TODO: clear Roomie representation of devices

            using (var stateWatcher = new ControllerNotificationWatcher(this))
            {
                Manager.ResetController(HomeId.Value);

                stateWatcher.WaitUntilEventType(ZWNotification.Type.NodeQueriesComplete, ZWNotification.Type.EssentialNodeQueriesComplete);
            }
        }
Ejemplo n.º 2
0
        public void Connect()
        {
            using (var watcher = new ControllerNotificationWatcher(this))
            {
                Manager.AddDriver(_serialPortName);

                watcher.WaitUntilEventType(ZWNotification.Type.NodeQueriesComplete, ZWNotification.Type.EssentialNodeQueriesComplete);
            }

            Load();
            Connected();
        }
Ejemplo n.º 3
0
        public override void RemoveDevice(Device device)
        {
            var zWaveDevice = device as OpenZWaveDevice;

            using (var watcher = new ControllerNotificationWatcher(this))
            {
                Manager.RemoveFailedNode(HomeId.Value, zWaveDevice.Id);

                watcher.WaitUntilEventType(ZWNotification.Type.NodeRemoved);
            }

            _devices.Remove(zWaveDevice);
        }
Ejemplo n.º 4
0
        public void Connect()
        {
            using (var watcher = new ControllerNotificationWatcher(this))
            {
                Manager.AddDriver(_serialPortName);

                watcher.WaitUntilEventType(ZWNotification.Type.NodeQueriesComplete, ZWNotification.Type.EssentialNodeQueriesComplete);
            }

            Load();
            Connected();
        }
Ejemplo n.º 5
0
        public void Reset()
        {
            //TODO: clear Roomie representation of devices

            using (var stateWatcher = new ControllerNotificationWatcher(this))
            {
                Manager.ResetController(HomeId.Value);

                stateWatcher.WaitUntilEventType(ZWNotification.Type.NodeQueriesComplete, ZWNotification.Type.EssentialNodeQueriesComplete);
            }
        }
Ejemplo n.º 6
0
        public override void RemoveDevice(Device device)
        {
            var zWaveDevice = device as OpenZWaveDevice;

            using (var watcher = new ControllerNotificationWatcher(this))
            {
                Manager.RemoveFailedNode(HomeId.Value, zWaveDevice.Id);

                watcher.WaitUntilEventType(ZWNotification.Type.NodeRemoved);
            }

            _devices.Remove(zWaveDevice);
        }