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 1.0.0-alpha-1 to 1.0.0-alpha-2

15

CHANGELOG.md
# node-red-contrib-sun-position
#### 1.0.0: mayor release
- new Node: clock-time
- This is a simplified blind-control node, with only time rules and any payload.
- it is ideal for dimmers, Christmas lights, ...
- general
- added on several settings the possibility to use payload if the topic of an incoming message contains special value.
- fixed smaller problems
- The big jump in the version number is not due to the amount change, but rather otherwise.
- The Version starting with 1... will show that this node is tested and working with Node-Red above 1...
- After this release, no major changes are planned in the next time and the node is for the time being feature complete. This fits a version number 1.. better than 0..
#### 0.5.3 + 0.5.4: BugFix

@@ -4,0 +19,0 @@

33

nodes/clock-timer.js

@@ -207,3 +207,3 @@ /********************************************

*/
function checkTCPosOverwrite(node, msg, now, previousData) {
function checkTCPosOverwrite(node, msg, now) {
node.debug(`checkTCPosOverwrite act=${node.timeClockData.overwrite.active} `);

@@ -265,8 +265,2 @@ let priook = false;

node.debug(`overwrite overrideData=${overrideData}`);
const noSameValue = hlp.getMsgBoolValue(msg, 'ignoreSameValue');
if (noSameValue && (previousData.payload === overrideData)) {
setOverwriteReason(node);
node.debug(`overwrite exit true noSameValue=${noSameValue}, overrideData=${overrideData}`);
return true;
}
node.payload.current = overrideData;

@@ -550,3 +544,2 @@ node.payload.topic = overrideTopic;

node.debug('ruleSel ' + util.inspect(ruleSel, {colors:true, compact:10, breakLength: Infinity }));
node.reason.code = 4;
livingRuleData.id = ruleSel.pos;

@@ -665,9 +658,6 @@ livingRuleData.name = ruleSel.name;

*/
function setState(timeCtrl, previousData) {
let code = node.reason.code;
function setState(timeCtrl) {
const code = node.reason.code;
const shape = 'ring';
let fill = 'yellow';
if (code === 10 && previousData) { // smooth;
code = previousData.reasonCode;
}

@@ -719,4 +709,2 @@ if (code <= 3) {

const previousData = node.context().get('previous',node.storeName) || {};
previousData.payload = node.payload.current;
previousData.topic = node.payload.topic;
previousData.reasonCode = node.reason.code;

@@ -733,7 +721,7 @@ previousData.reasonState = node.reason.state;

// check if the message contains any oversteering data
let ruleId = -1; // NaN;
let ruleId = -1;
// node.debug(`start pos=${node.payload.current} manual=${node.timeClockData.overwrite.active} reasoncode=${node.reason.code} description=${node.reason.description}`);
// check for manual overwrite
if (!checkTCPosOverwrite(node, msg, now, previousData)) {
if (!checkTCPosOverwrite(node, msg, now)) {
// calc times:

@@ -754,5 +742,6 @@ timeCtrl.rule = checkRules(node, msg, now, tempData);

rule: ruleId,
topic: msg.topic
newtopic: node.payload.topic,
orgtopic: msg.topic
};
topic = hlp.topicReplace(config.topic, topicAttrs);
topic = hlp.topicReplace(topic, topicAttrs);
}

@@ -762,6 +751,4 @@

node.payload.current !== 'none' &&
((node.payload.current !== previousData.payload) ||
(node.reason.code !== previousData.reasonCode) ||
(ruleId !== previousData.usedRule) ||
(node.payload.topic !== previousData.topic))) {
((node.reason.code !== previousData.reasonCode) ||
(ruleId !== previousData.usedRule))) {
msg.payload = node.payload.current;

@@ -768,0 +755,0 @@ msg.topic = topic;

{
"name": "node-red-contrib-sun-position",
"version": "1.0.0-alpha-1",
"version": "1.0.0-alpha-2",
"description": "NodeRED nodes to get sun and moon position",

@@ -5,0 +5,0 @@ "keywords": [

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