2
2
3
3
## Node-RED Agent for the MindConnect API
4
4
5
- ![ node-red-contrib-mindconnect] ( images/nodered.png )
5
+ <!-- markdownlint-disable MD033 -->
6
+ <img src =" images/mindconnect-node-red-logo.svg " alt =" @mindconnect/node-red-contrib-mindconnect " width =" 300px " />
7
+ <!-- markdownlint-enableMD033 -->
6
8
7
9
This node enables the Node-RED users to upload timeseries, files and events to MindSphere.
8
10
This project has started as a community effort at Siemens AG and is now available for general use.
@@ -11,7 +13,7 @@ This project has started as a community effort at Siemens AG and is now availabl
11
13
[ ![ npm] ( https://img.shields.io/npm/v/@mindconnect/node-red-contrib-mindconnect/latest.svg?style=flat )] ( https://www.npmjs.com/package/@mindconnect/node-red-contrib-mindconnect ) ![ downloads] ( https://img.shields.io/npm/dw/@mindconnect/node-red-contrib-mindconnect.svg?colorB=009999 )
12
14
[ ![ Known Vulnerabilities] ( https://snyk.io/test/github/mindsphere/node-red-contrib-mindconnect/badge.svg?targetFile=package.json )] ( https://snyk.io/test/github/mindsphere/node-red-contrib-mindconnect?targetFile=package.json )
13
15
[ ![ Total alerts] ( https://img.shields.io/lgtm/alerts/g/mindsphere/node-red-contrib-mindconnect.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/mindsphere/node-red-contrib-mindconnect/alerts/ )
14
- [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/mindsphere/node-red-contrib-mindconnect.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/mindsphere/node-red-contrib-mindconnect/context:javascript )
16
+ [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/mindsphere/node-red-contrib-mindconnect.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/mindsphere/node-red-contrib-mindconnect/context:javascript )
15
17
[ ![ Documentation] ( https://img.shields.io/badge/mindsphere-documentation-%23009999.svg )] ( https://opensource.mindsphere.io/docs/node-red-contrib-mindconnect/index.html )
16
18
[ ![ Forum] ( https://img.shields.io/badge/mindsphere-community-%23009999.svg )] ( https://community.plm.automation.siemens.com/t5/Developer-Space/bd-p/MindSphere-platform-forum )
17
19
[ ![ Demo Flows] ( https://img.shields.io/badge/node--RED-playground-%23009999.svg )] ( https://playground.mindconnect.rocks )
@@ -140,8 +142,11 @@ msg.payload = {
140
142
return msg;
141
143
```
142
144
143
- The node will per default validate if the event is valid for your agent configuration. This feature can be switched off in the settings but it
144
- is not recommended to do so.
145
+ If you are using the custom events instead of MindSphere Standard Events please include the following switch in the message.
146
+
147
+ ``` javascript
148
+ msg ._customEvent = true ;
149
+ ```
145
150
146
151
#### File Upload
147
152
@@ -174,6 +179,23 @@ properties which can be used to create more complex flows. (e.g. in the flow bel
174
179
175
180
![ errorhandling] ( images/errorhandling.png )
176
181
182
+ ## JWT Token Generation for SouthBound APIs
183
+
184
+ The node can be used to generate authentication tokens which you can use to call your own custom southbound APIs.
185
+ The msg.headers will have a Mindsphere Authorization JWT.
186
+
187
+ ``` javascript
188
+ msg ._includeMindSphereToken = true ;
189
+ ```
190
+
191
+ if you just want to get the token without sending any data to MindSphere
192
+
193
+ ``` javascript
194
+ msg ._ignorePayload = true ;
195
+ ```
196
+
197
+ Treat tokens as you would any other credentials.
198
+
177
199
## Demo flows
178
200
179
201
[ ![ Demo Flows] ( https://img.shields.io/badge/node--RED-playground-%23009999.svg )] ( https://playground.mindconnect.rocks )
@@ -185,6 +207,7 @@ properties which can be used to create more complex flows. (e.g. in the flow bel
185
207
- OPC-UA Data
186
208
- Real Weather Data to MindSphere
187
209
- Simulated Water Pump Data
210
+ - Custom SouthBound API Calls
188
211
189
212
The simulated water pump data can be inspected at
190
213
0 commit comments