178 lines
4.8 KiB
HTML
178 lines
4.8 KiB
HTML
<!-- The Read Node -->
|
|
<script type="text/x-red" data-template-name="xiaomi-actions read">
|
|
<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>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="xiaomi-actions read">
|
|
<p>Ask the gateway to read the report of the input device.</p>
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>sid
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>Device <code>sid</code> to ask the report.</dd>
|
|
</dl>
|
|
|
|
<h3>Outputs</h3>
|
|
<p class="node-ports">
|
|
Message to connect to a gateway out node.
|
|
</p>
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType('xiaomi-actions read',{
|
|
category: 'xiaomi actions',
|
|
color: '#64C4CD',
|
|
defaults: {
|
|
name: {value:""}
|
|
},
|
|
inputs:1,
|
|
outputs:1,
|
|
paletteLabel: "read",
|
|
icon: "function.png",
|
|
label: function() {
|
|
return this.name||"read";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
<!-- The get ids Node -->
|
|
<script type="text/x-red" data-template-name="xiaomi-actions get_id_list">
|
|
<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>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="xiaomi-actions get_id_list">
|
|
<p>Ask the gateway to the list of devices ids.</p>
|
|
|
|
<h3>Outputs</h3>
|
|
<p class="node-ports">
|
|
Message to connect to a gateway out node.
|
|
</p>
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType('xiaomi-actions get_id_list',{
|
|
category: 'xiaomi actions',
|
|
color: '#64C4CD',
|
|
defaults: {
|
|
name: {value:""}
|
|
},
|
|
inputs:1,
|
|
outputs:1,
|
|
paletteLabel: "get id list",
|
|
icon: "function.png",
|
|
label: function() {
|
|
return this.name||"get id list";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
<!-- The Single click Node -->
|
|
<script type="text/x-red" data-template-name="xiaomi-actions click">
|
|
<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>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="xiaomi-actions click">
|
|
<p>
|
|
Virtual single click for switch.
|
|
Note: a gateway input node must be present to get gateway tokens.
|
|
</p>
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>sid
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>Device <code>sid</code> to ask the report.</dd>
|
|
<dt>gateway
|
|
<span class="property-type">xiaomi-configurator</span>
|
|
</dt>
|
|
<dd>Device <code>sid</code> to ask the report.</dd>
|
|
</dl>
|
|
|
|
<h3>Outputs</h3>
|
|
<p class="node-ports">
|
|
Message to connect to a gateway out node.
|
|
</p>
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType('xiaomi-actions click',{
|
|
category: 'xiaomi actions',
|
|
color: '#64C4CD',
|
|
defaults: {
|
|
name: {value:""}
|
|
},
|
|
inputs:1,
|
|
outputs:1,
|
|
paletteLabel: "click",
|
|
icon: "function.png",
|
|
label: function() {
|
|
return this.name||"click";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
<!-- The Double click Node -->
|
|
<script type="text/x-red" data-template-name="xiaomi-actions double_click">
|
|
<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>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="xiaomi-actions double_click">
|
|
<p>
|
|
Virtual double click for switch.
|
|
Note: a gateway input node must be present to get gateway tokens.
|
|
</p>
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>sid
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>Device <code>sid</code> to ask the report.</dd>
|
|
<dt>gateway
|
|
<span class="property-type">xiaomi-configurator</span>
|
|
</dt>
|
|
<dd>Device <code>sid</code> to ask the report.</dd>
|
|
</dl>
|
|
|
|
<h3>Outputs</h3>
|
|
<p class="node-ports">
|
|
Message to connect to a gateway out node.
|
|
</p>
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
RED.nodes.registerType('xiaomi-actions double_click',{
|
|
category: 'xiaomi actions',
|
|
color: '#64C4CD',
|
|
defaults: {
|
|
name: {value:""}
|
|
},
|
|
inputs:1,
|
|
outputs:1,
|
|
paletteLabel: "double click",
|
|
icon: "function.png",
|
|
label: function() {
|
|
return this.name||"double click";
|
|
}
|
|
});
|
|
</script>
|