node-red-contrib-injectable-sensortag
Version:
74 lines (71 loc) • 3.87 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('InjectableSensorTag',{
category: 'IoT',
color: '#F3B567',
defaults: {
name: {value: "SensorTag"},
delay: {value: 1000},
devname: {value: false},
systemid: {value: true},
serial: {value: false},
firmrev: {value: false},
hardrev: {value: false},
softrev: {value: false},
manufac: {value: false},
battery: {value: false},
temperature: {value: true},
humidity: {value: true},
pressure: {value: true},
luxometer: {value: false},
topic: {value: true}
},
inputs:1,
outputs:1,
icon: "bluetooth.png",
label: function() {
return this.name||"SensorTag";
}
});
</script>
<script type="text/x-red" data-template-name="InjectableSensorTag">
<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"><br/>
<label for="node-input-delay"><i class="icon-tag"></i> Delay</label>
<input type="text" id="node-input-delay" placeholder="Delay"><br/>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-external-link"></i> Device Info</label>
<input type="checkbox" id="node-input-systemid" style="display:inline-block; width:auto; vertical-align:top;"> System ID<br/>
<label> </label>
<input type="checkbox" id="node-input-serial" style="display:inline-block; width:auto; vertical-align:top;"> Serial Number<br/>
<label> </label>
<input type="checkbox" id="node-input-firmrev" style="display:inline-block; width:auto; vertical-align:top;"> Firmware Revision<br/>
<label> </label>
<input type="checkbox" id="node-input-hardrev" style="display:inline-block; width:auto; vertical-align:top;"> Hardware Revision<br/>
<label> </label>
<input type="checkbox" id="node-input-softrev" style="display:inline-block; width:auto; vertical-align:top;"> Software Revision<br/>
<label> </label>
<input type="checkbox" id="node-input-battery" style="display:inline-block; width:auto; vertical-align:top;"> Battery<br/>
<label> </label>
<input type="checkbox" id="node-input-manufac" style="display:inline-block; width:auto; vertical-align:top;"> Manufacture Name<br/>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-external-link"></i> Sensors</label>
<input type="checkbox" id="node-input-humidity" style="display:inline-block; width:auto; vertical-align:top;"> Temperature and Humidity<br/>
<label> </label>
<input type="checkbox" id="node-input-temperature" style="display:inline-block; width:auto; vertical-align:top;"> IR Temperature<br/>
<label> </label>
<input type="checkbox" id="node-input-pressure" style="display:inline-block; width:auto; vertical-align:top;"> Pressure<br/>
<label> </label>
<input type="checkbox" id="node-input-luxometer" style="display:inline-block; width:auto; vertical-align:top;"> Luminosity (CC2650 only)<br/>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-external-link"></i> Option</label>
<input type="checkbox" id="node-input-topic" style="display:inline-block; width:auto; vertical-align:top;"> Set topic as System ID<br/>
</div>
</script>
<script type="text/x-red" data-help-name="InjectableSensorTag">
<p>A injectable SensorTag</p>
<p>require node version 4.0 or later</p>
</script>