731
Views
0
Helpful
0
Replies
JSXAPI ssh or websocket connection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 10:24 PM
I am using JSXAPI for Node.js to communicate to EX90.
I have used the boiler plate that comes in the docs. However, It exits with an error ("connection failed: handshake, exiting") after running node filename.js.
I tried disabling the https on device but still no go. I can control it with Putty -SHH no issue but does not function with the library for both ssh and wss.
Could it be the firewall settings maybe?
const jsxapi = require('jsxapi'); const xapi = jsxapi.connect("ssh://{ipaddress}", { username: 'username', password: 'password' }); xapi.on('error', (err) => { console.error(`connection failed: ${err}, exiting`); //the err value is "handshake" process.exit(1); }); xapi.on('ready', () => { console.log("connection successful"); xapi.status .get('Standby') .then((status) => { console.log(`Current Standby status: ${status.State}`); xapi.close(); }); });
Labels:
- Labels:
-
Other Services Topics
0 Replies 0
