简体   繁体   中英

Having problems running WebSocket for mqtt

I'm trying to replicate this demo 演示
using my own mosquitto instance to control the meter. When I try to connect to " test.mosquitto.org", 8080 everything works great, but when I plug my own mqtt server's IP I receive: Connection failed: AMQJ0007E Socket error:undefined.
I believe this is due to the requirement of a websocket service to run on the same machine as the mqtt. The original author uses WSS, and I can't figure out how to install this service (complete noob). I Even tried to follow these directions with no luck Could anyone give some directions?

You can try Installing him HiveMQ while you wait for mosquito 1.4. That is a broker with websockets built in.

The easiest answer to this is probably to wait for Mosquitto v1.4 to ship which has baked in Websocket support.

If you can't wait for it to ship you can build from the development head stream which will get you what your looking for. You've not said what platform you are running the broker on, but these instructions should help on Linux: http://goochgooch.wordpress.com/2014/08/01/building-mosquitto-1-4/

Mosquitto v1.4已于2015年2月18日发布。它已内置对websockets的支持。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM