smithtek-nodered-lora-aes
Version:
AES security for the PassPort LoRa Module
44 lines (41 loc) • 2.03 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('smithtek-nodered-lora-aes', {
category: 'smithtek',
color: '#B9B6B8',
defaults: {
name: { value: "" },
},
inputs: 1,
outputs: 2,
icon: "smithtek.png",
label: function () {
return this.name || "smithtek-nodered-lora-aes";
},
oneditprepare: function () {
// No specific preparation needed
}
});
</script>
<script type="text/x-red" data-template-name="smithtek-nodered-lora-aes">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<p>This node generates the magic key for the embedded LoRa module. It uses 128-bit AES encryption and requires a secret 8-digit key. Once the key has been uploaded to the LoRa module, you can safely delete this node from the Node-RED flow editor.</p>
<p>Inject a string in <strong>msg.payload</strong> property:</p>
<ul>
<li>Use <strong>"enable"</strong> to activate AES encryption</li>
<li>Use <strong>"disable"</strong> to deactivate AES encryption</li>
</ul>
<p>Inject the magic key using <strong>msg.key</strong> property:</p>
<ul>
<li>Provide a string with a maximum of 8 digits</li>
<li>If the key is too long, it will output on <strong>Output 2</strong>: <strong>Error: Key is too long</strong></li>
<li>If the key is too short, it will output on <strong>Output 2</strong>: <strong>Error: Key is too short</strong></li>
</ul>
<p>Output 1 will output the generated hex command for enable/disable.</p>
<p>Output 2 will output the generated magic key hex or key length error message.</p>
</script>
<script type="text/x-red" data-help-name="smithtek-nodered-lora-aes">
<p>This node allows you to control AES encryption for LoRa communication.</p>
</script>