예제 #1
0
        public void AdapterInitialize()
        {
            _controller = _mqttAdapterDbService.InitializeAdapter(this);
            SetupStateMapping(_mqttAdapterDbService.GetStates(_controller));

            _messageBroker.SendMessage(new MessageBrokerMessageArgument {
                Topic = $"{_initializationArguments.CommandPrefix}/{_initializationArguments.Identifier}/power"
            });
        }
예제 #2
0
        void RegisterKnownAdapters()
        {
            foreach (var adapter in _mqttAdapterService.ReadConfiguration())
            {
                RegisterAdapter(adapter);
            }

            foreach (var adapter in _adapters)
            {
                _mqttAdapterDbService.InitializeAdapter(adapter);
            }
        }