Socket
Socket
Sign inDemoInstall

node-red-contrib-sun-position

Package Overview
Dependencies
1
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.6 to 0.2.7-beta.0

nodes/icons/inputTypeDate.png

185

nodes/lib/dateTimeHelper.js

@@ -20,2 +20,3 @@ /********************************************

getNodeId,
initializeParser,
getFormattedDateOut,

@@ -484,2 +485,8 @@ parseDateFromFormat

/**
* Formate a date to the given Format string
* @param {Date} date - JavaScript Date to format
* @param {string} mask - mask of the date
* @return {string} date as depending on the given Format
*/
const dateFormat = (function () {

@@ -505,2 +512,3 @@ const token = /x{1,2}|d{1,4}|E{1,2}|M{1,4}|NNN|yy(?:yy)?|([HhKkmsTt])\1?|l{1,3}|[LoSZ]|"[^"]*"|'[^']*'/g;

const dF = dateFormat;
console.log(dF.i18n);

@@ -580,3 +588,3 @@ // You can't provide utc if you skip other Args. (use the "UTC:" mask prefix)

x: dayDiff,
xx: ((dayDiff >= -7) && (dayDiff <= dF.i18n.dayDiffNames.length)) ? dF.i18n.dayDiffNames(dayDiff + 7) : dF.i18n.dayNames[D]
xx: ((dayDiff >= -7) && ((dayDiff + 7) < dF.i18n.dayDiffNames.length)) ? dF.i18n.dayDiffNames[dayDiff + 7] : dF.i18n.dayNames[D]
};

@@ -614,49 +622,23 @@

dateFormat.i18n = {
dayNames: [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat'
],
monthNames: [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
],
dayDiffNames: [
'1 week ago', '6 days ago', '5 days ago', '4 days ago', '3 days ago', '2 days ago', 'Yesterday', 'Today', 'Tomorrow', 'day after tomorrow', 'in 3 days', 'in 4 days', 'in 5 days', 'in 6 days'
]
};
/**
* pre defined formats of a given date
* @param {Date} date - JavaScript Date to format
* @param {string} [format] - format of the date
* @param {Array.<string>} [dayNames] - Array of day Names in short and ["Sunday", "Monday", ..., "Mo", "Tu", ...]
* @param {Array.<string>} [monthNames] - Array of month Names long and short ["January", "February", ..., "Jan", "Feb", ...]
* @param {Array.<string>} [dayDiffNames] - Array of names for relative day, starting 7 days ago ["1 week ago", "6 days ago", ..., "Yesterday", "Today", "Tomorrow", ...]
* @param {bool} [utc] - indicates if the formatted date should be in utc or not
* @return {any} returns a number, string or object depending on the given Format
*/
function initializeParser(dayNames, monthNames, dayDiffNames) {
console.log('----------------------------');
console.log(dayNames);
dateFormat.i18n = {
dayNames : dayNames,
monthNames : monthNames,
dayDiffNames : dayDiffNames
};
console.log(dateFormat.i18n);
console.log('----------------------------');
}

