Пример #1
0
        public async Task StartMQTT()
        {
            await ConnectMQTT();
            await Publish("Test", "Test123");

            mqttClient.UseConnectedHandler(async e => {
                await SubscribeCommand("cmnd/#");
                await SubscribeHydrophonics("hydroponics/#");
            });
            mqttClient.UseApplicationMessageReceivedHandler(MessageReceived);
        }