node-red-contrib-boolean-logic-ultimate 1.1.15 → 1.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
# CHANGELOG
|
|
5
5
|
|
|
6
|
+
<p>
|
|
7
|
+
<b>Version 1.1.16</b> August 2024<br/>
|
|
8
|
+
- Railway Switcher: fixed an issue for backward compatibility of true/false input msg.</br>
|
|
9
|
+
</p>
|
|
6
10
|
<p>
|
|
7
11
|
<b>Version 1.1.15</b> August 2024<br/>
|
|
8
12
|
- Railway Switcher: now you can choose between 5 different output instead of 2.</br>
|
|
@@ -9,7 +9,7 @@ module.exports = function (RED) {
|
|
|
9
9
|
node.topic = config.topic || "Inject";
|
|
10
10
|
node.outputJSON = (config.outputJSON === undefined || config.outputJSON === '') ? '{ \n\t"payload":"hello",\n\t"topic":"1"\n}' : config.outputJSON;
|
|
11
11
|
setNodeStatus({ fill: "grey", shape: "dot", text: "Waiting" });
|
|
12
|
-
|
|
12
|
+
5
|
|
13
13
|
|
|
14
14
|
RED.httpAdmin.post("/InjectUltimate/:id", RED.auth.needsPermission("InjectUltimate.write"), function (req, res) {
|
|
15
15
|
var node = RED.nodes.getNode(req.params.id);
|
|
@@ -38,6 +38,12 @@ module.exports = function (RED) {
|
|
|
38
38
|
node.alignStatus();
|
|
39
39
|
|
|
40
40
|
this.on("input", function (msg) {
|
|
41
|
+
// Backward compatibility
|
|
42
|
+
// Pass msg.payload = false switches the msg input to the UPPER output
|
|
43
|
+
// Pass msg.payload = true switches the msg input to the LOWER output
|
|
44
|
+
if (msg.payload === false) msg.payload = '0';
|
|
45
|
+
if (msg.payload === true) msg.payload = '1';
|
|
46
|
+
|
|
41
47
|
var sIncomingTopic = "";
|
|
42
48
|
if (msg.hasOwnProperty("topic")) {
|
|
43
49
|
// 06/11/2019
|
|
@@ -70,11 +76,6 @@ module.exports = function (RED) {
|
|
|
70
76
|
);
|
|
71
77
|
if (msg.payload === undefined) return null;
|
|
72
78
|
|
|
73
|
-
// Backward compatibility
|
|
74
|
-
// Pass msg.payload = false switches the msg input to the UPPER output
|
|
75
|
-
// Pass msg.payload = true switches the msg input to the LOWER output
|
|
76
|
-
if (msg.payload === false) msg.payload = '0';
|
|
77
|
-
if (msg.payload === true) msg.payload = '1';
|
|
78
79
|
node.sRailway = msg.payload;
|
|
79
80
|
node.alignStatus();
|
|
80
81
|
return; // DONT'S SEND THIS MESSAGE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-boolean-logic-ultimate",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "A set of Node-RED enhanced boolean logic and utility nodes, flow interruption, blinker, invert, filter, toggle etc.., with persistent values after reboot. Compatible also with Homeassistant values.",
|
|
5
5
|
"author": "Supergiovane (https://github.com/Supergiovane)",
|
|
6
6
|
"dependencies": {
|