New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

knxultimate

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knxultimate - npm Package Compare versions

Comparing version

to
1.0.18

4

CHANGELOG.md

@@ -10,2 +10,6 @@ ![Sample Node](img/logo.png)

<p>
<b>Version 1.0.18</b> - April 2022<br/>
- NEW: new event has been added. The ackReceived event is triggered every time a telegram is sent over TunnelUDP ot TunnelTCP, after it has been acknowledge or not acknowledge<br/>
</p>
<p>
<b>Version 1.0.16</b> - April 2022<br/>

@@ -12,0 +16,0 @@ - Changed: the KNX Gateway don't care anymore for ROUTING_LOST_MESSAGE and ROUTING_BUSY. Previously, it was disconnecting. Now it only advises in LOG.<br/>

2

package.json
{
"name": "knxultimate",
"description": "KNX IP protocol implementation for Node. This is the ENGINE of Node-Red KNX-Ultimate node.",
"version": "1.0.16",
"version": "1.0.18",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=14"

@@ -89,13 +89,19 @@ ![Logo](img/logo-big.png)

<br/>
<br/>
|Properties|Description|
|--|--|
| .isConnected() | Returns **true** if you the client is connected to the KNX Gateway Router/Interface, **false** if not connected. |
| ._getClearToSend() | Returns **true** if you can send a telegram, **false** if the client is still waiting for the last telegram's ACK or whenever the client cannot temporary send the telegram. |
| ._getClearToSend() | Returns **true** if you can send a telegram, **false** if the client is still waiting for the last telegram's ACK or whenever the client cannot temporary send the telegram. In tunneling mode, you could also refer to the event **KNXClientEvents.ackReceived**, that is fired everytime a telegram has been succesfully acknowledge or not acknowledge. See the sample.js file. |
<br/>
<br/>
## EVENTS
Please see the sample.js file. This sample contains all events triggered by KNXUltimate.
<br/>

@@ -295,4 +301,9 @@ <br/>

console.log("Closed", info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.ackReceived, (knxMessage, info) => {
// In -->tunneling mode<-- (in ROUTING mode there is no ACK event), signals wether the last KNX telegram has been acknowledge or not
// knxMessage: contains the telegram sent.
// info is true it the last telegram has been acknowledge, otherwise false.
console.log("Last telegram acknowledge", knxMessage, info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.connected, info => {

@@ -309,3 +320,3 @@ // The client is connected

// // You need: group address, payload (true/false/or any message), datapoint as string
let payload = true;
let payload = false;
if (knxUltimateClient._getClearToSend()) knxUltimateClient.write("0/1/1", payload, "1.001");

@@ -353,3 +364,3 @@

let _Rawvalue = _datagram.cEMIMessage.npdu.dataValue;
// Decode the telegram.

@@ -458,2 +469,8 @@ if (_dst === "0/1/1") {

});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.ackReceived, (knxMessage, info) => {
// In -->tunneling mode<-- (in ROUTING mode there is no ACK event), signals wether the last KNX telegram has been acknowledge or not
// knxMessage: contains the telegram sent.
// info is true it the last telegram has been acknowledge, otherwise false.
console.log("Last telegram acknowledge", knxMessage, info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.disconnected, info => {

@@ -460,0 +477,0 @@ // The client is cisconnected

@@ -104,4 +104,9 @@ const knx = require("./index.js");

console.log("Closed", info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.ackReceived, (knxMessage, info) => {
// In -->tunneling mode<-- (in ROUTING mode there is no ACK event), signals wether the last KNX telegram has been acknowledge or not
// knxMessage: contains the telegram sent.
// info is true it the last telegram has been acknowledge, otherwise false.
console.log("Last telegram acknowledge", knxMessage, info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.connected, info => {

@@ -118,3 +123,3 @@ // The client is connected

// // You need: group address, payload (true/false/or any message), datapoint as string
let payload = true;
let payload = false;
if (knxUltimateClient._getClearToSend()) knxUltimateClient.write("0/1/1", payload, "1.001");

@@ -162,3 +167,3 @@

let _Rawvalue = _datagram.cEMIMessage.npdu.dataValue;
// Decode the telegram.

@@ -165,0 +170,0 @@ if (_dst === "0/1/1") {

@@ -73,2 +73,8 @@

});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.ackReceived, (knxMessage, info) => {
// In -->tunneling mode<-- (in ROUTING mode there is no ACK event), signals wether the last KNX telegram has been acknowledge or not
// knxMessage: contains the telegram sent.
// info is true it the last telegram has been acknowledge, otherwise false.
console.log("Last telegram acknowledge", knxMessage, info)
});
knxUltimateClient.on(knx.KNXClient.KNXClientEvents.disconnected, info => {

@@ -75,0 +81,0 @@ // The client is cisconnected

@@ -54,2 +54,3 @@ // Made with love by Supergiovane

KNXClientEvents["connecting"] = "connecting";
KNXClientEvents["ackReceived"] = "ackReceived";
})(KNXClientEvents || (KNXClientEvents = {}));

@@ -624,3 +625,3 @@

this._clearToSend = true; // 26/12/2021 allow to send
this._clientTunnelSeqNumber = -1;

@@ -737,2 +738,7 @@ try {

this._numFailedTelegramACK = 0;
// 08/04/2022 Emits the event informing that the last ACK has not been acknowledge.
try {
this.emit(KNXClientEvents.ackReceived, knxTunnelingRequest, false);
} catch (error) {
}
this._clearToSend = true;

@@ -751,3 +757,3 @@ this.emit(KNXClientEvents.error, timeoutErr);

_processInboundMessage(msg, rinfo) {
try {

@@ -917,3 +923,8 @@ // Composing debug string

this._clearToSend = true; // I'm ready to send a new datagram now
// 08/04/2022 Emits the event informing that the last ACK has been acknowledge.
try {
this.emit(KNXClientEvents.ackReceived, knxMessage, true);
} catch (error) {
}
try {
if (this.sysLogger !== undefined && this.sysLogger !== null) this.sysLogger.debug("Received KNX packet: TUNNELING: DELETED_TUNNELING_ACK FROM PENDING ACK's, ChannelID:" + this._channelID + " seqCounter:" + knxTunnelingAck.seqCounter + " Host:" + this._options.ipAddr + ":" + this._options.ipPort);

@@ -920,0 +931,0 @@ } catch (error) { }