
MQTT Interface Error when connecting to HiveMQ Cloud
I'm having trouble getting Realvirtual MQTT to connect to HiveMQ Cloud. When I test with Python code, everything works perfectly; the connection is established, and I can publish data. However, Realvirtual MQTT reports an error specifically when using HiveMQ Cloud. I've tested both with and without the security option enabled. This issue doesn't occur when using a local MQTT Mosquitto broker.
MQTTInterface
Error
Answer

New fresh Unity project created!
Tested with the Mosquitto test broker "test.mosquitto.org" and port 1883, but the same error occurs.
I deleted everything in the Session folder, but nothing helps.
I do not have this problem when communicating with Python code — only with the Unity realvirtual MQTT interface.
Also, I do not have problem when using the realvirtual MQTT connection with a local broker for example 127.0.0.1 and port 1883
test.mosquitto.org
Error

Hi Ahmo,
I am the interface expert at realvirtual.io but I am currently in vaction (until end of next week).
Can you send me your test project and I will be able to check here from remote.
Please send your full project to https://realvirtual.io/send/ (please zip it and delete the library folder).
Best regards
Thomas

Hi,
I checked within the project you have send the Test Mosquitto Server and it worked as expected. Can you please check this setting if it works on your side?

I tested it and the same problem occurs
The real problem occurs when it needs to import topics.
mosquitto broker hierarchy
It can connect
But it cannot import
Full error after pressing the Import Signals button
Did you use my BEST.HTTP package or yours?
Is it possible that for some reason it cannot store data on my Host PC?
Or am I doing something wrong?

Is there a reason that you are using old realvirtual version - we are currently having an improved Beta without BestHTTP but it is a little bit risky to use this with the old 2022 version?

I have many projects, and everything is stable with Unity 2022. At the moment, we don’t have the resources to switch to Unity 6 and migrate all the projects right now.
I’ve already tested the realvirtual 6 beta version with Unity 2022, and there are many errors during migration. As you’ve already mentioned, it’s risky.
I tested the Siemens Simit interface with the beta, and there’s a missing script, plus the “Update Signal Simit” button is missing — while everything works fine in the older version.
Additionally, I’ve already purchased the full BEST package. I believe we should focus on resolving this issue. I’ve already promised clients that the connection and simulation are possible.
I need to finish the demo by Wednesday.

OK, understood. Do you import during PlayMode? Currently implementation is not supporting to import signals during play mode because subscription and signal preparation is done when interface is getting connected which is usually when starting play mode.

If it's in non-Play Mode, then gets stuck during import and I have to do an End Task on Unity
As I mentioned before, the local broker works without any problems

I will send you a patch for testing. With the patch you are able to limit the number of imported topics and null messages and unpossible date formats are automatically filtered. You will get a private message.

"Please drag and drop this into your project and check if it is solving your problem"
I understood it was supposed to be just drag and drop :)
Actually, it has to be imported. Good news – it finally works!!
Tomorrow I will test whether the connection with the HiveMQ broker is okay, and I’ll let you know.

I tested the HiveMQ broker and this error appeared
For some reason, it can’t find the path. I checked, and both the path and the file exist.
If I delete all from Sessions folder, Unity properly creates everything that is missing.
C:\Users\MyName.LastName\AppData\LocalLow\DefaultCompany\Camera-sim\com.Tivadar.Best.HTTP.v3\MQTT\Sessions\M2NhYjMxYjMyMmU2NDJhMzg1ZTYxOTljMjcyMTczNjYuczEuZXUuaGl2ZW1xLmNsb3Vk\QmVzdC5NUVRUXzIzOGM3OGFjZmNkNTRhMTg4YjU0NDA2ODZjYjMwNjJm

For all those who are having issues with Best HTTP and the HiveMQ cloud broker:
The problem is that the generated path exceeds 260 characters. Unity only supports path up to 260 characters.
You can find the solution here:
https://bestdocshub.pages.dev/MQTT/#documentation-sections

For everybody who needs it - we have a patch for Unity2022. In the next realvirtual 6 release there will be an update also supporting Servers with a large number of MQTT Topics and better failure handling for unsupported datatypes. Also BestMQTT Dependency will be removed.
Customer support service by UserEcho
For everybody who needs it - we have a patch for Unity2022. In the next realvirtual 6 release there will be an update also supporting Servers with a large number of MQTT Topics and better failure handling for unsupported datatypes. Also BestMQTT Dependency will be removed.