@@ -734,28 +716,2 @@ dateFormat.parse = [

/**
* Formate a date to the given Format string
* @param {Date} date - JavaScript Date to format
* @param {string} mask - mask of the date
* @param {bool} utc - indicates if the formatted date should be in utc or not
* @param {Array.<string>} [dayNames] - Array of day Names long and short ["Sunday", "Monday", ..., "Mo", "Tu", ...]
* @param {Array.<string>} [monthNames] - Array of month Names long and short ["January", "February", ..., "Jan", "Feb", ...]
* @param {Array.<string>} [dayDiffNames] - Array of names for relative day, starting 7 days ago ["1 week ago", "6 days ago", ..., "Yesterday", "Today", "Tomorrow", ...]
* @return {string} date as depending on the given Format
*/
function _formatDate(date, mask, utc, dayNames, monthNames, dayDiffNames) {
if (dayNames) {
dateFormat.i18n.dayNames = dayNames;
}
if (monthNames) {
dateFormat.i18n.monthNames = monthNames;
}
if (dayDiffNames) {
dateFormat.i18n.dayDiffNames = dayDiffNames;
}
return dateFormat(date, mask, utc);
}
/**
* pre defined formats of a given date

@@ -767,5 +723,6 @@ * @param {Date} date - JavaScript Date to format

* @param {Array.<string>} [dayDiffNames] - Array of names for relative day, starting 7 days ago ["1 week ago", "6 days ago", ..., "Yesterday", "Today", "Tomorrow", ...]
* @param {bool} [utc] - indicates if the formatted date should be in utc or not
* @return {any} returns a number, string or object depending on the given Format
*/
function getFormattedDateOut(date, format, dayNames, monthNames, dayDiffNames) {
function getFormattedDateOut(date, format, utc) {
// console.debug('getFormattedDateOut date=' + date + ' --> format=' + format + ' [' + dayNames + '] - [' + monthNames + '] [' + dayDiffNames + ']'); // eslint-disable-line

@@ -777,3 +734,3 @@ format = format || 0;

if (isNaN(format)) {
return _formatDate(date, String(format), false, dayNames, monthNames, dayDiffNames);
return dateFormat(date, String(format), utc);
}

@@ -815,5 +772,5 @@

case 16: // timeformat_weekday - Montag, 22.12.
return _formatDate(date, 'dddd, d.m.', false, dayNames, monthNames, dayDiffNames);
return dateFormat(date, 'dddd, d.M.', utc);
case 17: // timeformat_weekday2 - heute 22.12., morgen 23.12., übermorgen 24.12., in 3 Tagen 25.12., Montag, 26.12.
return _formatDate(date, 'xx, d.m.', false, dayNames, monthNames, dayDiffNames);
return dateFormat(date, 'xx, d.M.', utc);
}

@@ -958,6 +915,6 @@

let date = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let ll = now.getMilliseconds();
let hour = now.getHours();
let min = now.getMinutes();
let sec = now.getSeconds();
let misec = now.getMilliseconds();
let ampm = '';

@@ -1043,49 +1000,49 @@

} else if (token === 'hh' || token === 'h') {
hh = _getInt(val, i_val, token.length, 2);
if (hh === null || (hh < 1) || (hh > 12)) {
hour = _getInt(val, i_val, token.length, 2);
if (hour === null || (hour < 1) || (hour > 12)) {
return null;
}
i_val += hh.length;
i_val += hour.length;
} else if (token === 'HH' || token === 'H') {
hh = _getInt(val, i_val, token.length, 2);
if (hh === null || (hh < 0) || (hh > 23)) {
hour = _getInt(val, i_val, token.length, 2);
if (hour === null || (hour < 0) || (hour > 23)) {
return null;
}
i_val += hh.length;
i_val += hour.length;
} else if (token === 'kk' || token === 'k') {
hh = _getInt(val, i_val, token.length, 2);
if (hh === null || (hh < 0) || (hh > 11)) {
hour = _getInt(val, i_val, token.length, 2);
if (hour === null || (hour < 0) || (hour > 11)) {
return null;
}
i_val += hh.length;
i_val += hour.length;
} else if (token === 'KK' || token === 'K') {
hh = _getInt(val, i_val, token.length, 2);
if (hh === null || (hh < 1) || (hh > 24)) {
hour = _getInt(val, i_val, token.length, 2);
if (hour === null || (hour < 1) || (hour > 24)) {
return null;
}
i_val += hh.length;
hh--;
i_val += hour.length;
hour--;
} else if (token === 'mm' || token === 'm') {
mm = _getInt(val, i_val, token.length, 2);
if (mm === null || (mm < 0) || (mm > 59)) {
min = _getInt(val, i_val, token.length, 2);
if (min === null || (min < 0) || (min > 59)) {
return null;
}
i_val += mm.length;
i_val += min.length;
} else if (token === 'ss' || token === 's') {
ss = _getInt(val, i_val, token.length, 2);
if (ss === null || (ss < 0) || (ss > 59)) {
sec = _getInt(val, i_val, token.length, 2);
if (sec === null || (sec < 0) || (sec > 59)) {
return null;
}
i_val += ss.length;
i_val += sec.length;
} else if (token.toLowerCase() === 'lll' || token.toLowerCase() === 'll' || token.toLowerCase() === 'l') {
ll = _getInt(val, i_val, token.length, 3);
if (ll === null || (ll < 0) || (ll > 999)) {
misec = _getInt(val, i_val, token.length, 3);
if (misec === null || (misec < 0) || (misec > 999)) {
return null;
}
i_val += ll.length;
if ( token === 'L' && ll < 10) {
ll = ll * 100;
i_val += misec.length;
if ( token === 'L' && misec < 10) {
misec = misec * 100;
}
if ( token === 'LL' && ll < 100) {
ll = ll * 10;
if ( token === 'LL' && misec < 100) {
misec = misec * 10;
}

@@ -1141,9 +1098,9 @@ } else if ((token.toLowerCase() === 'tt') || (token.toLowerCase() === 't')) {

// Correct hours value
if (hh < 12 && ampm === 'PM') {
hh = hh - 0 + 12;
} else if (hh > 11 && ampm === 'AM') {
hh -= 12;
if (hour < 12 && ampm === 'PM') {
hour = hour - 0 + 12;
} else if (hour > 11 && ampm === 'AM') {
hour -= 12;
}
// console.log(`getDateFromFormat out year=${year} month=${month} date=${date} hh=${hh} mm=${mm} ss=${ss} ll=${ll}`); // eslint-disable-line
return new Date(year, month - 1, date, hh, mm, ss, ll);
// console.log(`getDateFromFormat out year=${year} month=${month} date=${date} hour=${hour} min=${min} sec=${sec} misec=${misec}`); // eslint-disable-line
return new Date(year, month - 1, date, hour, min, sec, misec);
}

@@ -1150,0 +1107,0 @@

{
"moon-position": {
"label": {
"position" : "Position",
"topic" :"Topic",
"between":"zwischen",
"and":"und",
"name": "Name"
"and":"und"
},
"placeholder": {
"position" : "Position",
"name": "Name"
},
"tips": {
"moonPosControl" : "If a message arrives through the Input the calculated position of the moon will be always send to the first output. If additionally specifyd upper and lower limits for the moon radiation and the azimuth is inside the defined limits the incomming message will send to the associated output."
"moonPosControl" : "If a message arrives through the Input the calculated position of the moon will be always send to the first output. If additionally specified upper and lower limits for the moon radiation and the azimuth is inside the defined limits the incoming message will send to the associated output."
}
}
}
{
"common": {
"label": {
"positionConfig": "Konfiguration",
"binary": "binär",
"json": "json",
"jsonata": "json Ausdr.",
"timestamp": "Zeitmarke",
"blank": "\"\"",
"nothing": "nichts",
"checkall" : "Alle Regeln überprüfen",
"stopfirst" : "Nach erster Übereinstimmung stoppen (if)"
},
"types": {
"unlimited":"keine Limitierung",
"undefined":"nicht verwendet",
"datespecific":"Zeitmarke (erweitert)",
"timeentered":"Zeit (next)",
"dateentered":"Datum",
"timepredefined":"feste Zeit",
"dayofmonth":"Monatstag",
"timesun":"Sonnenstands zeit",
"timemoon":"Mond-Zeit",
"suncalc":"Sonnenposition",
"mooncalc":"Mondposition"
},
"multiselectLbl": {
"operatorTypes": "in Vergleich einbeziehen"
},
"operatorsGroups": [
"kompletter Zeitstempel"
],
"operators": [
"== (gleich)",
"!= (ungleich)",
"> (größer)",
">= (größer or gleich)",
"< (kleiner)",
"<= (kleiner or gleich)"
],
"operatorTypesGroups": [
"in Vergleich einbezogen",
"speziell"
],
"operatorTypes": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tag",
"Monat",
"Jahr",
"Wochentag"
],
"outputFormatsGroups": [
"Zahl",
"Text",
"Zeit (Zahl) seit since emit",
"Wochentag",
"freier Text"
],
"outputFormats": [
"Millisekunden UNIX-Zeit",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"lokale Datum und Zeit",
"lokale Datum und Zeit erweitert",
"lokale Zeit",
"lokale Zeit enh.",
"lokales Datum",
"lokales Datum lang",
"UTC Datum und Zeit",
"ISO Datum und Zeit",
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tag Name, Bsp. Montag, 22.12.",
"Tag relativ, Bsp. Heute, 22.12.",
"als Objekt",
"Anderes"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"outputTSFormatsGroups": [
"Zeitmarke (Zahl)",
"Zeitmarke gerundet (Zahl)",
"Text"
],
"outputTSFormats": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tage",
"Wochen",
"Monate",
"Jahre",
"Sekunden gerundet",
"Minuten gerundet",
"Stunden gerundet",
"Tage gerundet",
"Wochen gerundet",
"Monate gerundet",
"Jahre gerundet",
"Anderes (frei definierbar)"
],
"parseFormatsGroups": [
"Zahl",
"Text",
"Anderes"
],
"parseFormats": [
"Millisekunden UNIX-Zeit",
"ECMA-262 - JSON Date",
"try different text Formats, prefer day first like d/M/y",
"try different text Formats, prefer month first like M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"frei definierbares Text format"
],
"multiplierGroups": [
"Standard",
"Spezial"
],
"multiplier": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tage",
"Wochen",
"Monate",
"Jahre"
],
"days": [
"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend",
"So", "Mo", "Die", "Mi", "Do", "Fr", "Sa"
],
"month": [
"Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember",
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
],
"dayDiffNames": [
"vor 1 Woche",
"vor 6 Tagen",
"vor 5 Tagen",
"vor 4 Tagen",
"vor 3 Tagen",
"vor 2 Tagen",
"Gestern",
"Heute",
"Morgen",
"Übermorgen",
"in 3 Tagen",
"in 4 Tagen",
"in 5 Tagen",
"in 6 Tagen"
]
},
"errors": {
"error": "<strong>Fehler</strong>: __message__",
"error-title": "interner Fehler",
"error-init": "Fehler '__message__', wiederhole in __time__",
"warn-init": "Warnung '__message__', wiederhole in __time__"
},
"position-config": {

@@ -13,9 +200,2 @@ "label": {

},
"placeholder": {
"latitude": "51.025",
"longitude": "-1.4",
"angleType": "deg",
"timezoneOffset": "0",
"name": "Name"
},
"tips": {

@@ -26,42 +206,6 @@ "config": "Starting from Version 2.0 the coordinates are not saved as credentials due to privacy reasons. So they no longer part of the regular flow and will not part of the export! On an update from previous version a save and re-deploy is necessary.",

"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on position-configuration",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large",
"longitude-missing": "Longitude is missing!",
"latitude-missing": "Latitude is missing!"
},
"days": [
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
],
"month": [
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December",
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
],
"dayDiffNames": [
"1 week ago",
"6 days ago",
"5 days ago",
"4 days ago",
"3 days ago",
"2 days ago",
"Yesterday",
"Today",
"Tomorrow",
"day after tomorrow",
"in 3 days",
"in 4 days",
"in 5 days",
"in 6 days"
]
}
}
}
{
"sun-position": {
"label": {
"position" : "Position",
"positionConfig": "Konfiguration",
"config": "Konfiguration",
"topic" :"Topic",
"azimuthpos":"azimuth position",
"azimuthpos":"azimuth Position",
"between":"zwischen",

@@ -18,4 +14,2 @@ "and":"und",

"placeholder": {
"position" : "Position",
"name": "Name",
"startOffset": 0,

@@ -27,18 +21,4 @@ "endOffset": 0

"config": "This configuration is used to add a sunInSky property of the message emitted to the first output. This can be used to work with node-red-contrib-blindcontroller nodes"
},
"multiplierGroups": [
"Standard",
"Spezial"
],
"multiplier": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tage",
"Wochen",
"Monate",
"Jahre"
]
}
}
}

@@ -5,167 +5,13 @@ {

"time-comp": "time-comp",
"compare": "compare",
"calc": "calc",
"comp": "comp",
"name": "Name",
"position": "Position",
"positionConfig": "configuration",
"compare": "vergleich",
"input": "Input",
"inputFormat": "parse format",
"inputOffset": "Offset",
"operatorContainer": "compare with",
"onlyif": "only if",
"checkall": "stopping after first match (if)",
"stopfirst": "checking all rules",
"nothing": "nothing",
"result1": "result",
"result1Value": "value",
"result1Format": "output format",
"result1Offset": "Offset",
"payload": "Payload",
"topic": "Topic",
"none": "none",
"stopped": "stopped",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"success": "Successfully injected: __label__"
"operatorContainer": "vergleich mit",
"onlyif": "nur wenn",
"result1": "Ergebnis",
"result1Value": "Wert",
"result1Format": "Ausgabeformat",
"result1Offset": "Offset"
},
"multiselectLbl": {
"operatorTypes": "include into compare"
},
"operatorsGroups": [
"complete Timestamp"
],
"operators": [
"== (equal)",
"!= (unequal)",
"> (greater)",
">= (greater or equal)",
"< (lesser)",
"<= (lesser or equal)"
],
"operatorTypesGroups": [
"include into compare",
"special"
],
"operatorTypes": [
"Milliseconds",
"Seconds",
"Minutes",
"Hours",
"Day of Month",
"Month",
"Year",
"Day of Week"
],
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"parseFormatsGroups": [
"Number",
"Text (string)",
"Other"
],
"parseFormats": [
"milliseconds - UNIX timestamp",
"ECMA-262 - JSON Date representation",
"try different text Formats, prefer day first like d/M/y",
"try different text Formats, prefer month first like M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"free text format definition"
],
"multiplierGroups": [
"Standard",
"Spezial"
],
"multiplier": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tage",
"Wochen",
"Monate",
"Jahre"
],
"placeholder": {
"position": "Position",
"name": "Name",
"topic": "Name",
"property": "Property",
"payloadStart": "",
"payloadEnd": "",
"startTime": "7:40",
"startOffset": "0",
"time": "18:15",
"offset": "0",
"timeAlt": "18:15",
"timeAltOffset": "0"
},
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
},
"tips": {

@@ -176,18 +22,4 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

"addPayload": "With the additional message properties you can send the message with define up to 3 additional properties with enhanced settings. Especial there can be defined timestamps in relation to the message send timestamp."
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on time-comp",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large"
}
}
}
{
"time-inject": {
"label": {
"time-inject": "time-inject",
"inject": "inject",
"position": "Position",
"positionConfig": "Konfiguration",
"name": "Name",
"property": "Property",
"time": "Zeit",
"offset": "Offset",
"payloadOffset": "Offset",
"timeAlt": "Alternative Zeit",
"timeAltoffset": "Offset",
"payloadTimeFormat": "Format",
"payloadOffset": "Offset",
"payloadFormat": "Format",
"addPayload1": "set",
"addPayload2": "(2) set",
"addPayload3": "(3) set",
"addPayload1Value": "value",
"addPayload2Value": "value",
"addPayload3Value": "value",
"addPayload1Format": "time format",
"addPayload2Format": "time format",
"addPayload3Format": "time format",
"addPayload1Value": "Wert",
"addPayload2Value": "Wert",
"addPayload3Value": "Wert",
"addPayload1Offset": "Offset",
"addPayload2Offset": "Offset",
"addPayload3Offset": "Offset",
"addPayload1Format": "Zeitformat",
"addPayload2Format": "Zeitformat",
"addPayload3Format": "Zeitformat",
"recalcTime": "Neuber.",
"payload": "Payload",
"topic": "Topic",
"seconds": "Sekunden",
"minutes": "Minuten",
"hours": "Stunden",
"timeformat": "time format",
"on": "nur",
"none": "nichts",
"stopped": "gestoppt",
"timestamp": "Zeit Stempel",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"5minutes": "aller 5 Minuten",
"10minutes": "aller 10 Minuten",
"15minutes": "aller 15 Minuten",
"30minutes": "aller 30 Minuten",
"1hour": "aller Stunde",
"2hours": "aller 2 Stunden",
"4hours": "aller 4 Stunden",
"6hours": "aller 6 Stunden",
"12hours": "aller 12 Stunden",
"24hours": "aller 24 Stunden",
"once": "zusätzlich",
"onstart": "Inject bei start ",
"onceDelay": "Sekunden",
"success": "Flow erfolgreich gestartet: __label__"
"onceDelay": "Sekunden"
},
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
],
"days": [
"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend",
"So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
],
"placeholder": {

@@ -138,16 +44,2 @@ "position": "Position",

},
"timeFormat": {
"default": "ddd dd mmm yyyy HH:MM:ss",
"shortDate": "m/d/yy",
"mediumDate": "d mmm, yyyy",
"longDate": "d mmmm, yyyy",
"fullDate": "dddd, d mmmm, yyyy",
"shortTime": "h:MM TT",
"mediumTime": "h:MM:ss TT",
"longTime": "h:MM:ss TT Z",
"isoDate": "yyyy-mm-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-mm-dd'T'HH:MM:ss",
"isoUtcDateTime": "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
},
"tips": {

@@ -160,21 +52,8 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

"message": {
"onceDelay": "delay __seconds__s"
"onceDelay": "verzögert um __seconds__s"
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on time-inject",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large",
"error-init": "error '__message__', retry in __time__",
"warn-init": "warning '__message__', retry in __time__"
"invalid-property-type": "Ungültiger Datentyp: __type__"
}
}
}

@@ -5,195 +5,21 @@ {

"time-span": "time-span",
"compare": "compare",
"span": "span",
"calc": "calc",
"name": "Name",
"position": "Position",
"positionConfig": "configuration",
"operand1": "Input 1",
"compare": "vergleich",
"operand1": "Eingangswert 1",
"operand1Format": "parse format",
"operand1Offset": "Offset",
"operand2": "Input 2",
"operand2": "Eingangswert 2",
"operand2Format": "parse format",
"operand2Offset": "Offset",
"operator":"calculation",
"operatorContainer": "compare timespan between Inputs",
"onlyif": "only if",
"checkall": "stopping after first match (if)",
"stopfirst": "checking all rules",
"nothing": "nothing",
"result1": "result",
"result1Value": "value",
"result1TSFormat": "output format",
"result1Format": "output format",
"result1Offset": "Offset",
"payload": "Payload",
"topic": "Topic",
"none": "none",
"stopped": "stopped",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"success": "Successfully injected: __label__"
"operator":"Berechnung",
"operatorContainer": "Vergleich der Zeitspanne zwischen den Eingangswerten",
"result1": "Ergebnis",
"result1Value": "Wert",
"result1TSFormat": "Ausgabeformat",
"result1Format": "Ausgabeformat",
"result1Offset": "Offset"
},
"multiselectLbl": {
"operatorTypes": "include into compare"
},
"operatorsGroups": [
"complete Timestamp"
],
"operators": [
"== (equal)",
"!= (unequal)",
"> (greater)",
">= (greater or equal)",
"< (lesser)",
"<= (lesser or equal)"
],
"operatorTypesGroups": [
"include into compare",
"special"
],
"operatorTypes": [
"Milliseconds",
"Seconds",
"Minutes",
"Hours",
"Day of Month",
"Month",
"Year",
"Day of Week"
],
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"outputTSFormatsGroups": [
"timestamp (number)",
"timestamp rounded (number)",
"Text"
],
"outputTSFormats": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"years",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"years",
"Other (free defined)"
],
"parseFormatsGroups": [
"Number",
"Text (string)",
"Other"
],
"parseFormats": [
"milliseconds - UNIX timestamp",
"ECMA-262 - JSON Date representation",
"try different text Formats, prefer day first d/M/y",
"try different text Formats, prefer month first M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"free text format definition"
],
"multiplierGroups": [
"Standard",
"Spezial"
],
"multiplier": [
"Millisekunden",
"Sekunden",
"Minuten",
"Stunden",
"Tage",
"Wochen",
"Monate",
"Jahre"
],
"placeholder": {
"position": "Position",
"name": "Name",
"topic": "Name",
"property": "Property",
"payloadStart": "",
"payloadEnd": "",
"startTime": "7:40",
"startOffset": "0",
"time": "18:15",
"offset": "0",
"timeAlt": "18:15",
"timeAltOffset": "0"
"offset": "0"
},
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
},
"tips": {

@@ -204,18 +30,4 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

"addPayload": "With the additional message properties you can send the message with define up to 3 additional properties with enhanced settings. Especial there can be defined timestamps in relation to the message send timestamp."
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on time-span",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large"
}
}
}
{
"within-time-switch": {
"label": {
"position": "Position",
"positionConfig": "Konfiguration",
"name": "Name",
"topic": "Topic",
"addTimes": "alternative Start- oder End-Zeit",

@@ -20,25 +16,13 @@ "propertyStart": "Alt. Start",

"statusOut": "Status",
"statusNone": "none",
"statusOnlyError": "only errors",
"statusSend": "last message",
"statusTime": "time limits",
"statusTimeOrSend": "time limits or last message",
"statusNone": "nichts",
"statusOnlyError": "nur Fehler",
"statusSend": "letzte Nachricht",
"statusTime": "Begin und Ende",
"statusTimeOrSend": "Begin und Ende oder letzte Nachricht",
"lastMsgOnStartOut": "resend start",
"lastMsgOnStartOutTxt": "next start additionally emit the last message arrived out of time",
"lastMsgOnEndOut": "resend end",
"lastMsgOnEndOutTxt": "next end additionally emit the last message arrived in time",
"seconds": "Sekunden",
"minutes": "Minuten",
"hours": "Stunden",
"on": "on",
"none": "none",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\""
"lastMsgOnEndOutTxt": "next end additionally emit the last message arrived in time"
},
"placeholder": {
"position": "Position",
"name": "Name",
"property": "Property",

@@ -54,28 +38,9 @@ "startTime": "7:40",

},
"days": [
"Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend", "Sonntag"
],
"tips": {
"addTimes": "Here can be defined alternate times for start/end. If the given property is true the alternate start/end times will be used instead the normal ones. This can be used to have different start/end times for holidays or other special days."
},
"notification": {
"success": "Successfully injected: __label__"
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on withinTimeSwitch",
"error-start-time": "Error get start time: __message__",
"error-end-time": "Error get end time: __message__",
"error-title": "internal error",
"invalid-propertyStart-type": "Invalid Property Type for alternate start: __type__",
"invalid-propertyEnd-type": "Invalid Property Type for alternate end: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"unexpected": "unexpected error (__status__) __message__",
"error-init": "error '__message__', retry in 6min",
"warn-init": "warning '__message__', retry in 6min"
"invalid-propertyEnd-type": "Invalid Property Type for alternate end: __type__"
}
}
}
{
"moon-position": {
"label": {
"position" : "Position",
"topic" :"Topic",
"between":"between",
"and":"and",
"name": "Name"
"and":"and"
},
"placeholder": {
"position" : "Position",
"name": "Name"
},
"tips": {
"moonPosControl" : "If a message arrives through the Input the calculated position of the moon will be always send to the first output. If additionally specifyd upper and lower limits for the moon radiation and the azimuth is inside the defined limits the incomming message will send to the associated output."
"moonPosControl" : "If a message arrives through the Input the calculated position of the moon will be always send to the first output. If additionally specified upper and lower limits for the moon radiation and the azimuth is inside the defined limits the incoming message will send to the associated output."
}
}
}
{
"position-config": {
"common": {
"label": {
"position": "Position",
"latitude": "Latitude",
"longitude": "Longitude",
"angleType": "angle type",
"timezoneOffset": "TZ Offset",
"name": "Name",
"property": "Property",
"minutes": "minutes"
"positionConfig": "configuration",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"timestamp":"timestamp",
"blank": "\"\"",
"nothing": "nothing",
"checkall": "stopping after first match (if)",
"stopfirst": "checking all rules"
},
"placeholder": {
"latitude": "51.025",
"longitude": "-1.4",
"angleType": "deg",
"timezoneOffset": "0",
"name": "Name"
"types": {
"unlimited":"no limitation",
"undefined":"not used",
"datespecific":"timestamp enhanced",
"timeentered":"time (next)",
"dateentered":"date",
"timepredefined":"fixed times",
"dayofmonth":"day of month",
"timesun":"sun time",
"timemoon":"moon time",
"suncalc":"sun calculation",
"mooncalc":"moon calculation"
},
"tips": {
"config": "Starting from Version 2.0 the coordinates are not saved as credentials due to privacy reasons. So they no longer part of the regular flow and will not part of the export! On an update from previous version a save and re-deploy is necessary.",
"sunPosControl": "Here you can specify the upper and lower limits for the solar radiation so that you can evaluate the sunshine on 4 sides of an object."
"multiselectLbl": {
"operatorTypes": "include into compare"
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occured on position-configuration",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large",
"longitude-missing": "Longitude is missing!",
"latitude-missing": "Latitude is missing!"
},
"operatorsGroups": [
"complete Timestamp"
],
"operators": [
"== (equal)",
"!= (unequal)",
"> (greater)",
">= (greater or equal)",
"< (lesser)",
"<= (lesser or equal)"
],
"operatorTypesGroups": [
"include into compare",
"special"
],
"operatorTypes": [
"Milliseconds",
"Seconds",
"Minutes",
"Hours",
"Day of Month",
"Month",
"Year",
"Day of Week"
],
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262 - JSON Date representation",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"outputTSFormatsGroups": [
"timestamp (number)",
"timestamp rounded (number)",
"Text"
],
"outputTSFormats": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"years",
"seconds rounded",
"minutes rounded",
"hours rounded",
"days rounded",
"weeks rounded",
"month rounded",
"years rounded",
"Other (free defined)"
],
"parseFormatsGroups": [
"Number",
"Text (string)",
"Other"
],
"parseFormats": [
"milliseconds - UNIX timestamp",
"ECMA-262 - JSON Date representation",
"try different text Formats, prefer day first like d/M/y",
"try different text Formats, prefer month first like M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"free text format definition"
],
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
],
"days": [

@@ -63,4 +181,51 @@ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",

"in 6 days"
]
],
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-title": "internal error",
"error-init": "error '__message__', retry in __time__",
"warn-init": "warning '__message__', retry in __time__"
},
"position-config": {
"label": {
"position": "Position",
"latitude": "Latitude",
"longitude": "Longitude",
"angleType": "angle type",
"timezoneOffset": "TZ Offset",
"name": "Name",
"property": "Property",
"minutes": "minutes"
},
"placeholder": {
"latitude": "51.025",
"longitude": "-1.4",
"angleType": "deg",
"timezoneOffset": "0",
"name": "Name"
},
"tips": {
"config": "Starting from Version 2.0 the coordinates are not saved as credentials due to privacy reasons. So they no longer part of the regular flow and will not part of the export! On an update from previous version a save and re-deploy is necessary.",
"sunPosControl": "Here you can specify the upper and lower limits for the solar radiation so that you can evaluate the sunshine on 4 sides of an object."
},
"errors": {
"longitude-missing": "Longitude is missing!",
"latitude-missing": "Latitude is missing!"
}
}
}
{
"sun-position": {
"label": {
"position" : "Position",
"positionConfig": "configuration",
"config": "configuration",
"topic" :"Topic",
"azimuthpos":"azimuth position",

@@ -18,4 +14,2 @@ "between":"between",

"placeholder": {
"position" : "Position",
"name": "Name",
"startOffset": 0,

@@ -27,18 +21,4 @@ "endOffset": 0

"config": "This configuration is used to add a sunInSky property of the message emitted to the first output. This can be used to work with node-red-contrib-blindcontroller nodes"
},
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
]
}
}
}

@@ -6,7 +6,2 @@ {

"compare": "compare",
"calc": "calc",
"comp": "comp",
"name": "Name",
"position": "Position",
"positionConfig": "configuration",
"input": "Input",

@@ -17,128 +12,7 @@ "inputFormat": "parse format",

"onlyif": "only if",
"checkall": "stopping after first match (if)",
"stopfirst": "checking all rules",
"nothing": "nothing",
"result1": "result",
"result1Value": "value",
"result1Format": "output format",
"result1Offset": "Offset",
"payload": "Payload",
"topic": "Topic",
"none": "none",
"stopped": "stopped",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"success": "Successfully injected: __label__"
"result1Offset": "Offset"
},
"multiselectLbl": {
"operatorTypes": "include into compare"
},
"operatorsGroups": [
"complete Timestamp"
],
"operators": [
"== (equal)",
"!= (unequal)",
"> (greater)",
">= (greater or equal)",
"< (lesser)",
"<= (lesser or equal)"
],
"operatorTypesGroups": [
"include into compare",
"special"
],
"operatorTypes": [
"Milliseconds",
"Seconds",
"Minutes",
"Hours",
"Day of Month",
"Month",
"Year",
"Day of Week"
],
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"parseFormatsGroups": [
"Number",
"Text (string)",
"Other"
],
"parseFormats": [
"milliseconds - UNIX timestamp",
"ECMA-262 - JSON Date representation",
"try different text Formats, prefer day first like d/M/y",
"try different text Formats, prefer month first like M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"free text format definition"
],
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
],
"placeholder": {

@@ -158,16 +32,2 @@ "position": "Position",

},
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
},
"tips": {

@@ -178,18 +38,4 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

"addPayload": "With the additional message properties you can send the message with define up to 3 additional properties with enhanced settings. Especial there can be defined timestamps in relation to the message send timestamp."
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on time-comp",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large"
}
}
}
{
"time-inject": {
"label": {
"time-inject": "time-inject",
"inject": "inject",
"position": "Position",
"positionConfig": "configuration",
"name": "Name",
"property": "Property",
"time": "Time",
"offset": "Offset",
"payloadOffset": "Offset",
"timeOffset": "Offset",
"timeAlt": "Alternate time",
"timeAltOffset": "Offset",
"payloadTimeFormat": "Format",
"payloadOffset": "Offset",
"payloadFormat": "Format",
"addPayload1": "set",

@@ -22,2 +17,5 @@ "addPayload2": "(2) set",

"addPayload3Value": "value",
"addPayload1Offset": "Offset",
"addPayload2Offset": "Offset",
"addPayload3Offset": "Offset",
"addPayload1Format": "time format",

@@ -27,100 +25,8 @@ "addPayload2Format": "time format",

"recalcTime": "Reclac.",
"payload": "Payload",
"topic": "Topic",
"seconds": "seconds",
"minutes": "minutes",
"hours": "hours",
"timeformat": "time format",
"on": "on",
"none": "none",
"stopped": "stopped",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"5minutes": "every 5 minutes",
"10minutes": "every 10 minutes",
"15minutes": "every 15 minutes",
"30minutes": "every 30 minutes",
"1hour": "every hour",
"2hours": "every 2 hour",
"4hours": "every 4 hour",
"6hours": "every 6 hour",
"12hours": "every 12 hour",
"24hours": "every 24 hour",
"once": "additional",
"onstart": "Inject on start ",
"onceDelay": "seconds",
"success": "Successfully injected: __label__"
"onceDelay": "seconds"
},
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
],
"days": [
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
],
"placeholder": {

@@ -140,16 +46,2 @@ "position": "Position",

},
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
},
"tips": {

@@ -164,19 +56,6 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occured on time-inject",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large",
"error-init": "error '__message__', retry in __time__",
"warn-init": "warning '__message__', retry in __time__"
"errors":{
"invalid-property-type": "Invalid Property Type: __type__"
}
}
}

