2014-05-18 23:10:00 +02:00
|
|
|
|
2014-05-19 11:08:15 +02:00
|
|
|
<script type="text/x-red" data-template-name="pusher in">
|
2014-05-18 23:10:00 +02:00
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-channel"><i class="fa fa-random"></i> Channel</label>
|
2023-02-02 11:57:05 +01:00
|
|
|
<input type="text" id="node-input-channel" placeholder="Channel">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-eventname"><i class="fa fa-tasks"></i> Event</label>
|
2023-02-02 11:57:05 +01:00
|
|
|
<input type="text" id="node-input-eventname" placeholder="Event Name">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2017-08-27 15:00:20 +02:00
|
|
|
<label for="node-input-pusherappkeysub"><i class="fa fa-lock"></i> App Key</label>
|
|
|
|
<input type="text" id="node-input-pusherappkeysub" placeholder="key">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-cluster"><i class="fa fa-server"></i> Cluster</label>
|
|
|
|
<select type="text" id="node-input-cluster">
|
2023-02-02 11:57:05 +01:00
|
|
|
<option value="mt1">N. Virginia (US - default)</option>
|
|
|
|
<option value="us2">Ohio (US)</option>
|
|
|
|
<option value="us3">Oregon (US)</option>
|
|
|
|
<option value="eu">Ireland (Europe)</option>
|
|
|
|
<option value="ap1">Singapore (Asia)</option>
|
|
|
|
<option value="ap2">Mumbai (India)</option>
|
|
|
|
<option value="ap3">Tokyo (Asia)</option>
|
|
|
|
<option value="ap4">Sydney (Australia)</option>
|
|
|
|
<option value="sa1">São Paulo (Brazil)</option>
|
2017-08-27 15:00:20 +02:00
|
|
|
</select>
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
<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-05-18 23:10:00 +02:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
2014-05-19 11:08:15 +02:00
|
|
|
<script type="text/x-red" data-help-name="pusher in">
|
2015-04-24 22:17:02 +02:00
|
|
|
<p>Pusher input mode. Use this node to subscribe to a Pusher channel/event.</p>
|
|
|
|
<p>You need a valid Pusher App key.</p>
|
2014-05-18 23:10:00 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2014-05-19 11:08:15 +02:00
|
|
|
RED.nodes.registerType('pusher in',{
|
2015-09-16 23:38:38 +02:00
|
|
|
category: 'mobile-input',
|
2014-05-18 23:10:00 +02:00
|
|
|
color:"#A9D0F5",
|
2015-04-24 22:17:02 +02:00
|
|
|
defaults: {
|
|
|
|
name: {value:""},
|
2014-05-18 23:10:00 +02:00
|
|
|
channel: {value:"", required:true},
|
2017-08-27 15:00:20 +02:00
|
|
|
cluster: {value:"mt1"},
|
2014-05-18 23:10:00 +02:00
|
|
|
eventname: {value:"", required:true}
|
|
|
|
},
|
2015-02-06 22:10:14 +01:00
|
|
|
credentials: {
|
2017-08-27 15:00:20 +02:00
|
|
|
pusherappkeysub: {type:"text"}
|
2015-02-06 22:10:14 +01:00
|
|
|
},
|
2015-04-24 22:17:02 +02:00
|
|
|
inputs:0,
|
|
|
|
outputs:1,
|
|
|
|
icon: "pusher.png",
|
|
|
|
label: function() {
|
2014-05-24 17:38:35 +02:00
|
|
|
return this.name||"pusher";
|
2014-05-18 23:10:00 +02:00
|
|
|
},
|
2015-04-24 22:17:02 +02:00
|
|
|
labelStyle: function() {
|
2014-05-18 23:10:00 +02:00
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2015-04-24 22:17:02 +02:00
|
|
|
|
2014-05-19 11:08:15 +02:00
|
|
|
<script type="text/x-red" data-template-name="pusher out">
|
2014-05-18 23:10:00 +02:00
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-channel"><i class="fa fa-random"></i> Channel</label>
|
2014-05-24 19:29:27 +02:00
|
|
|
<input type="text" id="node-input-channel" placeholder="my_channel">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-eventname"><i class="fa fa-tasks"></i> Event</label>
|
2014-05-24 19:29:27 +02:00
|
|
|
<input type="text" id="node-input-eventname" placeholder="test_event_name">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row">
|
2017-08-27 15:00:20 +02:00
|
|
|
<label for="node-input-pusherappid"><i class="fa fa-tag"></i> App ID</label>
|
2015-02-06 22:10:14 +01:00
|
|
|
<input type="text" id="node-input-pusherappid" placeholder="app_id">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row">
|
2017-08-27 15:00:20 +02:00
|
|
|
<label for="node-input-pusherappkey"><i class="fa fa-lock"></i> App Key</label>
|
2015-02-06 22:10:14 +01:00
|
|
|
<input type="text" id="node-input-pusherappkey" placeholder="key">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row">
|
2017-08-27 15:00:20 +02:00
|
|
|
<label for="node-input-pusherappsecret"><i class="fa fa-asterisk"></i> App Secret</label>
|
2015-02-06 22:10:14 +01:00
|
|
|
<input type="password" id="node-input-pusherappsecret" placeholder="secret">
|
2014-05-18 23:10:00 +02:00
|
|
|
</div>
|
|
|
|
|
2017-08-27 15:00:20 +02:00
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-cluster"><i class="fa fa-server"></i> Cluster</label>
|
|
|
|
<select type="text" id="node-input-cluster">
|
2023-02-02 11:57:05 +01:00
|
|
|
<option value="mt1">N. Virginia (US - default)</option>
|
|
|
|
<option value="us2">Ohio (US)</option>
|
|
|
|
<option value="us3">Oregon (US)</option>
|
|
|
|
<option value="eu">Ireland (Europe)</option>
|
|
|
|
<option value="ap1">Singapore (Asia)</option>
|
|
|
|
<option value="ap2">Mumbai (India)</option>
|
|
|
|
<option value="ap3">Tokyo (Asia)</option>
|
|
|
|
<option value="ap4">Sydney (Australia)</option>
|
|
|
|
<option value="sa1">São Paulo (Brazil)</option>
|
2017-08-27 15:00:20 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2014-05-18 23:10:00 +02:00
|
|
|
<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-05-18 23:10:00 +02:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
2014-05-19 11:08:15 +02:00
|
|
|
<script type="text/x-red" data-help-name="pusher out">
|
2015-04-24 22:17:02 +02:00
|
|
|
<p>Pusher output node for sending messages to a specific channel/event.</p>
|
|
|
|
<p>You need an App key, secret and ID of a Pusher app.</p>
|
2016-03-02 14:26:53 +01:00
|
|
|
<p>The node will send the <code>msg.payload</code> of the incoming message.</p>
|
|
|
|
<p>If you leave the eventname blank you can set it using <code>msg.topic</code>.</p>
|
2014-05-18 23:10:00 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2014-05-19 11:08:15 +02:00
|
|
|
RED.nodes.registerType('pusher out',{
|
2015-09-16 23:38:38 +02:00
|
|
|
category: 'mobile-output',
|
2014-05-18 23:10:00 +02:00
|
|
|
color:"#A9D0F5",
|
2015-04-24 22:17:02 +02:00
|
|
|
defaults: {
|
|
|
|
name: {value:""},
|
2014-05-18 23:10:00 +02:00
|
|
|
channel: {value:"", required:true},
|
2017-08-27 15:00:20 +02:00
|
|
|
cluster: {value:"mt1"},
|
2015-04-24 22:17:02 +02:00
|
|
|
eventname: {value:""}
|
2014-05-18 23:10:00 +02:00
|
|
|
},
|
2015-02-06 22:10:14 +01:00
|
|
|
credentials: {
|
|
|
|
pusherappid: {type:"text"},
|
|
|
|
pusherappkey: {type:"text"},
|
|
|
|
pusherappsecret: {type:"password"}
|
|
|
|
},
|
2015-04-24 22:17:02 +02:00
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "pusher.png",
|
2014-05-18 23:10:00 +02:00
|
|
|
align: "right",
|
2015-04-24 22:17:02 +02:00
|
|
|
label: function() {
|
2014-05-24 17:38:35 +02:00
|
|
|
return this.name||"pusher";
|
2014-05-18 23:10:00 +02:00
|
|
|
},
|
2015-04-24 22:17:02 +02:00
|
|
|
labelStyle: function() {
|
2014-05-18 23:10:00 +02:00
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|