Inheritance: CCToolsBoardBase, IBinaryOutputController
        public HSPE16OutputOnly RegisterHSPE16OutputOnly(Enum id, I2CSlaveAddress address)
        {
            var device = new HSPE16OutputOnly(DeviceIdFactory.CreateIdFrom(id), address, _i2CBusService);
            _deviceService.AddDevice(device);

            return device;
        }
        public HSPE16OutputOnly CreateHSPE16OutputOnly(Enum id, int address)
        {
            var device = new HSPE16OutputOnly(id.ToString(), address, _i2CBus, _notificationHandler) { AutomaticallyFetchState = true };
            _ioBoardManager.Add(id, device);

            return device;
        }
Exemplo n.º 3
0
        public HSPE16OutputOnly CreateHSPE16OutputOnly(Enum id, I2CSlaveAddress address)
        {
            var device = new HSPE16OutputOnly(DeviceIdFactory.CreateIdFrom(id), address, _i2CBus);

            _controller.AddDevice(device);

            return(device);
        }
Exemplo n.º 4
0
        public HSPE16OutputOnly RegisterHSPE16OutputOnly(Enum id, I2CSlaveAddress address)
        {
            var device = new HSPE16OutputOnly(DeviceIdFactory.CreateIdFrom(id), address, _i2CBusService);

            _deviceService.AddDevice(device);

            return(device);
        }
Exemplo n.º 5
0
        public HSPE16OutputOnly RegisterHSPE16OutputOnly(string id, I2CSlaveAddress address)
        {
            var device = new HSPE16OutputOnly(id, address, _i2CBusService, _deviceMessageBrokerService, _log);

            _deviceService.AddDevice(device);

            return(device);
        }
        private void SetupStairsLamps(IArea room, HSPE16OutputOnly hspe16FloorAndLowerBathroom)
        {
            var output = new LogicalBinaryOutput()
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO8])
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO9])
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO10])
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO11])
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO13])
                .WithOutput(hspe16FloorAndLowerBathroom[HSPE16Pin.GPIO12])
                .WithInvertedState();

            _actuatorFactory.RegisterLamp(room, Floor.LampStairs, output);

            _automationFactory.RegisterConditionalOnAutomation(room, Floor.LampStairsAutomation)
                .WithActuator(room.GetLamp(Floor.LampStairs))
                .WithOnAtNightRange()
                .WithOffBetweenRange(TimeSpan.FromHours(23), TimeSpan.FromHours(4));
        }