Is it possible to be connected to TTN with mqttws31.js

Hello,

Is it possible to be connected to TTN with MQTT WebSockets (mqttws31.js)
Actually, I’ve got this error message in my browser console:

Firefox can not establish connection with the server ws://eu.thethings.network:1883
mqttws31.js Connection Message Error AMQJSC0001E Connect timed out

I though I should to put my authentication as "“userid” and “password”, in my code, but I don’t know how to.

No.

https://www.thethingsnetwork.org/forum/t/how-to-use-ttn-message-in-a-browser/5106/2

Thanks Arjan,

At least, it clear.

I read all examples on ttn npm page. I didn’t find how to put the hostname of the server like “eu.thethings.network” I put in mine python scripts.

Do you have some documentation or example about ?

See A Python program to listen to your devices with MQTT.

Hi ArjanVanb,

Sorry I didn’t answered well.
My python script is working well. I meant how to pus the the authentication and host is the nodejs script using ttn and socket.io packages.

Thanks