Socket
Socket
Sign inDemoInstall

node-red-contrib-sun-position

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-sun-position - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

14

CHANGELOG.md

@@ -18,2 +18,16 @@ # node-red-contrib-sun-position

### 2.0.6: bug fixes
- time-inject fix for next property #364
- within-time-switch fix error with output value #363
- blind-control + clock-time
- reduced default startup delay to may 1s
- do output to first output on startup #369
- blind-control
- implemented `setSunDataFloorLength` #367
- for an oversteer rule can now be configured if it should be active if the sun is in the window (default as previous) #362
### 2.0.5: bug fixes

@@ -20,0 +34,0 @@

7

nodes/clock-timer.js

@@ -548,3 +548,4 @@ /********************************************

if ((typeof node.payload.current !== 'undefined') &&
if ((!node.startDelayTimeOut) &&
(typeof node.payload.current !== 'undefined') &&
(node.payload.current !== 'none') &&

@@ -625,2 +626,6 @@ (node.payload.current !== null) &&

}
if (node.startDelayTimeOutObj) {
clearTimeout(node.startDelayTimeOutObj);
delete node.startDelayTimeOutObj;
}
// tidy up any state

@@ -627,0 +632,0 @@ });

5

nodes/lib/timeControlHelper.js

@@ -767,7 +767,8 @@ /********************************************

if (node.autoTrigger || (parseFloat(config.startDelayTime) > 9)) {
let delay = parseFloat(config.startDelayTime) || (2000 + Math.floor(Math.random() * 8000)); // 2s - 10s
let delay = parseFloat(config.startDelayTime) || (300 + Math.floor(Math.random() * 700)); // default = 300ms - 1s
delay = Math.min(delay, 2147483646);
node.startDelayTimeOut = new Date(Date.now() + delay);
setTimeout(() => {
node.startDelayTimeOutObj = setTimeout(() => {
delete node.startDelayTimeOut;
delete node.startDelayTimeOutObj;
node.emit('input', {

@@ -774,0 +775,0 @@ topic: 'autoTrigger/triggerOnly/start',

@@ -38,2 +38,3 @@ {

"oversteerTopic":"Übersteuerungs topic",
"oversteerSunInWindow": "nur wenn die Sonne ins Fenster scheint",
"smoothTime": "glätten",

@@ -40,0 +41,0 @@ "showEnhSettings": "Erweiterte Einstellungen",

@@ -6,2 +6,4 @@ {

"binary": "binär",
"infoText":"Die Konfiguration muss erstellt und deployed werden damit die Einstellungen angezeigt werden können.",
"loadingInfo":"lade Daten...",
"json": "json",

@@ -39,2 +41,3 @@ "jsonata": "jsonata Ausdr.",

"undefined": "nicht verwendet",
"msgInput": "eingangs Nachricht",
"datespecific": "Zeitpunkt (erweitert)",

@@ -94,3 +97,3 @@ "nodeId":"Node Name",

"ctrlObj":"Status object",
"strPlaceholder": "string mit Platzhatern"
"strPlaceholder": "string mit Platzhaltern"
},

@@ -97,0 +100,0 @@ "typeOptions": {

@@ -38,2 +38,3 @@ {

"oversteerTopic":"oversteer topic",
"oversteerSunInWindow": "only when sun shines in the window",
"smoothTime": "smoothTime",

@@ -40,0 +41,0 @@ "showEnhSettings": "Enhanced settings",

@@ -40,2 +40,3 @@ {

"undefined":"not used",
"msgInput": "input message",
"datespecific":"timestamp enhanced",

@@ -42,0 +43,0 @@ "nodeId":"node name",

@@ -39,5 +39,2 @@ {

},
"typeLabel":{
"input": "msg.payload of the input message"
},
"placeholder": {

@@ -44,0 +41,0 @@ "propertyStart": "Property for alternate start time",

@@ -186,5 +186,10 @@ /************************************************************************/

