This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist demonstrates a simple method to create a WebSockets proxy for a MQTT broker. | |
# I use this method to provide a WebSockets interface for the Mosquitto MQTT broker. | |
# This lets my browser based MQTT applications to access my MQTT broker. | |
# I consider this approach simpler than the common alternative which is to run lighttpd | |
# with the mod_websocket addon which can be complex to setup. | |
# | |
# Dependencies are Python, Twisted and Autobahn. | |
# | |
# This example sets up a WebSockets server listening on localhost:9000. Messages received from | |
# WebSocket clients are forwarded to the MQTT broker using the endpointforward plugin provided |