WebSocket support for in the broker

#1

Hello,

I am building a library to enable the use of mobile devices as “device” in Structure. However, the broker is giving me hard time.

The library that i am building is a javascript code that is supposed to run in all the mobile device. it uses Paho from eclipse IoT for MQTT. I am getting timeout from the broker,

Can you tell me please if the Structure MQTT broker support MQTT over websockets ?

I would like to know if it possible to access to more details of the Structure platform about the connection errors

Thanks per advence

0 Likes

#2

Websocket connection support is coming very soon. We are making some adjustments to our Node.js SDK that will enable this functionality.

In respect to the connection errors, what information are you getting currently and what would you like to see?

0 Likes

#3

I do not plan to use nodeJS in my app. it is a pure html/js on the client side. I guess that the support of the websockets on the broker will be enabled with the release of your nodeJS SDK ?

Regarding the connections. i would like to see the IPs of the devices that fails to connect to my Structure app.

0 Likes

#4

oops !! the websocket support is alredy enabled. shame on me, i was using the wrong port. it is availible on port 80

0 Likes

#5

WebSockets are enabled on the broker over ports 80 and 443. I would recommend 443 (TLS) for better security. More details on the MQTT docs page: https://docs.losant.com/mqtt/overview/

0 Likes

#6

I know you’re not using the Node.js SDK, but I wanted to inform everyone that the option is available and now documented in the README.

0 Likes

#7

Thanks for your help. now my project works with a standalone page . Your NodeJS doc helps me a lot.
I am trying to setup a IoT gateway using R-PI3 and your NodeJS SDK.

Thanks again !!

1 Like