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>
|
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">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-appkey_sub"><i class="fa fa-lock"></i> App Key</label>
|
2015-02-06 22:10:14 +01:00
|
|
|
<input type="text" id="node-input-pusherappkey_sub" placeholder="key">
|
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},
|
|
|
|
eventname: {value:"", required:true}
|
|
|
|
},
|
2015-02-06 22:10:14 +01:00
|
|
|
credentials: {
|
|
|
|
pusherappkey_sub: "text"
|
|
|
|
},
|
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">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-appid"><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">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-appkey"><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">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-topic"><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>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2015-04-24 22:17:02 +02:00
|
|
|
|
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},
|
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>
|