Skip to content

Commit 623b477

Browse files
sn0wcat--global
andauthored
fix: node-red 1.10 compatibility (#91)
* fix: fix for node 1.10 * docs: readme * chore: version 3.8.0 🎉 Co-authored-by: --global <igor.milovanovic@siemens.com>
1 parent 54c7aed commit 623b477

File tree

9 files changed

+1272
-1089
lines changed

9 files changed

+1272
-1089
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
*.html
12
*.md

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Changelog
22

3-
## 3.8.0 (Vienna Tigers) - Mai 2020
3+
## 3.8.0 (Vienna Tigers) - July 2020
44

55
## New Features 3.8.0
66

7-
- Added msg._includeMindSphereToken switch which propagates the MindSphere Authentication Token in msg.headers
7+
- Custom Event Support via _customEvent switch on the message.
8+
- Added msg._includeMindSphereToken and msg._ignorePayload switch which propagates the MindSphere Authentication Token in msg.headers
89
- The msg._includeMindSphereToken switch can be used in conjuction with the http request node to call custom southbound mindsphere APIs (#83)
910
- New examples on <https://playground.mindconnect.rocks> for flows
1011
- Bumped all dependencies
12+
- New Logo <3
13+
14+
## BugFix 3.8.0
15+
16+
- Node is now Node-RED 1.10 compatible.
1117

1218
## 3.7.0 (Vienna Ocelots) - April 2020
1319

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Node-RED Agent for the MindConnect API
44

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 -->
68

79
This node enables the Node-RED users to upload timeseries, files and events to MindSphere.
810
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
1113
[![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)
1214
[![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)
1315
[![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)
1517
[![Documentation](https://img.shields.io/badge/mindsphere-documentation-%23009999.svg)](https://opensource.mindsphere.io/docs/node-red-contrib-mindconnect/index.html)
1618
[![Forum](https://img.shields.io/badge/mindsphere-community-%23009999.svg)](https://community.plm.automation.siemens.com/t5/Developer-Space/bd-p/MindSphere-platform-forum)
1719
[![Demo Flows](https://img.shields.io/badge/node--RED-playground-%23009999.svg)](https://playground.mindconnect.rocks)
@@ -140,8 +142,11 @@ msg.payload = {
140142
return msg;
141143
```
142144

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+
```
145150

146151
#### File Upload
147152

@@ -174,6 +179,23 @@ properties which can be used to create more complex flows. (e.g. in the flow bel
174179

175180
![errorhandling](images/errorhandling.png)
176181

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+
177199
## Demo flows
178200

179201
[![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
185207
- OPC-UA Data
186208
- Real Weather Data to MindSphere
187209
- Simulated Water Pump Data
210+
- Custom SouthBound API Calls
188211

189212
The simulated water pump data can be inspected at
190213

images/mindconnect-node-red-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

images/nodered.png

-45.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)