node-red-contrib-sia-ultimate
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -11,2 +11,6 @@ # node-red-contrib-sia-ultimate | ||
<p> | ||
<b>Version 1.0.1</b> - December 2021<br/> | ||
- Added some try..catch.<br/> | ||
</p> | ||
<p> | ||
<b>Version 1.0.0</b> - September 2021<br/> | ||
@@ -13,0 +17,0 @@ - Stable release.<br/> |
@@ -254,4 +254,6 @@ | ||
let nack = Buffer.concat([start, crcbuf, lenbuf, buf, end]); | ||
try { | ||
RED.log.debug("siaendpointConfig: nackSIA : " + JSON.stringify(nack)); | ||
} catch (error) { } | ||
RED.log.debug("siaendpointConfig: nackSIA : " + JSON.stringify(nack)); | ||
return nack; | ||
@@ -261,3 +263,3 @@ } | ||
/** | ||
* Craete Acknowledge for SIA | ||
* Create Acknowledge for SIA | ||
* @param {string} sia - SIA Message | ||
@@ -270,4 +272,6 @@ */ | ||
let str = ""; | ||
RED.log.debug("siaendpointConfig: ackSIA (cfg) : " + JSON.stringify(cfg)); | ||
RED.log.debug("siaendpointConfig: ackSIA (sia) : " + JSON.stringify(sia)); | ||
try { | ||
RED.log.debug("siaendpointConfig: ackSIA (cfg) : " + JSON.stringify(cfg)); | ||
RED.log.debug("siaendpointConfig: ackSIA (sia) : " + JSON.stringify(sia)); | ||
} catch (error) { } | ||
if (sia.crc == sia.calc_crc && sia.len == sia.calc_len && cfg && isInTime(sia.ts)) { | ||
@@ -317,4 +321,5 @@ // if (sia.crc == sia.calc_crc && sia.len == sia.calc_len && cfg) { | ||
let ack = Buffer.concat([start, crcbuf, lenbuf, buf, end]); | ||
RED.log.debug("siaendpointConfig: ackSIA : " + JSON.stringify(ack)); | ||
try { | ||
RED.log.debug("siaendpointConfig: ackSIA : " + JSON.stringify(ack)); | ||
} catch (error) { } | ||
return ack; | ||
@@ -622,6 +627,10 @@ } | ||
try { | ||
RED.log.info('siaendpointConfig: sending to ' + remoteAddress + ' following message: ' + ack.toString().trim()); | ||
sock.end(ack); | ||
RED.log.info('siaendpointConfig: sending ACK to ' + remoteAddress + ' following message: ' + ack.toString().trim()); | ||
} catch (e) { | ||
// Error Message | ||
try { | ||
RED.log.error('siaendpointConfig: sending ACK to ' + remoteAddress + ' following message: ' + ack.toString().trim() + " Error:" + e.message); | ||
} catch (error) { } | ||
} | ||
@@ -628,0 +637,0 @@ }); |
{ | ||
"name": "node-red-contrib-sia-ultimate", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Connect your SIA-DCS compatible alarm system to node-red. It works with Ajax System too.", | ||
@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117281
934