LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview-MQTT- Node Red

Hello!
Can anyone help me connect LabVIEW with Node-RED?

I already have the broker communicating with Node-RED, but I could not figure out how to establish the same communication between LabVIEW and Node-RED through the broker!

I followed everything I found online, but nothing has worked so far.

Thank you in advance.

0 Kudos
Message 1 of 6
(341 Views)

Hi,

Same thing here, bro.

I did everything I could, but it is still not working.

The moment I establish the communication, the Connect to Server block returns “Connection accepted.” However, right after that, Error 66 pops up and says the server is disconnected again:

MQTT Client.lvlib:Session.Client.lvclass:Send Packet.vi:6230001 <ERR> Server disconnected

So basically, the connection is accepted first, but then the server immediately disconnects during the MQTT packet send process.

I am stuck at the same point as you, bro.

0 Kudos
Message 2 of 6
(314 Views)

Hello!
Can anyone help me connect LabVIEW with Node-RED?

I already have the broker communicating with Node-RED, but I could not figure out how to establish the same communication between LabVIEW and Node-RED through the broker!

I followed everything I found online, but nothing has worked so far.

Thank you in advance.

0 Kudos
Message 3 of 6
(291 Views)

You need to give a lot more details. 

 

Show us what you have tried. 

Do you get any errors?

What LabVIEW version are you using? 

What hardware are you running the code on? 

Where is the broker located? Have you tried with a test broker ? 

 

0 Kudos
Message 4 of 6
(238 Views)

Split up your problem into LabVIEW - MQTT and MQTT - Node Red. Use some sort of MQTT sniffer program (I like https://mqtt-explorer.com/) and make sure you're talking to the server. Once that's sorted, you can use Node Red. In fact, I'd recommend JUST using MQTT Explorer and getting THAT to talk to your broker.

 

That said, with no more info on your setup I'll have to look into my magic 8 ball and make a guess.

 

I'll guess you're using mosquitto and followed a (slightly) old tutorial, and that you moved your mqtt server off of your localhost and now nothing connects. If that's the case, it's because mosquitto by default doesn't allow unencrypted connections from anything but localhost. You have to explicitly allow it. Check this thread for some more info:

 

https://forum.cedalo.com/t/mosquitto-on-pi-only-works-in-localhost/311

 

Also, be sure to read your mosquitto log files. It'll tell you why a connection is refused/dropped/etc.

Message 5 of 6
(200 Views)

Reading the reddit threads, I assume the problem is with TLS certificates. That MQTT implementation does not load the machine certificates by default so SSL verification always fails.

Read here: https://github.com/LabVIEW-Open-Source/MQTT-Connection-SecuredTCP/issues/7

 

0 Kudos
Message 6 of 6
(178 Views)