Skip to content

Instantly share code, notes, and snippets.

View jamespet77's full-sized avatar

James Peterson jamespet77

View GitHub Profile
@jamespet77
jamespet77 / Websocket Gist
Created July 13, 2017 14:43
Testing Websockets
<body>
//var WebSocket = require('ws');
var username = 'admin'; //replace with admin username
var password = 'my password'; //replace with admin password
var host = 'isy.linuxjet.com:2653'; //replace with your ISY IP
var auth = username + ':' + password;
var url = 'wss://' + auth + '@' + host + '/rest/subscribe';
var ws = new WebSocket(url, 'ISYSUB', {