2013-10-26 17:44:23 +02:00
|
|
|
<!--
|
|
|
|
Copyright 2013 IBM Corp.
|
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="wake on lan">
|
|
|
|
<div class="form-row">
|
2014-07-27 19:05:23 +02:00
|
|
|
<label for="node-input-mac"><i class="fa fa-globe"></i> MAC Address</label>
|
2014-08-19 12:41:29 +02:00
|
|
|
<input type="text" id="node-input-mac" placeholder="e.g. DE:AD:BE:EF:FE:ED">
|
2013-10-26 17:44:23 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2014-07-27 19:05:23 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2013-10-26 17:44:23 +02:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
2016-03-02 14:26:19 +01:00
|
|
|
<div class="form-tips">Tip: leave blank if you want to use <code>msg.mac</code> to dynamically set target mac address.</div>
|
2013-10-26 17:44:23 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="wake on lan">
|
|
|
|
<p>Sends a Wake-On-LAN magic packet to the mac address specified.</p>
|
2016-03-02 14:26:19 +01:00
|
|
|
<p>You may instead set <code>msg.mac</code> to dynamically set the target device mac to wake up.</p>
|
2013-10-26 17:44:23 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('wake on lan',{
|
2015-03-04 20:57:22 +01:00
|
|
|
category: 'network-output',
|
2013-10-26 17:44:23 +02:00
|
|
|
color:"#999966",
|
|
|
|
defaults: {
|
|
|
|
mac: {value:""},
|
|
|
|
name: {value:""}
|
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "light.png",
|
|
|
|
align: "right",
|
|
|
|
label: function() {
|
2014-08-19 12:41:29 +02:00
|
|
|
return this.name ? this.name : (this.mac ? "WOL: "+this.mac : "Wake on Lan") ;
|
2013-10-26 17:44:23 +02:00
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|