Hi there
I have a weird behavior trying to use the MQTT Integration. I did all as suggested but I receive failed to connect messages in the live data of the application. “Fail to connect to MQTT - Invalid token” so I tried to figure out what I have done wrong and installed MQTT Explorer and how wonder the MQTT Explorer reacts on the uplink messages. How can that be?
In the live data of the device I see the decoded payload and also see this information in the MQTT Explorer but still these “Fail to connect to MQTT - Invalid token” messages. For me this is curious because the live data tells me that the I am not able to subscribe but I still see the published messages.
Any hint.
Perhaps there are multiple processes trying to to access MQTT, and one of them is not authenticated/authorised properly.
In your case, I would assume there are now two connections:
- Your MQTT integration application
- The MQTT explorer connection
It would seem that the second is working correctly, and that your actual MQTT integration is simply not authorized properly, causing the ‘Invalid token’ message. I would double-check that the actual integration is using the same credentials as used in MQTT explorer.
Hi there. Thank you for this fast response. Now I checked both. I closed the MQTT Explorer. No change. I use the same credentials for TheThingsNetwork application and the MQTT explorer. What bothers me is that I get a message that the MQTT connection from the application fails but I receive the correct values in MQTT Explorer. I think, if the connection fails I should not get data published by MQTT. It is weird, isnt it?
Regards, Harald
PS.: The description of MQTT is also different from current behaviour. I checked in three browsers. Always the same.
https://www.thethingsindustries.com/docs/integrations/mqtt/
You won’t. There is some other mqtt client trying to connect using the same user but with faulty credentials. Stop all your mqtt clients (do you have node-red running with mqtt?) and wait a while. Keep in mind someone else might be using a faulty application name ik their mqtt setup, however given your application name chances are small.
Ps. If you mention behavior is different you need to be more specific. What differs? We’re not going to read that page and try for ourselves to see what might have triggered your remark. As a volunteer I have a life as well…
Sure. In fact I have only connected one device with this credentials. I saw that application live data showed me this error although I was able to connect to MQTT Exlorer without hasle and I receive the payload. That is why I am really confused. Where should this other client come from? Only to see if someone sees the same. Althoug there is an issue with the docs which show different than in reality.
Maybe someone tries.
Regards, Harald
That was a real good hint. Found that my nodeRED flow tried to connect with wrong credentials. Thank you very much.
Regards, Harald
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.