2014-06-29 00:36:36 +02:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="dweetio out">
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-thing"><i class="fa fa-flag"></i> Thing</label>
|
2014-06-29 00:36:36 +02:00
|
|
|
<input type="text" id="node-input-thing" placeholder="my-globally-unique-device-id">
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2014-06-29 00:36:36 +02:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="dweetio out">
|
2016-02-12 15:05:10 +01:00
|
|
|
<p>Sends the <code>msg.payload</code> to Dweet.io</p>
|
|
|
|
<p>Optionally uses <code>msg.thing</code> to set the thing id, if not already set in the properties.</p>
|
2014-06-29 00:36:36 +02:00
|
|
|
<p>You need to make the thing id unique - you are recommended to use a GUID.<p>
|
2017-06-13 01:11:30 +02:00
|
|
|
<p>For further info see the <a href="https://dweet.io/" target="_new">Dweet.io website</a>.</p>
|
2014-06-29 00:36:36 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('dweetio out',{
|
|
|
|
category: 'output',
|
|
|
|
defaults: {
|
|
|
|
thing: {value:""},
|
|
|
|
name: {value:""}
|
|
|
|
},
|
|
|
|
color:"#d7c9a0",
|
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "arrow.png",
|
|
|
|
align: "right",
|
|
|
|
label: function() {
|
|
|
|
return this.name||this.title||"dweetio";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="dweetio in">
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-thing"><i class="fa fa-flag"></i> Thing</label>
|
2014-06-29 00:36:36 +02:00
|
|
|
<input type="text" id="node-input-thing" placeholder="my-globally-unique-device-id">
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2014-06-29 00:36:36 +02:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="dweetio in">
|
|
|
|
<p>Listens for messages from Dweet.io</p>
|
|
|
|
<p>The thing id should be globally unique as they are all public - you are recommended to use a GUID.<p>
|
2016-02-12 15:05:10 +01:00
|
|
|
<p>The Thing ID is set into <code>msg.dweet</code>, and the timesamp into <code>msg.created</code>.</p>
|
2017-06-13 01:11:30 +02:00
|
|
|
<p>For further info see the <a href="https://dweet.io/" target="_new">Dweet.io website</a>.</p>
|
2014-06-29 00:36:36 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('dweetio in',{
|
|
|
|
category: 'input',
|
|
|
|
defaults: {
|
|
|
|
thing: {value:""},
|
|
|
|
name: {value:""}
|
|
|
|
},
|
|
|
|
color:"#d7c9a0",
|
|
|
|
inputs:0,
|
|
|
|
outputs:1,
|
|
|
|
icon: "arrow.png",
|
|
|
|
label: function() {
|
|
|
|
return this.name||this.title||"dweetio";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|