node-red-contrib-sun-position
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -0,0 +0,0 @@ --- |
@@ -18,2 +18,16 @@ # node-red-contrib-sun-position | ||
### 2.0.5: bug fixes | ||
- clock-time | ||
- fix of check if payload and topic has changed to prevent send output on not changed payload/topic to output 1 #360 | ||
- fix of not changeable context store #358 | ||
- blind-control | ||
- fix of not changeable context store #358 | ||
- fix of not working '0' value for `setBlindSettingsTop`, `setBlindSettingsBottom`, `setBlindSettingsIncrement` and `setBlindSettingsLevel` config overwrite possibility #359 | ||
### 2.0.4: flow library fix | ||
- no changes, republished 2.0.3 because of node-red flow library missing data | ||
### 2.0.3: small fix + enhancement | ||
@@ -20,0 +34,0 @@ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -0,0 +0,0 @@ [ |
@@ -27,3 +27,3 @@ /******************************************** | ||
*/ | ||
function checkPosOverwrite(node, msg, oNow) { | ||
function checkPosOverwrite(node, msg, oldValue, oNow) { | ||
// node.debug(`checkPosOverwrite act=${node.nodeData.overwrite.active} `); | ||
@@ -84,7 +84,7 @@ let isSignificant = false; | ||
if (rosalv && isEqual(node.previousData.payloadValue, overrideData)) { | ||
if (rosalv && isEqual(oldValue, overrideData)) { | ||
node.debug(`resetOnSameAsLastValue active, reset overwrite and exit overrideData=${overrideData}`); | ||
ctrlLib.posOverwriteReset(node); | ||
return ctrlLib.setOverwriteReason(node); | ||
} else if (isv && isEqual(node.previousData.payloadValue, overrideData)) { | ||
} else if (isv && isEqual(oldValue, overrideData)) { | ||
node.debug(`overwrite exit true (ignoreSameValue), overrideData=${overrideData}`); | ||
@@ -379,7 +379,2 @@ return ctrlLib.setOverwriteReason(node); | ||
}; | ||
node.previousData = { | ||
reasonCode: -1, | ||
usedRule: NaN, | ||
last : {} | ||
}; | ||
@@ -447,3 +442,3 @@ /** | ||
case 'setAutoTriggerTime': | ||
node.autoTrigger.defaultTime = parseInt(msg.payload) || node.autoTrigger.defaultTime; | ||
node.autoTrigger.defaultTime = parseInt(msg.payload) || node.autoTrigger.defaultTime; // payload of 0 makes no sense, use then default | ||
break; | ||
@@ -473,6 +468,7 @@ case 'setCntextStore': | ||
const tempData = node.context().get('cacheData',node.contextStore) || {}; | ||
node.previousData.reasonCode = node.reason.code; | ||
node.previousData.reasonState = node.reason.state; | ||
node.previousData.reasonDescription = node.reason.description; | ||
node.previousData.payloadValue = clonedeep(node.payload.current); | ||
const previousData = node.context().get('lastData', node.contextStore) || { | ||
reasonCode: -1, | ||
usedRule: NaN, | ||
lastAuto : {} | ||
}; | ||
@@ -501,3 +497,3 @@ node.reason.code = NaN; | ||
autoTrigger : node.autoTrigger, | ||
lastEvaluated: node.previousData.last, | ||
lastEvaluated: previousData.lastAuto, | ||
name: node.name || node.id, | ||
@@ -510,11 +506,11 @@ id: node.addId || node.id | ||
// check for manual overwrite | ||
let overwrite = checkPosOverwrite(node, msg, oNow); | ||
let overwrite = checkPosOverwrite(node, msg, previousData.payload, oNow); | ||
if (!overwrite || node.rules.canResetOverwrite || (node.rules.maxImportance > 0 && node.rules.maxImportance > node.nodeData.overwrite.importance)) { | ||
// calc times: | ||
timeCtrl.rule = checkRules(node, msg, oNow, tempData); | ||
node.previousData.last.ruleId = timeCtrl.rule.id; | ||
node.previousData.last.ruleTopic = timeCtrl.rule.topic; | ||
previousData.lastAuto.ruleId = timeCtrl.rule.id; | ||
previousData.lastAuto.ruleTopic = timeCtrl.rule.topic; | ||
node.debug(`overwrite=${overwrite}, node.rules.maxImportance=${node.rules.maxImportance}, nodeData.overwrite.importance=${node.nodeData.overwrite.importance}`); | ||
if (overwrite && timeCtrl.rule.resetOverwrite && timeCtrl.rule.id !== node.previousData.usedRule) { | ||
if (overwrite && timeCtrl.rule.resetOverwrite && timeCtrl.rule.id !== previousData.usedRule) { | ||
ctrlLib.posOverwriteReset(node); | ||
@@ -533,4 +529,4 @@ overwrite = false; | ||
node.reason.description = timeCtrl.rule.description; | ||
node.previousData.last.payload = node.payload.current; | ||
node.previousData.last.topic = node.payload.topic; | ||
previousData.lastAuto.payload = clonedeep(node.payload.current); | ||
previousData.lastAuto.topic = node.payload.topic; | ||
} | ||
@@ -563,4 +559,4 @@ } | ||
(node.payload.current !== null) && | ||
((node.payload.topic !== node.previousData.topic) || | ||
((typeof node.previousData.payloadValue !== 'undefined') && (!isEqual(node.previousData.payloadValue, node.payload.current)))) ) { | ||
!(isEqual(node.payload.topic, previousData.topic) && | ||
isEqual(previousData.payload, node.payload.current))) { | ||
const msgOut = {}; | ||
@@ -593,4 +589,11 @@ for (let i = 0; i < node.results.length; i++) { | ||
} | ||
node.previousData.usedRule = ruleId; | ||
previousData.usedRule = ruleId; | ||
previousData.payload = clonedeep(node.payload.current); | ||
previousData.topic = node.payload.topic; | ||
previousData.reasonCode = node.reason.code; | ||
previousData.reasonState = node.reason.state; | ||
previousData.reasonDescription = node.reason.description; | ||
node.context().set('cacheData', tempData, node.contextStore); | ||
node.context().set('lastData', previousData, node.contextStore); | ||
if (node.autoTrigger) { | ||
@@ -597,0 +600,0 @@ node.debug('next autoTrigger will set to ' + node.autoTrigger.time + ' - ' + node.autoTrigger.type); |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ /******************************************** |
@@ -0,0 +0,0 @@ /************************************************************************/ |
@@ -0,0 +0,0 @@ /******************************************** |
@@ -0,0 +0,0 @@ /******************************************** |
@@ -0,0 +0,0 @@ /******************************************** |
@@ -0,0 +0,0 @@ /******************************************** |
{ | ||
"name": "node-red-contrib-sun-position", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "NodeRED nodes to get sun and moon position", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 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
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 not supported yet
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 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
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 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
16196
1974318