@marcel-domke/node-red-contrib-reolink
Version:
A unofficial Node-RED node for receiving real-time data and controlling your Reolink camera.
68 lines (58 loc) • 2.6 kB
HTML
<!--
Copyright 2024 Marcel Domke
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Node Definition -->
<script type="text/javascript">
RED.nodes.registerType('reolink-alarm', {
category: 'Reolink',
color: '#ff5454',
defaults: {
name: { value: "" },
server: { value: "", type: "reolink-device", required: true }
},
inputs: 1,
outputs: 0,
icon: "font-awesome/fa-bell",
label: function () {
return this.name || "Reolink Alarm";
},
paletteLabel: function () {
return "Alarm";
}
});
</script>
<!-- Edit Template -->
<script type="text/html" data-template-name="reolink-alarm">
<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="Node name">
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-wrench"></i> Device</label>
<select id="node-input-server"></select>
</div>
</script>
<!-- Help Text -->
<script type="text/html" data-help-name="reolink-alarm">
<p>The <b>Reolink Alarm</b> node allows you to trigger an audio alarm on a Reolink device.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload</dt>
<dd>A number value indicating the number of times to play the alarm sound:</dd>
<ul>
<li><code>1-9</code>: The alarm sound will play the specified number of times.</li>
</ul>
</dl>
<p>When an input message with an integer payload (between 1 and 9) is received, the node will send a command to the Reolink device to play the alarm sound that many times. The number represents the repeat times for the alarm sound.</p>
<h3>Details</h3>
<p>This node sends a command to the Reolink device to trigger an audio alarm. It can be controlled by providing an integer payload between 1 and 9, where the number indicates how many times the alarm should play.</p>
</script>