Questions tagged [mqttnet]
78 questions
0
votes
1 answer
MQTT5 User Properties with Mosquitto Bridge
I am running a local Mosquitto (MQTT) Broker that connects to a remote Mosquitto Broker using the build in MQTT Bridge functionality of Mosquitto. My mosquitto.conf looks like this:
#…

JCoordes
- 147
- 4
- 10
0
votes
1 answer
blazor mqttnet connection fails due to ws vs wss
I'm coding an application in blazor using MQTTNET nuget to connect to hivemq (a public free server)
If I connect without WithTls() It does work when debugging locally but once I upload to github pages it fails because "a https tried to connect to a…

javirs
- 1,049
- 26
- 52
0
votes
1 answer
MQTTnet disconnects from Azure IoT Hub on message publish
I am trying to subscribe MQTT messages in Azure IoT Hub. I am able to publish message using MQTTNet library but when I create subscriber to receive message from IoT hub then connection gets disconnected once message is published to the IoT hub.
I…

AMAR MATHUR
- 46
- 10
0
votes
0 answers
PublishAsync method of MQTTNet client hangs forever when calling wait during internet disconnection
I am using the mqttnet client in a sync way. Meaning that I am waiting for the result every time I am calling the publish async method.
the tread context is neither from UI nor from a MVC controller.
In fact I am creating a task using a…

hak
- 49
- 3
0
votes
0 answers
MQTTnet - pass data to view during UseApplicationMessageReceivedHandler
how to save data in temp and pass to view
var messageBuilder = new MqttClientOptionsBuilder()
.WithClientId(clientId)
.WithCredentials(mqttUser, mqttPassword)
.WithTcpServer(mqttURI, mqttPort)
…

Yeong Lestle
- 17
- 6
0
votes
0 answers
How to enable external request in IIS Express and MQTTnet
i was able to access normal iisexpress-webservices from extern with change of
....vs\DashboardCore\config\applicationhost.config
when adding more bindings with my hostname:
/

fd1
- 21
- 2
0
votes
1 answer
MQTTnet: Cannot send/receive CorrelationData
We are using the MQTTnet library in its lastes version to communicate. General communication is working. It's possible to subscribe and publish. The Payload and the Topic are received. But when publishing a message with CorrelationData set, in the…

be_mi
- 529
- 6
- 21
0
votes
0 answers
Mqtt isConnected property is false but messages are received
I'm trying to connect to Mosquitto using MQTTnet. I am able to receive messages but IsConnected property is false. Anyone know why?
Only property iStart is set to true.
The problem seems to be with the Mosquitto host.
mosquitto.conf is mostly…

Kacper Wojnar
- 1
- 2
0
votes
0 answers
Sparkplug B with MQTT in C# -> MQTT Broker connection not working as expected
https://github.com/SeppPenner/SparkplugNet/blob/master/HowToUse.md
I have explored the above link and implemented the sample solution for sparkplug B with MQTT (sender and receiver).
But when I am executing the below methods I am getting a "Null…

Kalpana K
- 59
- 1
- 10
0
votes
0 answers
Connect to MQTT Broker using cacert,clientcert and key using MQTTNet
I am using MQTTNet with .Net 6 . My MQTT Broker provides 3 certificates as follows
CA Cert
Client Cert
Client Key
These certificates are valid and work if i use them with a software like MQTTExplorer.
Now I am trying to use MqttNet (latest…

Mandar Jogalekar
- 3,199
- 7
- 44
- 85
0
votes
1 answer
MQTTNet managed client scaling issue
I am having ManagedMqttClient to establish connection to Solace.
public async Task Connect()
{
_mqttClient = new MqttFactory().CreateManagedMqttClient();
_mqttClientOptions = new MqttClientOptionsBuilder()
…

kanils_
- 385
- 1
- 17
0
votes
0 answers
Mqtt connection timeout - localhost mosquitto
I'm trying to connect to my local mosquitto by this code, but always get this error:
Error while authenticating. The operation has timed out.
Any idea what I'm doing wrong?
I manage to connect to the server test.mosquitto.org by this code.
Also I…

Kacper Wojnar
- 1
- 2
0
votes
2 answers
How to cancel an async connect method after X seconds in C#
I am creating a mqtt client in C# with the libray MQTTNet.
I wan't my client to connect to a broker and stop after 1 second if doesn't succeed.
Here is the function I made below.
private async Task TryConnect(MqttClientOptions options)
{
…

Manu
- 51
- 3
0
votes
1 answer
Subscriber on Mosquitto MQTT ContentType is Null
I'm trying to publish a serialized message and sending the ContentType of that object type, so when I receive the message on the subscriber I know which type I can deserialize back to.
Here is the publish code:
public async Task…

João Antunes
- 798
- 8
- 27
0
votes
1 answer
How to connect to an MQTTServer in a Blazor app published to IIS?
Trying to get over this bump to begin getting my Home Automation projects going.
I created a Blazor Server App using the template in VS 2022.
Added a menu item called "Lights" that brings up a Lights.razor page.
In it, I added the below MQTTServer…

Flood
- 345
- 7
- 12