external.ts
9.69 KB
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
export default {
title: 'External',
description: 'Interacting with external systems',
alarmNotice: {
name: 'Alarm notice',
details: 'notice method include sms,email and so on.',
description: 'while device alarm, notice some people.',
fields: {
configuration: 'configuration',
},
},
awsSns: {
name: 'Aws sns',
details:
'Will publish message payload to the AWS SNS topic. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>) in the Message Metadata from the AWS SNS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.',
description: 'Publish message to the AWS SNS',
fields: {
topicArnPattern: 'Topic ARN pattern',
accessKeyId: 'AWS Access Key ID',
secretAccessKey: 'AWS Secret Access Key',
region: 'AWS Region',
},
},
awsSqs: {
name: 'Aws sqs',
details:
'Will publish message payload and metadata attributes to the AWS SQS queue. Outbound message will contain response fields (<code>messageId</code>, <code>requestId</code>, <code>messageBodyMd5</code>, <code>messageAttributesMd5</code>, <code>sequenceNumber</code>) in the Message Metadata from the AWS SQS. For example <b>requestId</b> field can be accessed with <code>metadata.requestId</code>.',
description: 'Publish messages to the AWS SQS',
fields: {
queueType: 'Queue type',
queueUrlPattern: 'Queue URL pattern',
delaySeconds: 'Delay(seconds)',
messageAttributes: 'Message attributes',
accessKeyId: 'AWS Access Key ID',
secretAccessKey: 'AWS Secret Access Key',
region: 'AWS Region',
},
},
azureIotHub: {
name: 'Azure iot hub',
details: 'Will publish message payload to the Azure IoT Hub with QoS <b>AT_LEAST_ONCE</b>.',
description: 'Publish messages to the Azure IoT Hub',
fields: {
topicPattern: 'Topic',
host: 'Hostname',
port: 'port',
connectTimeoutSec: 'connectTimeoutSec',
clientId: 'Device ID',
cleanSession: 'cleanSession',
ssl: 'ssl',
credentials: 'credentials',
type: 'Credentials type',
sasKey: 'sasKey',
caCert: 'CA certificate file',
caCertFileName: 'caCertFileName',
privateKey: 'Client private key file',
privateKeyFileName: 'privateKeyFileName',
cert: 'Client certificate file',
certFileName: 'certFileName',
password: 'Private key password',
},
},
gcpPubsub: {
name: 'Gcp pubsub',
details:
'Will publish message payload to the Google Cloud Platform PubSub topic. Outbound message will contain response fields (<code>messageId</code> in the Message Metadata from the GCP PubSub. <b>messageId</b> field can be accessed with <code>metadata.messageId</code>.',
description: 'Publish message to the Google Cloud PubSub',
fields: {
projectId: 'GCP project ID',
topicName: 'Topic name',
serviceAccountKey: 'GCP service account key file',
serviceAccountKeyFileName: 'serviceAccountKeyFileName',
messageAttributes: 'Message attributes',
},
},
kafka: {
name: 'Kafka',
details:
'Will send record via Kafka producer to Kafka server. Outbound message will contain response fields (<code>offset</code>, <code>partition</code>, <code>topic</code>) from the Kafka in the Message Metadata. For example <b>partition</b> field can be accessed with <code>metadata.partition</code>.',
description: 'Publish messages to Kafka server',
fields: {
topicPattern: 'Topic pattern',
bootstrapServers: 'Bootstrap servers',
retries: 'Automatically retry times if fails',
batchSize: 'Produces batch size in bytes',
linger: 'Time to buffer locally(ms)',
bufferMemory: 'Client buffer max size in bytes',
acks: 'Number of acknowledgments',
keySerializer: 'Key serializer',
valueSerializer: 'Value serializer',
otherProperties: 'Other properties',
addMetadataKeyValuesAsKafkaHeaders:
'Add Message metadata key-value pairs to Kafka record headers',
kafkaHeadersCharset: 'Charset encoding',
addMetadataKeyValuesAsKafkaHeadersDesc:
'If selected, key-value pairs in the message metadata are added to the outgoing record header as a byte array with a predefined character set encoding.',
},
},
mqtt: {
name: 'Mqtt',
details: 'Will publish message payload to the MQTT broker with QoS <b>AT_LEAST_ONCE</b>.',
description: 'Publish messages to the MQTT broker',
fields: {
topicPattern: 'Topic pattern',
host: 'Host',
port: 'Port',
connectTimeoutSec: 'Connection timeout(sec)',
clientId: 'Client ID',
appendClientIdSuffix: 'Add Service ID as suffix to Client ID',
cleanSession: 'Clean session',
ssl: 'Enable SSL',
credentials: 'credentials',
type: 'Credentials type',
password: 'Password',
caCert: 'Server CA certificate file',
caCertFileName: 'caCertFileName',
privateKey: 'Client private key file',
privateKeyFileName: 'privateKeyFileName',
cert: 'Client certificate file',
certFileName: 'certFileName',
username: 'Username',
appendClientIdSuffixDesc:
'Tip: Optional. When Client ID is specified. If selected, the service ID is added as a suffix to the client ID. Helps avoid platform failures when running in microservices mode.',
},
},
rabbitmq: {
name: 'Rabbitmq',
details: 'Will publish message payload to RabbitMQ queue.',
description: 'Publish messages to the RabbitMQ',
fields: {
exchangeNamePattern: 'Exchange name pattern',
routingKeyPattern: 'Routing key pattern',
messageProperties: 'Message properties',
host: 'Host',
port: 'Port',
virtualHost: 'Virtual host',
username: 'Username',
password: 'Password',
automaticRecoveryEnabled: 'Automatic recovery',
connectionTimeout: 'Connection timeout(ms)',
handshakeTimeout: 'Handshake timeout(ms)',
clientProperties: 'Client properties',
},
},
restApiCall: {
name: 'Rest api call',
details:
'Will invoke REST API call <code>GET | POST | PUT | DELETE</code> to external REST server. Message payload added into Request body. Configured attributes can be added into Headers from Message Metadata. Outbound message will contain response fields (<code>status</code>, <code>statusCode</code>, <code>statusReason</code> and response <code>headers</code>) in the Message Metadata. Response body saved in outbound Message payload. For example <b>statusCode</b> field can be accessed with <code>metadata.statusCode</code>.<br/><b>Note-</b> if you use system proxy properties, the next system proxy properties should be added: "http.proxyHost" and "http.proxyPort" or "https.proxyHost" and "https.proxyPort" or "socksProxyHost" and "socksProxyPort",and if your proxy with auth, the next ones should be added: "tb.proxy.user" and "tb.proxy.password" to the thingsboard.conf file.',
description: 'Invoke REST API calls to external REST server',
fields: {
restEndpointUrlPattern: 'Endpoint URL pattern',
requestMethod: 'Request method',
useSimpleClientHttpFactory: 'Use simple client HTTP factory',
ignoreRequestBody: 'Without request body',
enableProxy: 'Enable proxy',
useSystemProxyProperties: 'Use system proxy properties',
proxyScheme: 'Proxy scheme',
proxyHost: 'Proxy host',
proxyPort: 'Proxy port',
proxyUser: 'Proxy user',
proxyPassword: 'Proxy password',
readTimeoutMs: 'Read timeout in millis',
maxParallelRequestsCount: 'Max number of parallel request',
headers: 'Header',
useRedisQueueForMsgPersistence: 'Use redis queue for message persistence',
trimQueue: 'Trim redis queue',
maxQueueSize: 'Redis queue max size',
credentials: 'Credentials',
type: 'Credentials type',
password: 'Password',
caCert: 'Server CA certificate file',
caCertFileName: 'caCertFileName',
privateKey: 'Client private key file',
privateKeyFileName: 'privateKeyFileName',
cert: 'Client certificate file',
certFileName: 'certFileName',
username: 'Username',
},
},
sendEmail: {
name: 'Send email',
details:
'Expects messages with <b>SEND_EMAIL</b> type. Node works only with messages that where created using <code>to Email</code> transformation Node, please connect this Node with <code>to Email</code> Node using <code>Successful</code> chain.',
description: 'Sends email message via SMTP server.',
fields: {
useSystemSmtpSettings: 'Use system SMTP settings',
smtpProtocol: 'Protocol',
smtpHost: 'SMTP host',
smtpPort: 'SMTP port',
timeout: 'Timeout ms',
enableTls: 'Enable TLS',
tlsVersion: 'TLS version',
enableProxy: 'Enable proxy',
proxyHost: 'Proxy host',
proxyPort: 'Proxy port',
proxyUser: 'Proxy user',
proxyPassword: 'Proxy password',
username: 'Username',
password: 'Password',
},
},
sendSms: {
name: 'Send sms',
details:
'Will send SMS message by populating target phone numbers and sms message fields using values derived from message metadata.',
description: 'Sends SMS message via SMS provider.',
fields: {
numbersToTemplate: 'Phone Numbers To Template',
smsMessageTemplate: 'SMS message Template',
useSystemSmsSettings: 'User system SMS provider settings',
smsProviderConfiguration: 'smsProviderConfiguration',
accessKeyId: 'AWS Access Key ID',
secretAccessKey: 'AWS Access Key',
region: 'AWS Area',
type: 'SMS Service provider type',
numberFrom: "Sender's phone number",
accountSid: 'Twilio Account SID',
accountToken: 'Twilio Account Token',
},
},
};