Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-qsys

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-qsys - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

50

lib/qsys-core.js

@@ -98,28 +98,32 @@ var net = require('net');

if (data[i] == 0x0 && data.length != 0) {
let obj = JSON.parse((Buffer.from(rx)).toString());
if ('method' in obj) {
switch (obj.method) {
case 'EngineStatus':
if (obj.params.State === 'Active') {
this.emit('ready');
}
else if (isRedundant && obj.params.State === 'Standby') {
this.socket.destroy()
this.socket = net.connect(port, host);
}
break;
case 'ChangeGroup.Poll':
let changes = obj.params.Changes;
if (changes.length !== 0) {
for (let i = 0; i < changes.length; i++) {
this.emit('rx', changes[i]);
try {
let obj = JSON.parse((Buffer.from(rx)).toString());
if ('method' in obj) {
switch (obj.method) {
case 'EngineStatus':
if (obj.params.State === 'Active') {
this.emit('ready');
}
}
break;
default:
break;
else if (isRedundant && obj.params.State === 'Standby') {
this.socket.destroy()
this.socket = net.connect(port, host);
}
break;
case 'ChangeGroup.Poll':
let changes = obj.params.Changes;
if (changes.length !== 0) {
for (let i = 0; i < changes.length; i++) {
this.emit('rx', changes[i]);
}
}
break;
default:
break;
}
}
rx = [];
} catch (err) {
this.error(err.toString());
}
rx = [];
}

@@ -126,0 +130,0 @@ else {

{
"name": "node-red-contrib-qsys",
"version": "1.0.3",
"version": "1.0.4",
"description": "A collection of nodes for third party control of Q-Sys systems",
"main": "qsys-core.js",
"directories": {
"example": "examples",
"lib": "lib"

@@ -39,3 +40,4 @@ },

"node": ">=12.13.0"
}
},
"devDependencies": {}
}

@@ -19,2 +19,3 @@ [![platform](https://img.shields.io/badge/platform-Node--RED-red)](https://nodered.org)

|---------|-------------------------------------------------|
| 1.0.4 | Added error catch before parsing JSON PR#9 |
| 1.0.3 | Added `controlType` to **qsys-controlSet** node |

@@ -21,0 +22,0 @@ | 1.0.2 | Updated dependencies |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc