Skip to main content
Jump to: navigation, search

SensiNact/Bridge Websocket

Description

This bridge wraps the SNA message destined to the clients into a Websocket message, which allows clients to receive notification of the gateway even if they are located behind a proxy server without an address that can be reached by the gateway.

Tools

In order to make sure the bridge works, some tools where developed, and this tools are available from the version 20160617.4-dev

Gateway Websocket debug

Access http://GATEWAY_IP/studio-web/debug.html, this will connect to the Websocket bus and show the messages (by consequence the device state). This will help you to debug in case of issue.

Gateway command line

On the OSGi gateway shell you can use the domain ws to see, send messages and disconnect the actual clients connected to the Websocket bus.

List connected clients

ws:clients

Disconnect all clients

ws:clients -disconnect

Send message to the clients

ws:clients -send "my message"

Back to the top