MQTT communications are now available when using WebSockets. This communication protocol is supported on Windows 8+ operating systems. The combination of MQTT via WebSockets allows bidirectional communication from client to server even within a browser. This will allow IoT communications in the form of mobile web applications and push notifications.
MQTT communications offer users an additional communication option for IoTWorX users. MQTT is important when utilizing a constrained device over a volatile network. This also will allow IoT communications even when using web browsers. Additionally, since WebSockets communicate by default using port 80 or 443, it will not require special rules to communicate within firewalls.
To Set MQTT Communications Via WebSockets:
Launch the Workbench.
Navigate to MQTT Brokers (Internet of Things > MQTT Brokers) in the Project Explorer.
Select an existing MQTT Broker or create a new one. To create a new MQTT Broker, right-click on MQTT Brokers in the Project Explorer and select Add MQTT Broker, as shown below.
Add MQTT Broker
Within the Broker Settings section, a user can specify new protocols. These new options are Web Sockets (“ws:”) and Secure Web Sockets (“wss:”).
Web Sockets and Secure Web Sockets
Select a protocol. The remaining form should be filled out accordingly, like any other broker.
See Also: