mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Merge branch 'master' into Add-OAuth-to-node-red-node-email-
This commit is contained in:
commit
e0fd4417ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ setenv.sh
|
||||
package-lock.json
|
||||
social/xmpp/92-xmpp.old
|
||||
*.tgz
|
||||
.DS_Store
|
||||
|
@ -83,9 +83,15 @@ module.exports = function(RED) {
|
||||
});
|
||||
|
||||
node.child.on('error', function (err) {
|
||||
if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); }
|
||||
else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); }
|
||||
else { node.error(RED._("rpi-gpio.errors.error",{error:err.errno})) }
|
||||
if (err.code === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")+err.path,err); }
|
||||
else if (err.code === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")+err.path,err); }
|
||||
else { node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err) }
|
||||
});
|
||||
|
||||
node.child.stdin.on('error', function (err) {
|
||||
if (!node.finished) {
|
||||
node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -198,11 +204,16 @@ module.exports = function(RED) {
|
||||
});
|
||||
|
||||
node.child.on('error', function (err) {
|
||||
if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); }
|
||||
else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); }
|
||||
else { node.error(RED._("rpi-gpio.errors.error")+': ' + err.errno); }
|
||||
if (err.code === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")+err.path,err); }
|
||||
else if (err.code === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")+err.path,err); }
|
||||
else { node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err) }
|
||||
});
|
||||
|
||||
node.child.stdin.on('error', function (err) {
|
||||
if (!node.finished) {
|
||||
node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
node.warn(RED._("rpi-gpio.errors.invalidpin")+": "+node.pin);
|
||||
|
@ -66,8 +66,8 @@
|
||||
"invalidinput": "Ungültige Eingabe",
|
||||
"needtobeexecutable": "__command__ muss ausführbar sein",
|
||||
"mustbeexecutable": "nrgpio muss ausführbar sein",
|
||||
"commandnotfound": "nrgpio-Befehl nicht gefunden",
|
||||
"commandnotexecutable": "nrgpio-Befehl nicht ausführbar",
|
||||
"commandnotfound": "nrgpio-Befehl nicht gefunden ",
|
||||
"commandnotexecutable": "nrgpio-Befehl nicht ausführbar ",
|
||||
"error": "Fehler: __error__",
|
||||
"pythoncommandnotfound": "nrgpio-Python-Befehl nicht aktiv"
|
||||
}
|
||||
|
@ -66,8 +66,8 @@
|
||||
"invalidinput": "Invalid input",
|
||||
"needtobeexecutable": "__command__ needs to be executable",
|
||||
"mustbeexecutable": "nrgpio must to be executable",
|
||||
"commandnotfound": "nrgpio command not found",
|
||||
"commandnotexecutable": "nrgpio command not executable",
|
||||
"commandnotfound": "nrgpio command not found ",
|
||||
"commandnotexecutable": "nrgpio command not executable ",
|
||||
"error": "error: __error__",
|
||||
"pythoncommandnotfound": "nrgpio python command not running"
|
||||
}
|
||||
|
@ -66,8 +66,8 @@
|
||||
"invalidinput": "入力が不正です",
|
||||
"needtobeexecutable": "__command__ は実行可能である必要があります",
|
||||
"mustbeexecutable": "nrgpio は実行可能である必要があります",
|
||||
"commandnotfound": "nrgpio コマンドが見つかりません",
|
||||
"commandnotexecutable": "nrgpio コマンドが実行可能ではありません",
|
||||
"commandnotfound": "nrgpio コマンドが見つかりません ",
|
||||
"commandnotexecutable": "nrgpio コマンドが実行可能ではありません ",
|
||||
"error": "エラー: __error__",
|
||||
"pythoncommandnotfound": "nrgpio python コマンドが実行されていません"
|
||||
}
|
||||
|
@ -65,8 +65,8 @@
|
||||
"invalidinput": "입력이 올바르지 않습니다",
|
||||
"needtobeexecutable": "__command__ 은 실행가능상태일 필요가 있습니다 ",
|
||||
"mustbeexecutable": "nrgpio 은 실행가능상태일 필요가 있습니다 ",
|
||||
"commandnotfound": "nrgpio 커맨드를 찾을수 없습니다",
|
||||
"commandnotexecutable": "nrgpio 커맨드가 실행가능상태가 아닙니다",
|
||||
"commandnotfound": "nrgpio 커맨드를 찾을수 없습니다 ",
|
||||
"commandnotexecutable": "nrgpio 커맨드가 실행가능상태가 아닙니다 ",
|
||||
"error": "에러: __error__",
|
||||
"pythoncommandnotfound": "nrgpio python 커맨드가 실행되지 않았습니다"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-node-pi-gpio",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"description": "The basic Node-RED node for Pi GPIO",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
BIN
hardware/mcp3008/.DS_Store
vendored
BIN
hardware/mcp3008/.DS_Store
vendored
Binary file not shown.
@ -16,7 +16,7 @@ Run the following command in your Node-RED user directory - typically `~/.node-r
|
||||
|
||||
The output node switches a socket, a light or group of lights on or off
|
||||
|
||||
This should be backward compatible with the pervious version of this node but will benefit
|
||||
This should be backward compatible with the previous version of this node but will benefit
|
||||
from opening the config dialog and selecting the node you want.
|
||||
|
||||
The node accepts the following `msg.payload` as input
|
||||
|
@ -9,6 +9,9 @@ fetch values from SNMP enabled hosts. Supports v1, v2c and v3.
|
||||
* SNMP table - Simple SNMP oid table fetcher
|
||||
* SNMP walker - Simple SNMP oid walker fetcher
|
||||
|
||||
## v2 Breaking Change
|
||||
v2 has a breaking change in that the single snmp node no longer tries to stringify an octet string type (04). This makes it consistent with the other nodes in this bundle. this means the user now has to convert to a string if required but has better control of how they wish to do that.
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-snmp",
|
||||
"version" : "1.0.6",
|
||||
"version" : "2.0.0",
|
||||
"description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3",
|
||||
"dependencies" : {
|
||||
"net-snmp" : "^3.8.2"
|
||||
"net-snmp" : "^3.9.0"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
@ -253,9 +253,9 @@ module.exports = function (RED) {
|
||||
node.error(SNMP.varbindError(vb), msg);
|
||||
vb._error = SNMP.varbindError(vb); //add _error to msg so users can determine the varbind is not valid
|
||||
}
|
||||
else {
|
||||
if (vb.type == 4) { vb.value = vb.value.toString(); }
|
||||
}
|
||||
// else {
|
||||
// if (vb.type == 4) { vb.value = vb.value.toString(); }
|
||||
// }
|
||||
vb.tstr = SNMP.ObjectType[vb.type];
|
||||
}
|
||||
msg.payload = varbinds;
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "node-red-node-email",
|
||||
"version": "1.19.0-beta+xoauth2",
|
||||
"version": "1.19.0",
|
||||
"description": "Node-RED nodes to send and receive simple emails.",
|
||||
"dependencies": {
|
||||
"imap": "^0.8.19",
|
||||
"node-pop3": "^0.8.0",
|
||||
"mailparser": "~3.5.0",
|
||||
"nodemailer": "^6.8.0",
|
||||
"nodemailer": "^6.9.1",
|
||||
"smtp-server": "^3.11.0"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
|
@ -1,44 +1,44 @@
|
||||
|
||||
<script type="text/html" data-template-name="sunrise">
|
||||
<div class="form-row">
|
||||
<label for="node-input-lat"><i class="fa fa-globe"></i> Latitude</label>
|
||||
<input type="text" id="node-input-lat" placeholder="51.025">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-lon"><i class="fa fa-globe"></i> Longitude</label>
|
||||
<input type="text" id="node-input-lon" placeholder="-1.4">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-start"><i class="fa fa-clock-o"></i> Start</label>
|
||||
<select id="node-input-start" style='width:70%'>
|
||||
<option value="nightEnd">Morning astronomical twilight starts</option>
|
||||
<option value="nauticalDawn">Morning nautical twilight starts</option>
|
||||
<option value="dawn">Dawn, morning civil twilight starts</option>
|
||||
<option value="sunrise">Sunrise</option>
|
||||
<option value="sunriseEnd">Sunrise end</option>
|
||||
<option value="goldenHourEnd">End of morning golden hour</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-end"><i class="fa fa-clock-o"></i> End</label>
|
||||
<select id="node-input-end" style='width:70%'>
|
||||
<option value="goldenHour">Start of evening golden hour</option>
|
||||
<option value="sunsetStart">Sunset start</option>
|
||||
<option value="sunset">Sunset, civil twilight starts</option>
|
||||
<option value="dusk">Dusk, Evening astronomical twilight starts</option>
|
||||
<option value="nauticalDusk">Evening nautical twilight starts</option>
|
||||
<option value="night">Dark enough for astronomy</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label><i class="fa fa-arrows-h"></i> Offset</label>
|
||||
<span style="margin-right:4px">start</span> <input type="text" id="node-input-soff" placeholder="minutes" style='width:60px;'> mins
|
||||
<span style="margin-left:14px; margin-right:4px">end</span> <input type="text" id="node-input-eoff" placeholder="minutes" style='width:60px;'> mins
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-lat"><i class="fa fa-globe"></i><span data-i18n="sunrise.label.latitude"></span></label>
|
||||
<input type="text" id="node-input-lat" placeholder="51.025">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-lon"><i class="fa fa-globe"></i><span data-i18n="sunrise.label.longitude"></span></label>
|
||||
<input type="text" id="node-input-lon" placeholder="-1.4">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-start"><i class="fa fa-clock-o"></i><span data-i18n="sunrise.label.start"></label>
|
||||
<select id="node-input-start" style='width:70%'>
|
||||
<option value="nightEnd" data-i18n="sunrise.nightEnd"></option>
|
||||
<option value="nauticalDawn" data-i18n="sunrise.nauticalDawn"></option>
|
||||
<option value="dawn" data-i18n="sunrise.dawn"></option>
|
||||
<option value="sunrise" data-i18n="sunrise.sunrise"></option>
|
||||
<option value="sunriseEnd" data-i18n="sunrise.sunriseEnd"></option>
|
||||
<option value="goldenHourEnd" data-i18n="sunrise.goldenHourEnd"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-end"><i class="fa fa-clock-o"></i><span data-i18n="sunrise.label.end"></label>
|
||||
<select id="node-input-end" style='width:70%'>
|
||||
<option value="goldenHour" data-i18n="sunrise.goldenHour"></option>
|
||||
<option value="sunsetStart" data-i18n="sunrise.sunsetStart"></option>
|
||||
<option value="sunset" data-i18n="sunrise.sunset"></option>
|
||||
<option value="dusk" data-i18n="sunrise.dusk"></option>
|
||||
<option value="nauticalDusk" data-i18n="sunrise.nauticalDusk"></option>
|
||||
<option value="night" data-i18n="sunrise.night"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label><i class="fa fa-arrows-h"></i><span data-i18n="sunrise.label.offset"></label>
|
||||
<span style="margin-right:4px" data-i18n="sunrise.start"></span> <input type="text" id="node-input-soff" placeholder="minutes" style='width:60px;' > <span data-i18n="sunrise.mins"></span>
|
||||
<span style="margin-left:14px; margin-right:4px" data-i18n="sunrise.end"></span> <input type="text" id="node-input-eoff" placeholder="minutes" style='width:60px;'><span data-i18n="sunrise.mins"></span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i><span data-i18n="sunrise.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]sunrise.label.name">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -56,10 +56,15 @@
|
||||
},
|
||||
inputs:0,
|
||||
outputs:2,
|
||||
outputLabels: ["once per minute","only on change"],
|
||||
outputLabels: function(i) {
|
||||
return [
|
||||
this._("sunrise.onePerMin"),
|
||||
this._("sunrise.onse")
|
||||
][i];
|
||||
},
|
||||
icon: "sun.png",
|
||||
label: function() {
|
||||
return this.name||"Sun rise/set";
|
||||
return this.name||this._("sunrise.sunName");
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
|
@ -49,8 +49,8 @@ module.exports = function(RED) {
|
||||
var msg = {payload:0, topic:"sun", sun:sun, moon:moon, start:s1, end:s2, now:now};
|
||||
if ((e1 > 0) & (e2 < 0)) { msg.payload = 1; }
|
||||
if (oldval == null) { oldval = msg.payload; }
|
||||
if (msg.payload == 1) { node.status({fill:"yellow",shape:"dot",text:"day"}); }
|
||||
else { node.status({fill:"blue",shape:"dot",text:"night"}); }
|
||||
if (msg.payload == 1) { node.status({fill:"yellow",shape:"dot",text:"sunrise.dayState"}); }
|
||||
else { node.status({fill:"blue",shape:"dot",text:"sunrise.nightState"}); }
|
||||
if (msg.payload != oldval) {
|
||||
oldval = msg.payload;
|
||||
node.send([msg,msg]);
|
||||
|
32
time/suncalc/locales/en-US/79-suncalc.json
Normal file
32
time/suncalc/locales/en-US/79-suncalc.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"sunrise": {
|
||||
"label": {
|
||||
"latitude": " Latitude",
|
||||
"longitude": " Longitude",
|
||||
"start": " Start",
|
||||
"end": " End",
|
||||
"offset": " Offset",
|
||||
"name": " Name"
|
||||
},
|
||||
"nightEnd": "Morning astronomical twilight starts",
|
||||
"nauticalDawn": "Morning nautical twilight starts",
|
||||
"dawn": "Dawn, morning civil twilight starts",
|
||||
"sunrise": "Sunrise",
|
||||
"sunriseEnd": "Sunrise end",
|
||||
"goldenHourEnd": "End of morning golden hour",
|
||||
"goldenHour": "Start of evening golden hour",
|
||||
"sunsetStart": "Sunset start",
|
||||
"sunset": "Sunset, civil twilight starts",
|
||||
"dusk": "Dusk, Evening astronomical twilight starts",
|
||||
"nauticalDusk": "Evening nautical twilight starts",
|
||||
"night": "Dark enough for astronomy",
|
||||
"start": " start",
|
||||
"mins": " mins",
|
||||
"end": " end",
|
||||
"dayState": "day",
|
||||
"nightState": "night",
|
||||
"onePerMin": "once per minute",
|
||||
"onse": "only on change",
|
||||
"sunName": "Sun rise/set"
|
||||
}
|
||||
}
|
11
time/suncalc/locales/ru/79-suncalc.html
Normal file
11
time/suncalc/locales/ru/79-suncalc.html
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
<script type="text/html" data-help-name="sunrise">
|
||||
<p>Использует модуль suncalc для вывода данных о восходе и закате солнца в зависимости от указанного местоположения.</p>
|
||||
<p>Доступно несколько вариантов определения восхода и захода солнца, подробности смотрите в модуле <i><a href = "https://github.com/mourner/suncalc" target="_new">suncalc</a></i>.</p>
|
||||
<p> Время начала и окончания может быть смещено на несколько минут до (минус) или после (плюс) выбранного события.</p>
|
||||
<p>Первый выход отправляет каждую минуту <code>msg.payload</code> <i>1</i> или <i>0</i> в зависимости от того, находится ли он между выбранными событиями или нет.
|
||||
Второй выход отправляет только при переходе от ночи к дню (<i>-> 1</i>) или от дня к ночи (<i>-> 0</i>).</p>
|
||||
<p>Так же выводит <code>msg.start</code>, <code>msg.end</code> и <code>msg.now</code> в формате ISO. Которые содержат время начала, окончания события на сегоднящний день с поправкой на указанное смещение, а так же текущее время.</p>
|
||||
<p><code>msg.sun</code> — это содержит азимут и высоту в градусах текущего положения солнца.</p>
|
||||
<p><code>msg.moon</code> — это содержит <thead></thead> положение, фазу, освещение и значок луны.</p>
|
||||
</script>
|
33
time/suncalc/locales/ru/79-suncalc.json
Normal file
33
time/suncalc/locales/ru/79-suncalc.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"sunrise": {
|
||||
"label": {
|
||||
"latitude": " Широта",
|
||||
"longitude": " Долгота",
|
||||
"start": " Начало",
|
||||
"end": " Окончание",
|
||||
"offset": " Смещение",
|
||||
"name": " Имя"
|
||||
},
|
||||
"nightEnd": "Утренние астрономические сумерки",
|
||||
"nauticalDawn": "Утренние навигационные сумерки",
|
||||
"dawn": "Рассвет, утренние гражданские сумерки",
|
||||
"sunrise": "Восход",
|
||||
"sunriseEnd": "Восход закончился",
|
||||
"goldenHourEnd": "Окончание утреннего золотого часа",
|
||||
"goldenHour": "Начало вечернего золотого часа",
|
||||
"sunsetStart": "Начало заката",
|
||||
"sunset": "Закат, начинаются вечерние гражданские сумерки",
|
||||
"dusk": "Смеркается, начинаются вечерние астрономические сумерки",
|
||||
"nauticalDusk": "Начинаются вечерние морские сумерки",
|
||||
"night": "Достаточно темно для астрономии",
|
||||
"start": " начало",
|
||||
"mins": " мин",
|
||||
"end": " конец",
|
||||
"dayState": "день",
|
||||
"nightState": "ночь",
|
||||
"onePerMin": "раз в минуту",
|
||||
"onse": "по событию",
|
||||
"sunName": "Рассвет/закат"
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user