@@ -6,7 +6,2 @@ {

"compare": "compare",
"span": "span",
"calc": "calc",
"name": "Name",
"position": "Position",
"positionConfig": "configuration",
"operand1": "Input 1",

@@ -20,6 +15,2 @@ "operand1Format": "parse format",

"operatorContainer": "compare timespan between Inputs",
"onlyif": "only if",
"checkall": "stopping after first match (if)",
"stopfirst": "checking all rules",
"nothing": "nothing",
"result1": "result",

@@ -29,173 +20,8 @@ "result1Value": "value",

"result1Format": "output format",
"result1Offset": "Offset",
"payload": "Payload",
"topic": "Topic",
"none": "none",
"stopped": "stopped",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\"",
"success": "Successfully injected: __label__"
"result1Offset": "Offset"
},
"multiselectLbl": {
"operatorTypes": "include into compare"
},
"operatorsGroups": [
"complete Timestamp"
],
"operators": [
"== (equal)",
"!= (unequal)",
"> (greater)",
">= (greater or equal)",
"< (lesser)",
"<= (lesser or equal)"
],
"operatorTypesGroups": [
"include into compare",
"special"
],
"operatorTypes": [
"Milliseconds",
"Seconds",
"Minutes",
"Hours",
"Day of Month",
"Month",
"Year",
"Day of Week"
],
"outputFormatsGroups": [
"Number",
"Text (string)",
"time (number) since emit",
"day of week",
"Text free"
],
"outputFormats": [
"milliseconds UNIX timestamp",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"ECMA-262",
"local date and time",
"local date and time enh.",
"local time",
"local time enh.",
"local date",
"local date long",
"UTC date and time",
"ISO date and time",
"milliseconds",
"seconds",
"minutes",
"hours",
"Day Name, e.g. Monday, 22.12.",
"Day in relative, e.g. Today, 22.12.",
"as object",
"Other"
],
"outputFormatsName": [
"UNIX",
"YYYYMMDDHHMMSS",
"YYYYMMDD_HHMMSS",
"ECMA262",
"local",
"localLong",
"localTime",
"localTimeLong",
"localDate",
"localDateLong",
"UTC",
"ISO",
"ms",
"sec",
"min",
"hour",
"ISO",
"ISO",
"object",
"other"
],
"outputTSFormatsGroups": [
"timestamp (number)",
"timestamp rounded (number)",
"Text"
],
"outputTSFormats": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"years",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"years",
"Other (free defined)"
],
"parseFormatsGroups": [
"Number",
"Text (string)",
"Other"
],
"parseFormats": [
"milliseconds - UNIX timestamp",
"ECMA-262 - JSON Date representation",
"try different text Formats, prefer day first d/M/y",
"try different text Formats, prefer month first M/d/y",
"YYYYMMDDHHMMSS",
"YYYYMMDD.HHMMSS",
"try different various Formats (object, number, text)",
"free text format definition"
],
"multiplierGroups": [
"Standard",
"Special"
],
"multiplier": [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"weeks",
"month",
"year"
],
"placeholder": {
"position": "Position",
"name": "Name",
"topic": "Name",
"property": "Property",
"payloadStart": "",
"payloadEnd": "",
"startTime": "7:40",
"startOffset": "0",
"time": "18:15",
"offset": "0",
"timeAlt": "18:15",
"timeAltOffset": "0"
"offset": "0"
},
"timeFormat": {
"default": "ddd MMM dd yyyy HH:mm:ss",
"shortDate": "m/d/yy",
"mediumDate": "MMM d, yyyy",
"longDate": "MMMM d, yyyy",
"fullDate": "dddd, MMMM d, yyyy",
"shortTime": "h:mm TT",
"mediumTime": "h:mm:ss TT",
"longTime": "h:mm:ss TT Z",
"isoDate": "yyyy-MM-dd",
"isoTime": "HH:MM:ss",
"isoDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"isoUtcDateTime": "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
},
"tips": {

@@ -206,18 +32,4 @@ "config": "If time is set to 'not used' the inject node can only used manually or once!",

"addPayload": "With the additional message properties you can send the message with define up to 3 additional properties with enhanced settings. Especial there can be defined timestamps in relation to the message send timestamp."
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on time-span",
"error-title": "internal error",
"unexpected": "unexpected error (__status__) __message__",
"invalid-property-type": "Invalid Property Type: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"failed": "inject failed, see log for details",
"failed2": "Inject failed: __error__",
"toolong": "Interval too large"
}
}
}
{
"within-time-switch": {
"label": {
"position": "Position",
"positionConfig": "configuration",
"name": "Name",
"topic": "Topic",
"addTimes": "alternate start or end time",

@@ -28,17 +24,5 @@ "propertyStart": "Alt. Start on",

"lastMsgOnEndOut": "resend end",
"lastMsgOnEndOutTxt": "next end additionally emit the last message arrived in time",
"seconds": "seconds",
"minutes": "minutes",
"hours": "hours",
"on": "on",
"none": "none",
"timestamp": "timestamp",
"binary": "binary",
"json": "json",
"jsonata": "json expr.",
"blank": "\"\""
"lastMsgOnEndOutTxt": "next end additionally emit the last message arrived in time"
},
"placeholder": {
"position": "Position",
"name": "Name",
"property": "Property",

@@ -54,34 +38,9 @@ "startTime": "7:40",

},
"days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"tips": {
"addTimes": "Here can be defined alternate times for start/end. If the given property is true the alternate start/end times will be used instead the normal ones. This can be used to have different start/end times for holidays or other special days."
},
"notification": {
"success": "Successfully injected: __label__"
},
"errors": {
"error": "<strong>Error</strong>: __message__",
"error-text": "Exception occurred on withinTimeSwitch",
"errors": {
"error-start-time": "Error get start time: __message__",
"error-end-time": "Error get end time: __message__",
"error-title": "internal error",
"invalid-propertyStart-type": "Invalid Property Type for alternate start: __type__",
"invalid-propertyEnd-type": "Invalid Property Type for alternate end: __type__",
"invalid-json": "Invalid 'to' JSON property",
"invalid-jsonata-expr": "Invalid JSONata expression: __error__",
"not-deployed": "node not deployed",
"no-response": "no response from server",
"unexpected": "unexpected error (__status__) __message__",
"error-init": "error '__message__', retry in 6min",
"warn-init": "warning '__message__', retry in 6min"
"invalid-propertyEnd-type": "Invalid Property Type for alternate end: __type__"
}
}
}

