MQTT C# - Using MQTT with C# [Step By Step Tutorial For MQTT Integration] - M2MQTT C#

  Рет қаралды 51,768

Coding Droplets

Coding Droplets

Күн бұрын

Пікірлер: 73
@kuronek069
@kuronek069 2 жыл бұрын
if i subcribed to a list of topic, how could i know the topic which i received message
@CodingDroplets
@CodingDroplets 2 жыл бұрын
e.Topic will give you the topic to which the message is delivered. You can use conditions to do various actions based on topics. Very good question.
@kuronek069
@kuronek069 2 жыл бұрын
@@CodingDroplets thank you so much, it help me alot.
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Most welcome!!
@zorzional
@zorzional 2 жыл бұрын
@@CodingDroplets Thank you very much for the explanation. Can you give a simple code example?
@zorzional
@zorzional 2 жыл бұрын
I would like to put data in a textbox based on a topic in a list, can you help me?
@thinleyjamtsho3158
@thinleyjamtsho3158 3 жыл бұрын
nice tutorial video, it helped me a lot.....thank you for sharing your knowledge
@CodingDroplets
@CodingDroplets 3 жыл бұрын
Glad to hear that
@CodingDroplets
@CodingDroplets 3 жыл бұрын
Hello everyone! Thanks for watching this video. We have started a new tutorial series on *.Net Blazor* . Check it out now: kzbin.info/aero/PLzewa6pjbr3IQEUfNiK2SROQC1NuKl6PV Follow on Twitter: twitter.com/codingdroplets
@himalayaannabhurana6325
@himalayaannabhurana6325 2 жыл бұрын
i like your desktop wallpaper
@CodingDroplets
@CodingDroplets 2 жыл бұрын
🙂
@kitaekim9163
@kitaekim9163 Жыл бұрын
Why "Properties\Resources.resx" could not be found. Does this error appear when I build?
@CodingDroplets
@CodingDroplets Жыл бұрын
Thanks for checking out my video and leaving a comment. To answer your question, the "Properties\Resources.resx" file is typically automatically generated when you create a new WinForms application in Visual Studio, and it contains any resources (such as images or strings) that your application uses. If you're seeing an error message saying that the file could not be found, it's possible that the file was accidentally deleted or moved, or there may be a problem with your Visual Studio project file.
@mantaemilian5029
@mantaemilian5029 Жыл бұрын
I made an application in xamarin forms with a mqtt broker installed on a raspberry pi. when I'm connected to the network with raspberry, everything works very well, but I can't configure it to be able to access it from another network. how can this be done? when I'm on the network I put the local IP, but to leave the network I don't know what to put on the server.
@CodingDroplets
@CodingDroplets Жыл бұрын
Thank you for sharing your experience! To make your Xamarin Forms application with an MQTT broker accessible from another network, consider hosting your MQTT service in a public cloud.
@edinetgrunhed6000
@edinetgrunhed6000 2 жыл бұрын
sir how to modify the code if i use broker e.g. hivemq rathern than localhost?
@CodingDroplets
@CodingDroplets 2 жыл бұрын
I haven't used it yet. But as of my limited knowledge, HiveMQ is providing its own client library.
@mintheinwin4959
@mintheinwin4959 Жыл бұрын
Hello Sir, how to connect configuration instead of "127.0.0.1" if using with different computer for application1 and application2. Or how to check ip of mosquito mqtt.
@CodingDroplets
@CodingDroplets Жыл бұрын
Thank you for your comment and for watching my video on MQTT integration with .NET C#! To connect to a Mosquitto MQTT broker running on a different computer, you will need to replace the IP address "127.0.0.1" with the IP address of the remote computer where Mosquitto is running. You can find the IP address of that computer by opening a command prompt (on Windows) or a terminal (on Linux or macOS) and typing "ipconfig" (or "ifconfig" on Linux/macOS). Look for the IP address listed under "IPv4 Address" or "inet". Once you have the IP address, you can use it to connect to Mosquitto from your application by replacing "127.0.0.1" with the remote computer's IP address. I hope this helps, and if you have any further questions, please feel free to ask! Thank you again for your comment and for watching my video.
@trile6518
@trile6518 Жыл бұрын
@@CodingDroplets I replaced IP address for both applications on two PCs. but it didn't work. Ports also are allowed in Window FireWall. Could you give any suggestions?
@edinetgrunhed6000
@edinetgrunhed6000 Жыл бұрын
thanks for this video i learned a lot, can you add event that if a broker is disconnect it will notify the application
@CodingDroplets
@CodingDroplets Жыл бұрын
Thank you for watching the video and for your comment! I'm glad to hear that you learned a lot from it. To answer your question about detecting when the MQTT broker disconnects, you can use the ConnectionClosed event provided by the M2MQTT library. This event is raised when the connection to the broker is closed, allowing you to handle it in your application.
@edinetgrunhed6000
@edinetgrunhed6000 Жыл бұрын
@@CodingDroplets can u procide the code, its not working when i tried
@wolfgangwulz8079
@wolfgangwulz8079 3 жыл бұрын
Its a nice video and explanation is good, but I tried running on two different computers (exchanged IP-Address) but it didn't work. Do you have any suggestion?
@CodingDroplets
@CodingDroplets 3 жыл бұрын
It will work. Your firewall might be blocking the incoming request. Try adding an inbound rule in firewall.
@juancarlosabad3298
@juancarlosabad3298 3 жыл бұрын
thank you but you should at least mention which MQTT server (not service) you started on your manchine...is it a Mosquitto MQTT server? thank you in advance!
@CodingDroplets
@CodingDroplets 3 жыл бұрын
Sorry for that. I really missed to mention that in the video. I've used Mosquitto MQTT Server.
@jettaglnegro
@jettaglnegro 3 жыл бұрын
Puedes crear un void conect-mqtt(); y llámalo desde un botón?
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Sorry for the delayed reply. Yes.. that can also be done. In this demo we are initiating MQTT service on loading itself.
@jettaglnegro
@jettaglnegro 2 жыл бұрын
@@CodingDroplets muchas gracias
@jettaglnegro
@jettaglnegro 3 жыл бұрын
You know how to invoke the method of when the connection to the broker is lost.
@CodingDroplets
@CodingDroplets 3 жыл бұрын
The m2mqtt client has a "ConnectionClosed" event. You can implement your reconnect method in it.
@jettaglnegro
@jettaglnegro 3 жыл бұрын
@@CodingDroplets if that was the one I used ... but it takes 2 minutes to confirm the loss of the connection .. how did I reduce the time?
@KemauSi
@KemauSi Жыл бұрын
How do I install the friggin service than?
@CodingDroplets
@CodingDroplets Жыл бұрын
mosquitto.org/
@KarmaYuta
@KarmaYuta 2 жыл бұрын
hi, great. can you able to provide a video fpr Asp core 5.0?
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Hello Suresh Rao, First of all I need to thank you for taking time to comment the video. We, Coding Droplets have already done videos using dotnet5 and dotnet 6 frameworks. In our Blazor Tutorial series we have used dotnet5 and dotnet6. Link below for your reference. Blazor Tutorial: kzbin.info/www/bejne/morCcoqaeN-mebs If you are an API developer you might be interested in our gRPC Tutorial series which is also developed using dotnet6. Link below. gRPC Tutorial Series: kzbin.info/www/bejne/rl7OpaqDibNjj9k Also, please let us know what kind of tutorials your are interested in. Coding Droplets will be there always to help you for dotnet development. Once again thank you very much for your continued support.
@bielschz2302
@bielschz2302 3 жыл бұрын
How can I connect to another networked machine, and publish there?
@CodingDroplets
@CodingDroplets 3 жыл бұрын
You can provide the Machine IP address in the connection. Please make sure the port number is enabled in firewall.
@pioneer-sr4dh
@pioneer-sr4dh 3 жыл бұрын
how can keep alive my connection please help me
@CodingDroplets
@CodingDroplets 3 жыл бұрын
MQTT Client is having an event that can be fired on disconnection. You can try reconnecting again while firing the disconnection event.
@pioneer-sr4dh
@pioneer-sr4dh 3 жыл бұрын
@@CodingDroplets I do search about that but I didn't get any thing can you help me with this
@CodingDroplets
@CodingDroplets 3 жыл бұрын
@@pioneer-sr4dh You can find an event with the name "ConnectionClosed". Whenever the connection is lost, application will trigger this event.
@pioneer-sr4dh
@pioneer-sr4dh 3 жыл бұрын
@@CodingDroplets ok thanks bro
@khaledbadiy7108
@khaledbadiy7108 3 жыл бұрын
perfect can you please shear the source code id it possible
@CodingDroplets
@CodingDroplets 3 жыл бұрын
Sure. We'll share the source code link soon.
@khaledbadiy7108
@khaledbadiy7108 3 жыл бұрын
@@CodingDroplets really it's a pleasure to have people share knowledge like this how can I contact you for business staff. please send me an email to this one Badiy.khaled@gmail.com
@CodingDroplets
@CodingDroplets 3 жыл бұрын
@@khaledbadiy7108 We are sorry to say that we don't provide recruitment services. We are just a team of experienced Software Developers and we share the knowledge for those who are in need.
@CodingDroplets
@CodingDroplets 3 жыл бұрын
We have added the Sample Project download URL in the video description.
@khaledbadiy7108
@khaledbadiy7108 3 жыл бұрын
@@CodingDroplets Thank you so much for your help :)
@AmitNaik8103
@AmitNaik8103 3 жыл бұрын
Nice tutorial, but source code not able to open. could you share github link of source code
@CodingDroplets
@CodingDroplets 3 жыл бұрын
Please use the new github url mentioned in the video description.
@itebguich8632
@itebguich8632 3 жыл бұрын
please can you post the source of the code if possible.
@CodingDroplets
@CodingDroplets 3 жыл бұрын
We have added the Sample Project download URL in the video description.
@xinjin871
@xinjin871 Жыл бұрын
Can we get the source code?
@CodingDroplets
@CodingDroplets Жыл бұрын
You can find the source code from the below github repository: github.com/codingdroplets/MqttCSharpSample
@MartinMaat
@MartinMaat 2 жыл бұрын
Thank you. The piano was just distracting and annoying, please do not apply this to your videos again.
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Sorry! Noted
@cozmadenis4752
@cozmadenis4752 2 жыл бұрын
Hi, i have a problem with the connection, it gives this error uPLibrary.Networking.M2Mqtt.Exceptions.MqttConnectionException: 'Exception connecting to the broker'. SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:1883 . Any ideas solving it? Nice tutorial, btw.
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Do you have MQTT Service installed in your machine?
@cozmadenis4752
@cozmadenis4752 2 жыл бұрын
@@CodingDroplets Yes, i do
@CodingDroplets
@CodingDroplets 2 жыл бұрын
1883 is the default port number for MQTT service. Have you assigned any custom port number? We have provisions to assign custom port number instead of 1883. Try telnet from command prompt to check the connectivity: telnet localhost 1883 You may need to install Telnet Client if it is not installed
@CodingDroplets
@CodingDroplets 2 жыл бұрын
Also make sure the MQTT service is running.
@faisalreza9887
@faisalreza9887 Жыл бұрын
@@CodingDroplets Hallow, how to install MQTT Service in my computer?
How to Get Started with MQTT
13:38
Opto Video
Рет қаралды 410 М.
Real-Time Notifications Using Blazor and SignalR from scratch
19:43
Milan Jovanović
Рет қаралды 39 М.
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
What is MQTT | MQTT Essentials Part 1
6:26
HiveMQ
Рет қаралды 93 М.
Easy MQTT Server Setup
7:35
bitluni
Рет қаралды 213 М.
Tutorial: Visual Basic .Net MQTT Client WinForm
20:46
HadiSCADA
Рет қаралды 3,4 М.
How to create MQTT Client using .Net Core
15:24
Daily Code
Рет қаралды 29 М.
Intro To RabbitMQ
54:06
IAmTimCorey
Рет қаралды 110 М.
What is an MQTT Broker Clearly Explained
10:11
Opto Video
Рет қаралды 197 М.
Connect ESP32/ESP8266 & C# .NET Core Using MQTT - Easy Tutorial
10:08
Coding With Brett
Рет қаралды 3,7 М.