value: 'dateSpecific',
label: node._('node-red-contrib-sun-position/position-config:common.types.datespecific','timestamp enhanced'),
label: node._('node-red-contrib-sun-position/position-config:common.types.datespecific'),
hasValue: false
},
MsgInput: {
value: 'msgInput',
label: node._('node-red-contrib-sun-position/position-config:common.types.msgInput'),
hasValue: false
},
MsgPayload: {

@@ -987,3 +992,3 @@ value: 'msgPayload',

function addLabel(parent, forEl, symb, text, width) { // eslint-disable-line no-unused-vars
const lbl = $('<label class="' + forEl + '-lbl" style="width:auto"/>').attr('for', forEl).appendTo(parent);
const lbl = $('<label class="' + forEl + '-lbl" style="width:auto;"/>').attr('for', forEl).appendTo(parent);
if (symb) {

@@ -997,3 +1002,3 @@ lbl.append('<i class= "' + symb + '" >');

width = width || 'auto';
lbl.attr('style', 'margin-left: 5px; width:' + width + ';');
lbl.attr('style', 'margin-left: 5px; margin-right: 2px; width:' + width + ';');
} else {

@@ -1000,0 +1005,0 @@ width = width || '20px';

@@ -45,2 +45,10 @@ /********************************************

};
if (propNew.type === 'dateEntered' ||
propNew.type === 'dateSpecific' ||
propNew.type === 'dayOfMonth') {
propNew.next = false;
} else if (propNew.type === 'pdsTimeNow') {
// next sun time
propNew.next = true;
}

@@ -47,0 +55,0 @@ if (node.positionConfig && propNew.type === 'jsonata') {

@@ -421,8 +421,10 @@ /********************************************

value : config.withinTimeValue ? config.withinTimeValue : 'true',
type : config.withinTimeValueType ? config.withinTimeValueType : 'input'
type : config.withinTimeValueType ? config.withinTimeValueType : 'msgInput'
};
if (this.withinTimeValue.type === 'input') { this.withinTimeValue.type = 'msgInput'; }
this.outOfTimeValue = {
value : config.outOfTimeValue ? config.outOfTimeValue : 'false',
type : config.outOfTimeValueType ? config.outOfTimeValueType : 'input'
type : config.outOfTimeValueType ? config.outOfTimeValueType : 'msgInput'
};
if (this.outOfTimeValue.type === 'input') { this.outOfTimeValue.type = 'msgInput'; }

@@ -462,3 +464,3 @@ this.timeOutObj = null;

node.positionConfig.toDateTimeString(dNow) + result.endSuffix + ' (' + msg.withinTimeStart.id + ' - ' + cmpNow + ' - ' + msg.withinTimeEnd.id + ')');
if (node.withinTimeValue.type === 'input') {
if (node.withinTimeValue.type === 'msgInput') {
send([msg, null]); // within time

@@ -477,3 +479,3 @@ } else {

node.positionConfig.toDateTimeString(dNow) + result.endSuffix + ' (' + msg.withinTimeStart.id + ' - ' + cmpNow + ' - ' + msg.withinTimeEnd.id + ')');
if (node.withinTimeValue.type === 'input') {
if (node.withinTimeValue.type === 'msgInput') {
send([msg, null]); // within time

@@ -493,3 +495,3 @@ } else {

this.debug('out of time - send msg to second output ' + result.startSuffix + node.positionConfig.toDateTimeString(dNow) + result.endSuffix);
if (node.outOfTimeValue.type === 'input') {
if (node.outOfTimeValue.type === 'msgInput') {
send([null, msg]); // out of time

@@ -496,0 +498,0 @@ } else {

{
"name": "node-red-contrib-sun-position",
"version": "2.0.5",
"version": "2.0.6",
"description": "NodeRED nodes to get sun and moon position",

@@ -114,3 +114,3 @@ "keywords": [

"devDependencies": {
"eslint": "^8.2.0",
"eslint": "^8.3.0",
"eslint-plugin-html": "^6.2.0",

@@ -117,0 +117,0 @@ "eslint-plugin-jsdoc": "^37.0.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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