@@ -187,6 +187,2 @@ /********************************************

this.formatOutDate = (date, format) => {
return hlp.getFormattedDateOut(date, format, RED._('time-comp.days'), RED._('time-comp.month'), RED._('time-comp.dayDiffNames'));
};
this.getOutDataProp = (_srcNode, msg, vType, value, format, offset, offsetType, multiplier, days) => {

@@ -199,3 +195,3 @@ // _srcNode.debug('getOutDataProp type='+vType+' value='+value+' format='+format+' offset='+offset+' offset='+offsetType+' multiplier='+multiplier);

result = hlp.addOffset((new Date()), offsetX, multiplier);
return node.formatOutDate(result, format);
return hlp.getFormattedDateOut(result, format);
}

@@ -208,3 +204,3 @@ return value;

result = hlp.addOffset((new Date()), offsetX, multiplier);
return node.formatOutDate(result, format);
return hlp.getFormattedDateOut(result, format);
} else if (vType === 'msgPayload') {

@@ -231,3 +227,3 @@ return msg.payload;

if (result && result.value && !result.error) {
return node.formatOutDate(result.value, format);
return hlp.getFormattedDateOut(result.value, format);
}

@@ -239,3 +235,3 @@ return null;

result = hlp.normalizeDate(result, offsetX, multiplier, undefined, days);
return node.formatOutDate(result, format);
return hlp.getFormattedDateOut(result, format);
} else if (vType === 'dayOfMonth') {

@@ -247,3 +243,3 @@ result = new Date();

result = hlp.addOffset(result, offsetX, multiplier);
return node.formatOutDate(result, format);
return hlp.getFormattedDateOut(result, format);
}

@@ -326,3 +322,3 @@ return null;

result.error = 'No valid Days given!';
} else if (vType === '' || vType === 'none' || days === '') {
} else if (vType === '' || vType === 'none') {
result.error = 'wrong type "' + vType + '"="' + value+'"';

@@ -514,9 +510,15 @@ } else if (vType === 'date') {

try {
initTimes(this);
node.debug('initialize');
const today = new Date();
const dayId = getUTCDayId(today);
const tomorrow = today.addDays(1);
sunTimesRefresh(node, today, tomorrow, dayId);
moonTimesRefresh(node, today, tomorrow, dayId);
hlp.initializeParser(RED._('common.days', { returnObjects: true}), RED._('common.month', { returnObjects: true}), RED._('common.dayDiffNames', { returnObjects: true}));
} catch (err) {
this.debug(util.inspect(err, Object.getOwnPropertyNames(err)));
node.debug(util.inspect(err, Object.getOwnPropertyNames(err)));
node.status({
fill: 'red',
shape: 'ring',
text: RED._('position-config.errors.error-title')
text: RED._('errors.error-title')
});

@@ -602,10 +604,2 @@ throw err;

function initTimes(node) {
const today = new Date();
const dayId = getUTCDayId(today);
const tomorrow = today.addDays(1);
sunTimesRefresh(node, today, tomorrow, dayId);
moonTimesRefresh(node, today, tomorrow, dayId);
}
function getUTCDayId(d) {

@@ -612,0 +606,0 @@ return d.getUTCDay() + (d.getUTCMonth() * 31) + (d.getUTCFullYear() * 372);

@@ -113,7 +113,7 @@ /************************************************************************/

