-
Notifications
You must be signed in to change notification settings - Fork 24
/
azureiothub.html
169 lines (158 loc) · 5.69 KB
/
azureiothub.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<script type="text/javascript">
RED.nodes.registerType('azureiothub',{
category: 'cloud',
color: '#00abec',
defaults: {
name: {value:"Azure IoT Hub"},
protocol: {value:"amqp"}
},
inputs:1,
outputs:1,
icon: "azureiothub.png",
label: function() {
return this.name||"Azure IoT Hub";
},
paletteLabel: function(){
return "Azure IoT Hub";
},
credentials: {
hostname: {type:"text"}
}
});
RED.nodes.registerType('azureiothubregistry',{
category: 'cloud',
color: '#00abec',
defaults: {
name: {value:"Azure IoT Hub Registry"}
},
inputs:1,
outputs:1,
icon: "azureiothub.png",
label: function() {
return this.name||"Azure IoT Hub Registry";
},
paletteLabel: function(){
return "Azure IoT Hub Registry";
},
credentials: {
connectionString: {type:"text"}
}
});
RED.nodes.registerType('azureiothubreceiver',{
category: 'cloud',
color: '#00abec',
defaults: {
name: {value:"Azure IoT Hub Receiver"}
},
inputs:0,
outputs:1,
icon: "azureiothub.png",
label: function() {
return this.name||"Azure IoT Hub Receiver";
},
paletteLabel: function(){
return "Azure IoT Hub Receiver";
},
credentials: {
connectionString: {type:"text"}
}
});
RED.nodes.registerType('azureiothubdevicetwin',{
category: 'cloud',
color: '#00abec',
defaults: {
name: {value:"Azure IoT Hub Device Twin"}
},
inputs:1,
outputs:1,
icon: "azureiothub.png",
label: function() {
return this.name||"Azure IoT Hub Device Twin";
},
paletteLabel: function(){
return "Azure IoT Hub Device Twin";
},
credentials: {
connectionString: {type:"text"}
}
});
</script>
<script type="text/x-red" data-template-name="azureiothub">
<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">
</div>
<div class="form-row">
<label for="node-input-protocol"><i class="icon-tag"></i> Protocol</label>
<select id="node-input-protocol">
<option>http</option>
<option>amqp</option>
<option>mqtt</option>
<option>amqpWs</option>
</select>
</div>
<div class="form-row">
<label for="node-input-hostname"><i class="fa fa-bookmark"></i> Hostname</label>
<input type="text" id="node-input-hostname">
</div>
</script>
<script type="text/x-red" data-help-name="azureiothub">
<p>A simple node that sends the message payloads to Azure IoT Hub</p>
</script>
<script type="text/x-red" data-template-name="azureiothubregistry">
<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">
</div>
<div class="form-row">
<label for="node-input-connectionString"><i class="fa fa-bookmark"></i> connectionString</label>
<input type="text" id="node-input-connectionString">
</div>
</script>
<script type="text/x-red" data-help-name="azureiothubregistry">
<p>A simple node that registers devices with Azure IoT Hub</p>
</script>
<script type="text/x-red" data-help-name="azureiothubreceiver">
<p>A simple node for receiving device-to-cloud messages via default Azure Events Hub endpoint.</p>
</script>
<script type="text/x-red" data-template-name="azureiothubreceiver">
<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">
</div>
<div class="form-row">
<label for="node-input-connectionString"><i class="fa fa-bookmark"></i> connectionString</label>
<input type="text" id="node-input-connectionString">
</div>
</script>
<script type="text/x-red" data-help-name="azureiothubdevicetwin">
<p>A simple node for retrieving Azure IoT Hub Device Twin(s).</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type" >string</span>
</dt>
<dd>Optional deviceId specifier to retrieve only a specific Device Twin. If this property type is not defined or not a string, all Device Twins are retrieved.</dd>
<h3>Outputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">object</span>
</dt>
<dd>Retrieved Device Twin(s) as an array.</dd>
<dt class="optional">error
<span class="property-type">object</span>
</dt>
<dd>Error encountered. If present, <code>msg.payload</code> is always undefined.</dd>
<h3>Details</h3>
<p>Each input with produce an output with either <code>msg.error</code> as error object or <code>msg.payload</code> as an array of Device Twin data.</p>
</script>
<script type="text/x-red" data-template-name="azureiothubdevicetwin">
<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">
</div>
<div class="form-row">
<label for="node-input-connectionString"><i class="fa fa-bookmark"></i> connectionString</label>
<input type="text" id="node-input-connectionString">
</div>
</script>