protected override async Task InitDevices()
        {
            _frontDoorLock =
                await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt");

            _smartthingsLock =
                await _hub.GetDeviceByMappedName <LockDevice>("Lock.SmartThingsFrontDoorDeadbolt");
        }
Exemplo n.º 2
0
        protected override async Task InitDevices()
        {
            _livingRoomLight = await _hub.GetDeviceByMappedName <DimmerSwitchRelay>("Switch.LivingRoom");

            _frontDoorLock = await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt");

            _alexaLivingRoom = await _hub.GetDeviceByMappedName <Speaker>("Speaker.Alexa-LivingRoom");

            _weather = await _hub.GetDeviceByMappedName <Weather>("Misc.Weather");
        }
Exemplo n.º 3
0
        protected override async Task InitDevices()
        {
            _frontDoor =
                await _hub.GetDeviceByMappedName <ContactSensor>("Contact.FrontDoor");

            _frontDoorLock =
                await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt");

            _notificationDevices =
                new List <Speaker>()
            {
                await _hub.GetDeviceByMappedName <Speaker>("Speaker.WebhookNotifier"),
                await _hub.GetDeviceByMappedName <Speaker>("Speaker.KitchenSpeaker")
            };
        }
Exemplo n.º 4
0
        public override StartCommandResult OnStartCommand(Intent intent, [GeneratedEnum] StartCommandFlags flags, int startId)
        {
            var bundle = intent.Extras;

            var isLockDeviceAction = bundle.GetBoolean("IsLockDeviceAction");


            if (isLockDeviceAction)
            {
                Lock = new LockDevice(this);
                Lock.StartLockDevice();
            }
            else
            {
                MenuControlPower = new MenuControlPower(this);
                MenuControlPower.OpenMenuControl();
            }
            return(StartCommandResult.NotSticky);
        }
Exemplo n.º 5
0
 private void InitPowerControl()
 {
     Lock             = new LockDevice(this);
     MenuControlPower = new MenuControlPower(this);
 }