function getTypes() { // eslint-disable-line no-unused-vars
function getTypes(node) { // eslint-disable-line no-unused-vars
return {
Unlimited: {
value: 'none',
label: 'no limitation',
label: node._('node-red-contrib-sun-position/position-config:common.types.unlimited','no limitation'),
// icon: "icons/node-red-contrib-sun-position/inputTypeNone.png",

@@ -124,3 +124,3 @@ hasValue: false

value: 'none',
label: 'not used',
label: node._('node-red-contrib-sun-position/position-config:common.types.undefined','not used'),
// icon: "icons/node-red-contrib-sun-position/inputTypeNone.png",

@@ -131,3 +131,3 @@ hasValue: false

value: 'dateSpecific',
label: 'timestamp enhanced',
label: node._('node-red-contrib-sun-position/position-config:common.types.datespecific','timestamp enhanced'),
// icon: "icons/node-red-contrib-sun-position/inputTypeNone.png",

@@ -173,3 +173,3 @@ hasValue: false

value: 'entered',
label: 'time (next)',
label: node._('node-red-contrib-sun-position/position-config:common.types.timeentered','time (next)'),
icon: 'icons/node-red-contrib-sun-position/inputTypeTime.png',

@@ -181,3 +181,3 @@ hasValue: true,

value: 'dateEntered',
label: 'date',
label: node._('node-red-contrib-sun-position/position-config:common.types.dateentered','date'),
icon: 'icons/node-red-contrib-sun-position/inputTypeDate.png',

@@ -189,3 +189,3 @@ hasValue: true,

value: 'TimePredefined',
label: 'fixed times',
label: node._('node-red-contrib-sun-position/position-config:common.types.timepredefined','fixed times'),
options: ['next midnight', 'next noon']

@@ -195,3 +195,3 @@ },

value: 'DayOfMonth',
label: 'day of month',
label: node._('node-red-contrib-sun-position/position-config:common.types.dayofmonth','day of month'),
options: [

@@ -216,3 +216,3 @@ 'first Monday',

value: 'pdsTime',
label: 'sun time ',
label: node._('node-red-contrib-sun-position/position-config:common.types.timesun','sun time'),
icon: 'icons/node-red-contrib-sun-position/inputTypeSunClock.png',

@@ -225,3 +225,3 @@ options: [ 'astronomicalDawn', 'amateurDawn', 'nauticalDawn', 'blueHourDawnStart', 'civilDawn', 'blueHourDawnEnd',

value: 'pdmTime',
label: 'moon time ',
label: node._('node-red-contrib-sun-position/position-config:common.types.timemoon','moon time'),
icon: 'icons/node-red-contrib-sun-position/inputTypeMoonClock.png',

@@ -232,3 +232,3 @@ options: ['rise', 'set']

value: 'pdsCalcData',
label: 'sun calculation',
label: node._('node-red-contrib-sun-position/position-config:common.types.suncalc','sun calculation'),
icon: 'icons/node-red-contrib-sun-position/inputTypeSun.png',

@@ -239,3 +239,3 @@ hasValue: false

value: 'pdmCalcData',
label: 'moon calculation',
label: node._('node-red-contrib-sun-position/position-config:common.types.mooncalc','moon calculation'),
icon: 'icons/node-red-contrib-sun-position/inputTypeMoon.png',

@@ -428,3 +428,4 @@ hasValue: false

function appendOptions(node, i18N ,parent, elementName, limit) { // eslint-disable-line no-unused-vars
function appendOptions(node, parent, elementName, limit) { // eslint-disable-line no-unused-vars
// console.log('appendOptions elementName='+ elementName + ' limit='+limit);
const groups = SelectFields[elementName + 'Groups'];

@@ -435,3 +436,3 @@ const elements = SelectFields[elementName];

for (let gIndex = 0; gIndex < groupLength; gIndex++) {
const group = $('<optgroup/>', {label: node._(i18N + '.' + elementName + 'Groups.' + gIndex)}).appendTo(parent);
const group = $('<optgroup/>', {label: node._('node-red-contrib-sun-position/position-config:common.' + elementName + 'Groups.' + gIndex)}).appendTo(parent);
for (let eIndex = 0; eIndex < elementsLength; eIndex++) {

@@ -441,6 +442,6 @@ if (groups[gIndex].id === elements[eIndex].group) {

if (limit(elements[eIndex].id)) {
group.append($('<option></option>').val(elements[eIndex].id).text(node._(i18N + '.' + elementName + '.' + eIndex)).attr('addText', elements[eIndex].add));
group.append($('<option></option>').val(elements[eIndex].id).text(node._('node-red-contrib-sun-position/position-config:common.' + elementName + '.' + eIndex)).attr('addText', elements[eIndex].add));
}
} else {
group.append($('<option></option>').val(elements[eIndex].id).text(node._(i18N + '.' + elementName + '.' + eIndex)).attr('addText', elements[eIndex].add));
group.append($('<option></option>').val(elements[eIndex].id).text(node._('node-red-contrib-sun-position/position-config:common.' + elementName + '.' + eIndex)).attr('addText', elements[eIndex].add));
}

@@ -483,2 +484,5 @@ }

}
if (data.onFocus) {
tInputField.on('change focus focusin focusout', data.onFocus);
}
return tInputField;

@@ -493,4 +497,6 @@ }

function initDaysCheckbox(element, val) { // eslint-disable-line no-unused-vars
if (val === '*' || typeof val === 'undefined' || val === null || val === '') {
if (val === '*' || typeof val === 'undefined' || val === null) {
$(element + ' input[type=checkbox]').prop('checked', true);
} else if (val === '' || val === 'none') {
$(element + ' input[type=checkbox]').removeAttr('checked');
} else {

@@ -506,4 +512,4 @@ $(element + ' input[type=checkbox]').removeAttr('checked');

function initCombobox(node, i18N, inputSelectName, inputBoxName, dataList, optionElementName, value, width) { // eslint-disable-line no-unused-vars
// console.log('node=' + node + ' i18N=' + i18N + ' inputSelectName=' + inputSelectName + ' inputBoxName=' + inputBoxName + ' dataList=' + dataList + ' optionElementName=' + optionElementName + ' value=' + value + ' width=' + width); // eslint-disable-line
function initCombobox(node, inputSelectName, inputBoxName, dataList, optionElementName, value, width) { // eslint-disable-line no-unused-vars
// console.log('initCombobox node=' + node + ' inputSelectName=' + inputSelectName + ' inputBoxName=' + inputBoxName + ' dataList=' + dataList + ' optionElementName=' + optionElementName + ' value=' + value + ' width=' + width); // eslint-disable-line
const $inputSelect = $('#node-input-' + inputSelectName);

@@ -513,5 +519,4 @@ const $inputBox = $('#node-input-' + inputBoxName);

$inputSelect.attr('linked-input', inputBoxName);
$inputSelect.attr('i18N-name', i18N);
appendOptions(node, i18N, $inputSelect, optionElementName);
appendOptions(node, $inputSelect, optionElementName);
autocomplete($('#node-input-' + inputBoxName), dataList);

@@ -531,4 +536,3 @@

if (!isNaN($inputBox.val())) {
const i18N = $inputSelect.attr('i18N-name');
$inputBox.val(node._(i18N + '.timeFormat.default'));
$inputBox.val(node._('node-red-contrib-sun-position/position-config:common.timeFormat.default'));
}

@@ -535,0 +539,0 @@ } else {

@@ -22,4 +22,2 @@ /********************************************

this.on('input', msg => {
node.debug('config ' + util.inspect(config)); // eslint-disable-line
node.debug('emit - msg ' + util.inspect(msg)); // eslint-disable-line
if (node.positionConfig === null ||

@@ -36,7 +34,4 @@ config.operator === null ||

try {
const inputData = node.positionConfig.getDateFromProp(node, msg, config.inputType, config.input, config.inputFormat, config.inputOffset, config.inputOffsetType, config.inputOffsetMultiplier);
node.debug('inputData ' + util.inspect(inputData)); // eslint-disable-line
if (config.result1Type !== 'none') {

@@ -50,3 +45,2 @@ let resultObj = null;

node.debug('resultObj ' + util.inspect(resultObj)); // eslint-disable-line
if (resultObj === null) {

@@ -72,3 +66,2 @@ throw new Error('could not evaluate ' + config.result1ValueType + '.' + config.result1Value);

node.debug('msg ' + util.inspect(msg)); // eslint-disable-line
const resObj = [];

@@ -79,3 +72,2 @@ const rules = config.rules;

const rule = rules[i];
node.debug('checking rule ' + util.inspect(rule)); // eslint-disable-line
let operatorValid = true;

@@ -89,5 +81,6 @@ if (rule.propertyType !== 'none') {

const ruleoperand = node.positionConfig.getDateFromProp(node, msg, rule.operandType, rule.operandValue, rule.format, rule.offsetValue, 'num', rule.multiplier);
/*
node.debug('operand ' + util.inspect(ruleoperand));
node.debug('operator ' + util.inspect(rule.operator));
node.debug('operatorType ' + util.inspect(rule.operatorType));
node.debug('operatorType ' + util.inspect(rule.operatorType)); */

@@ -208,3 +201,2 @@ let compare = null;

resObj.push(msg);
node.debug('result object ' + util.inspect(resObj)); // eslint-disable-line
node.status({

@@ -219,3 +211,3 @@ text: inputData.toISOString()

shape: 'ring',
text: RED._('time-comp.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -222,0 +214,0 @@ throw err;

@@ -91,23 +91,2 @@ /********************************************

function retriggerOnInit(node, errorStatus, errorMesage) {
node.warn(RED._('time-inject.errors.warn-init', { message: errorMesage, time: 6}));
setTimeout(() => {
try {
doCreateTimeout(node);
} catch (err) {
node.error(err.message);
node.debug(util.inspect(err, Object.getOwnPropertyNames(err)));
node.status({
fill: 'red',
shape: 'ring',
text: RED._('time-inject.errors.error-title')
});
}
}, 360000); // 6 Minuten
node.status({
fill: 'red',
shape: 'ring',
text: RED._('time-inject.errors.error-init', { message: errorStatus, time: '6min'})
});
}
function doCreateTimeout(node, _onInit) {

@@ -132,4 +111,3 @@ let errorStatus = '';

if (_onInit === true) {
retriggerOnInit(node, errorStatus, node.nextTimeData.error);
return;
return { state:'error', done: false, statusMsg: errorStatus, errorMsg: node.nextTimeData.error};
}

@@ -154,4 +132,3 @@ node.error(node.nextTimeData.error);

if (_onInit === true) {
retriggerOnInit(node, errorStatus, node.nextTimeAltData.error);
return;
return { state:'error', done: false, statusMsg: errorStatus, errorMsg: node.nextTimeAltData.error};
}

@@ -169,3 +146,3 @@ node.error(node.nextTimeAltData.error);

hlp.handleError(this, 'Invalid time format', undefined, 'internal error!');
return;
return { state:'error', done: false, statusMsg: 'internal error!', errorMsg: 'Invalid time format'};
}

@@ -215,6 +192,6 @@

shape: 'ring',
text: RED._('time-inject.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});
}
return;
return { state:'recalc', done: true };
}

@@ -243,7 +220,2 @@ }

if ((errorStatus !== '')) {
if (_onInit === true) {
retriggerOnInit(node, errorStatus, errorStatus);
return;
}
node.status({

@@ -254,2 +226,3 @@ fill: 'red',

});
return { state:'error', done: false, statusMsg: errorStatus, errorMsg: errorStatus };
// if an error occurred, will retry in 10 minutes. This will prevent errors on initialization.

@@ -279,2 +252,3 @@ } else if (node.nextTimeAlt && node.timeOutObj) {

}
return { state:'ok', done: true };
}

@@ -324,3 +298,3 @@

shape: 'ring',
text: RED._('time-inject.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -347,3 +321,27 @@ }

}
doCreateTimeout(node, true);
const createTO = doCreateTimeout(node, true);
if (createTO.done !== true) {
if (createTO.errorMsg) {
node.warn(RED._('node-red-contrib-sun-position/position-config:errors.warn-init', { message: createTO.errorMsg, time: 6}));
}
setTimeout(() => {
try {
doCreateTimeout(node);
} catch (err) {
node.error(err.message);
node.debug(util.inspect(err, Object.getOwnPropertyNames(err)));
node.status({
fill: 'red',
shape: 'ring',
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});
}
}, 360000); // 6 Minuten
node.status({
fill: 'red',
shape: 'ring',
text: RED._('node-red-contrib-sun-position/position-config:errors.error-init', { message: createTO.statusMsg, time: '6min'})
});
}
} catch (err) {

@@ -355,3 +353,3 @@ node.error(err.message);

shape: 'ring',
text: RED._('time-inject.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -370,2 +368,17 @@ }

});
RED.httpAdmin.post('/time-inject/:id', RED.auth.needsPermission('time-inject.write'), (req,res) => {
const node = RED.nodes.getNode(req.params.id);
if (node !== null) {
try {
node.receive();
res.sendStatus(200);
} catch(err) {
res.sendStatus(500);
node.error(RED._('node-red:inject.failed',{error:err.toString()}));
}
} else {
res.sendStatus(404);
}
});
};

@@ -236,4 +236,2 @@ /********************************************

this.on('input', msg => {
node.debug('config ' + util.inspect(config)); // eslint-disable-line
node.debug('emit - msg ' + util.inspect(msg)); // eslint-disable-line
if (node.positionConfig === null ||

@@ -252,3 +250,2 @@ config.operand1Type === null ||

const operand1 = node.positionConfig.getDateFromProp(node, msg, config.operand1Type, config.operand1, config.operand1Format, config.operand1Offset, config.operand1OffsetType, config.operand1OffsetMultiplier);
node.debug('operand1 ' + util.inspect(operand1)); // eslint-disable-line
if (operand1 === null) {

@@ -258,3 +255,2 @@ return null;

const operand2 = node.positionConfig.getDateFromProp(node, msg, config.operand2Type, config.operand2, config.operand2Format, config.operand2Offset, config.operand2OffsetType, config.operand2OffsetMultiplier);
node.debug('operand2 ' + util.inspect(operand2)); // eslint-disable-line
if (operand2 === null) {

@@ -270,3 +266,2 @@ return null;

let resultObj = null;
node.debug('resultObj1 ' + util.inspect(config.result1ValueType) + ' + ' + util.inspect(config.result1Format)); // eslint-disable-line
if (config.result1ValueType === 'timespan') {

@@ -282,4 +277,3 @@ resultObj = getFormattedTimeSpanOut(operand1, operand2, config.result1TSFormat);

// to
node.debug('resultObj1 ' + util.inspect(resultObj)); // eslint-disable-line
node.debug('resultObj2 ' + util.inspect(resultObj)); // eslint-disable-line
if (resultObj === null) {

@@ -305,3 +299,2 @@ throw new Error('could not evaluate ' + config.result1ValueType + '.' + config.result1Value);

node.debug('msg ' + util.inspect(msg)); // eslint-disable-line
const resObj = [];

@@ -312,3 +305,2 @@ const rules = config.rules;

const rule = rules[i];
node.debug('checking rule ' + util.inspect(rule)); // eslint-disable-line
try {

@@ -319,6 +311,6 @@ let ruleoperand = node.positionConfig.getFloatProp(node, msg, rule.operandType, rule.operandValue);

}
/*
node.debug('operand ' + util.inspect(ruleoperand));
node.debug('operator ' + util.inspect(rule.operator));
node.debug('operatorType ' + util.inspect(rule.operatorType));
node.debug('operatorType ' + util.inspect(rule.operatorType)); */

@@ -373,3 +365,2 @@ let result = false;

resObj.push(msg);
node.debug('result object ' + util.inspect(resObj)); // eslint-disable-line
node.status({

@@ -385,3 +376,3 @@ text: (operand1.getTime() - operand2.getTime()) / 1000 + 's'

shape: 'ring',
text: RED._('time-span.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -388,0 +379,0 @@ throw err;

@@ -24,5 +24,5 @@ /********************************************

shape: 'ring',
text: RED._('within-time-switch..errors.error-init', result.start.error)
text: RED._('node-red-contrib-sun-position/position-config:errors.error-init', result.start.error)
});
node.warn(RED._('within-time-switch..errors.warn-init', result.start.error));
node.warn(RED._('node-red-contrib-sun-position/position-config:errors.warn-init', result.start.error));
return true;

@@ -36,5 +36,5 @@ }

shape: 'ring',
text: RED._('within-time-switch..errors.error-init', result.end.error)
text: RED._('node-red-contrib-sun-position/position-config:errors.error-init', result.end.error)
});
node.warn(RED._('within-time-switch..errors.warn-init', result.end.error));
node.warn(RED._('node-red-contrib-sun-position/position-config:errors.warn-init', result.end.error));
return true;

@@ -235,3 +235,3 @@ }

shape: 'ring',
text: RED._('within-time-switch.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -257,3 +257,3 @@ }

shape: 'ring',
text: RED._('within-time-switch.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -269,3 +269,3 @@ }

shape: 'ring',
text: RED._('within-time-switch.errors.error-title')
text: RED._('node-red-contrib-sun-position/position-config:errors.error-title')
});

@@ -272,0 +272,0 @@ }

{
"name": "node-red-contrib-sun-position",
"version": "0.2.6",
"version": "0.2.7-beta.0",
"description": "NodeRED nodes to get sun and moon position",

@@ -94,4 +94,3 @@ "keywords": [

"eslint": "^5.12.0",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-jsdoc": "^4.1.0"
"eslint-plugin-html": "^5.0.0"
},

@@ -107,4 +106,3 @@ "eslintConfig": {

"plugins": [
"html",
"jsdoc"
"html"
],

@@ -111,0 +109,0 @@ "extends": "eslint:recommended",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc