@fw-systeme/node-red-msl
Version:
A node-red module to simplify the access of msl4 channel data.
40 lines (38 loc) • 1.86 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('msl4-in',{
category: 'MSL4',
color: 'lightgreen',
defaults: {
name: {value: ""},
mslChannel: {value:"", type:"msl-channel-config"},
channels: {value: ""}
},
inputs:1,
outputs:1,
icon: "fw-logo.png",
label: function() {
if(this.name) return this.name;
else if (this.channels) return this.channels.flatMap(channel => channel.channelname).join();
else return "MSL4-In"
}
});
</script>
<script type="text/html" data-template-name="msl4-in">
<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-mslChannel"><i class="fa fa-tag"></i> MSL-Kanal</label>
<input type="text" id="node-input-mslChannel">
</div>
</script>
<script type="text/x-red" data-help-name="msl4-in">
<h3>MSL4 In</h3>
<p>Node zur Lesung des Wertes eines Eingangskanal vom MSL4.</p>
<p>Um diesem Node ein Kanal des MSL zuzuordnen, erstellen Sie über das MSL-Kanal Auswahlfeld ein Kanalkonfigurationsnode und wählen bei dessen Konfiguration einen Kanal aus.
<b>Für jede weitere Kanalzuordnung muss ein neues Konfigurationsnode üder die Option `Neuen Typ msl-channel-config hinzufügen` erstellt werden.</b> Diese Konfigurationsnodes sind global
und für alle anderen Nodes verfügbar.
Sobald dieses Node beliebiges Eingangssignal erhält, sendet es die Daten des zugeordneten Kanals.
Die Ausgabe enthält folgende Felder: <u>msg, unit, min, max, limesmin, limesmax, devicename, alerttime, channelname, value, channelid, status</u></p>
</script>