hi
i use library MQTTnet in visual studio for connect Blynk Mqtt. but am not connect. you can help me?
my config in visual
Dim clientOptions = New MqttClientOptionsBuilder() _
.WithTcpServer(“blynk.cloud”, 8883) _
.WithClientId(“TMPL62qRHGNDU”) _
.WithCredentials(“Monitor”, “LJJMeQWvaW8LvF7hEfsNEHlSd9ExdEF6”) _
.WithKeepAlivePeriod(TimeSpan.FromSeconds(45)) _
.WithTimeout(TimeSpan.FromSeconds(60)) _
.WithCleanSession(True) _
.WithTls() _
.Build()
and my Blynk config
#define BLYNK_TEMPLATE_ID “TMPL62qRHGNDU”
#define BLYNK_TEMPLATE_NAME “MQTT TEST”
#define BLYNK_AUTH_TOKEN “LJJMeQWvaW8LvF7hEfsNEHlSd9ExdEF6”
Thank you
According to the Blynk documentation, your username should be “device” but you appear to be using “Monitor” instead…
Authentication
MQTT client configuration:
-
ClientID:
""
(or any UTF-8 encoded string, up to 64 characters long) -
Username:
"device"
-
Password:
BLYNK_AUTH_TOKEN
(see Device info) -
Keepalive:
45 seconds
(recommended) -
Clean Session:
True
Pete.
“device” Must be put ESP8266 or ESP32 ?
No, “device” must be “device” no changes, just the word “device”.
Pete.
That is OK. Thank you so mush