WebSocket API
Extension
The WebSocket API Extension is discontinued. It is replaced by the JavaScript API Library. If you need assistance, please contact Technical Support.
The WebSocket API Extension is a WebSocket proxy that allows web based applications to interact directly with a deviceWISE gateway.
Using the JavaScript library that comes bundled with the WebSocket API Extension, web-based applications are able to:
- Read, write, and subscribe to variables
- List devices, projects, and triggers
- Subscribe to channels
- Start and stop devices, triggers, and projects
- Fire triggers
- Issue network pings
- Issue SQLite commands
- Get device information
- Get references
- Login and logout users.
Obtaining the WebSocket API Extension file
Follow these steps to download the WebSocket API Extension file for the target deviceWISE gateway:
- Log on to the Management Portal, and then select
Developer.
The Developer menu appears. - From the Developer menu, select
Resources.
- From under Index of files, select
the appropriate build (if you are not sure, pick the
latest available build).
- Select the gateway platform for the WebSocket API Extension
- Select Packages
- Select Prototype
- Select dw.dwwsapi.XXX.pkg (where XXX is the platform and version of the extension) and download the file.
Installation
The WebSocket API Extension is installed on a deviceWISE gateway using the deviceWISE Workbench -> Packages tab. For more information on installing packages and extensions, see Packages.
Once the WebSocket API Extension is installed and the gateway is restarted, the WebSocket proxy will begin running in the background.
The JavaScript library files are placed into the www/devicewise directory within the Staging Browser file system when the extension is installed.