smart-nodes 0.7.1 → 0.7.2

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
@@ -261,3 +261,8 @@
261
261
  ## Version 0.7.1:
262
262
 
263
263
  - Small bugfix in mode-selector node.
264
+
265
+ ## Version 0.7.2:
266
+
267
+ - Shutter complex node is adding a 5 seconds longer time for actions up and down, to really get to the end.
268
+ - Text exec node now understands blink and toggle for light nodes.
@@ -1 +1 @@
1
- {"idn1":{"last_mode":"NO_MODES_DEFINED","last_position":0,"last_direction_up":false}}
1
+ {"idn1":{"last_value":false,"last_value_before_alarm":false,"last_value_sended":false,"alarm_active":false,"last_position":0.001666666666666667,"last_direction_up":true,"last_position_before_alarm":0.001666666666666667}}
package/light/light.js CHANGED
@@ -193,7 +193,7 @@ module.exports = function (RED)
193
193
 
194
194
  isBlinking = false;
195
195
 
196
- node_settings.last_value = helper.toBool(msg.payload);
196
+ node_settings.last_value = msg.payload;
197
197
  node_settings.last_value_sended = node_settings.last_value;
198
198
  break;
199
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-nodes",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Controls light, shutters and more. Includes common used logic and statistic nodes to control your home.",
5
5
  "keywords": [
6
6
  "node-red",
@@ -360,7 +360,7 @@ module.exports = function (RED)
360
360
  case ACTION_UP:
361
361
  // data is the run time
362
362
  if (data == null)
363
- run_time_ms = node_settings.last_position * max_time_up / 100 * 1000;
363
+ run_time_ms = node_settings.last_position * max_time_up / 100 * 1000 + 5000; // Add 5 seconds to ensure shutter reaches the end
364
364
  else
365
365
  run_time_ms = helper.getTimeInMsFromString(data);
366
366
  break;
@@ -368,7 +368,7 @@ module.exports = function (RED)
368
368
  case ACTION_DOWN:
369
369
  // data is the run time
370
370
  if (data == null)
371
- run_time_ms = (100 - node_settings.last_position) * max_time_down / 100 * 1000;
371
+ run_time_ms = (100 - node_settings.last_position) * max_time_down / 100 * 1000 + 5000; // Add 5 seconds to ensure shutter reaches the end
372
372
  else
373
373
  run_time_ms = helper.getTimeInMsFromString(data);
374
374
  break;
@@ -132,6 +132,34 @@ module.exports = function (RED)
132
132
  }
133
133
  break;
134
134
 
135
+ case "blink":
136
+ case "blinken":
137
+ // node.log("Set action to blink");
138
+ mode = "light";
139
+ action = "blink";
140
+ if (performAction(mode, action, number, affectedNodes))
141
+ {
142
+ action = null;
143
+ affectedNodes = [];
144
+ number = null;
145
+ without = false;
146
+ }
147
+ break;
148
+
149
+ case "toggle":
150
+ case "umschalten":
151
+ // node.log("Set action to toggle");
152
+ mode = "light";
153
+ action = "toggle";
154
+ if (performAction(mode, action, number, affectedNodes))
155
+ {
156
+ action = null;
157
+ affectedNodes = [];
158
+ number = null;
159
+ without = false;
160
+ }
161
+ break;
162
+
135
163
  case "aus":
136
164
  case "off":
137
165
  case "ausschalten":