node-red-contrib-aedes 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/nodejs.yml +29 -29
- package/.travis.yml +23 -23
- package/CHANGELOG.md +142 -138
- package/LICENSE +21 -21
- package/README.md +46 -46
- package/aedes.html +289 -247
- package/aedes.js +377 -348
- package/locales/en-US/aedes.html +18 -18
- package/locales/en-US/aedes.json +37 -33
- package/package.json +60 -58
- package/test/aedes_last_will_spec.js +80 -80
- package/test/aedes_qos_spec.js +168 -172
- package/test/aedes_retain_spec.js +290 -168
- package/test/aedes_spec.js +413 -413
- package/test/aedes_ws_spec.js +176 -176
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
name: Node.js CI
|
|
2
|
-
|
|
3
|
-
on: [push]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
|
-
strategy:
|
|
11
|
-
matrix:
|
|
12
|
-
node-version: [14.x, 16.x, 18.x]
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v3
|
|
16
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
-
uses: actions/setup-node@v3
|
|
18
|
-
with:
|
|
19
|
-
node-version: ${{ matrix.node-version }}
|
|
20
|
-
- run: npm install
|
|
21
|
-
- run: npm install -g node-red
|
|
22
|
-
- run: npm link node-red
|
|
23
|
-
- run: npm install -g mocha
|
|
24
|
-
- run: npm install -g semistandard
|
|
25
|
-
- run: npm install -g snazzy
|
|
26
|
-
- run: npm run build --if-present
|
|
27
|
-
- run: npm test
|
|
28
|
-
env:
|
|
29
|
-
CI: true
|
|
1
|
+
name: Node.js CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
node-version: [14.x, 16.x, 18.x]
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
+
uses: actions/setup-node@v3
|
|
18
|
+
with:
|
|
19
|
+
node-version: ${{ matrix.node-version }}
|
|
20
|
+
- run: npm install
|
|
21
|
+
- run: npm install -g node-red
|
|
22
|
+
- run: npm link node-red
|
|
23
|
+
- run: npm install -g mocha
|
|
24
|
+
- run: npm install -g semistandard
|
|
25
|
+
- run: npm install -g snazzy
|
|
26
|
+
- run: npm run build --if-present
|
|
27
|
+
- run: npm test
|
|
28
|
+
env:
|
|
29
|
+
CI: true
|
package/.travis.yml
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
sudo: false
|
|
2
|
-
language: node_js
|
|
3
|
-
cache:
|
|
4
|
-
npm: false
|
|
5
|
-
env:
|
|
6
|
-
- CXX=g++-4.8
|
|
7
|
-
addons:
|
|
8
|
-
apt:
|
|
9
|
-
sources:
|
|
10
|
-
- ubuntu-toolchain-r-test
|
|
11
|
-
packages:
|
|
12
|
-
- g++-4.8
|
|
13
|
-
services:
|
|
14
|
-
- mongodb
|
|
15
|
-
node_js:
|
|
16
|
-
- "12"
|
|
17
|
-
- "14"
|
|
18
|
-
before_script:
|
|
19
|
-
- npm install -g node-red
|
|
20
|
-
- npm link node-red
|
|
21
|
-
- npm install -g mocha
|
|
22
|
-
- npm install -g semistandard
|
|
23
|
-
- npm install -g snazzy
|
|
1
|
+
sudo: false
|
|
2
|
+
language: node_js
|
|
3
|
+
cache:
|
|
4
|
+
npm: false
|
|
5
|
+
env:
|
|
6
|
+
- CXX=g++-4.8
|
|
7
|
+
addons:
|
|
8
|
+
apt:
|
|
9
|
+
sources:
|
|
10
|
+
- ubuntu-toolchain-r-test
|
|
11
|
+
packages:
|
|
12
|
+
- g++-4.8
|
|
13
|
+
services:
|
|
14
|
+
- mongodb
|
|
15
|
+
node_js:
|
|
16
|
+
- "12"
|
|
17
|
+
- "14"
|
|
18
|
+
before_script:
|
|
19
|
+
- npm install -g node-red
|
|
20
|
+
- npm link node-red
|
|
21
|
+
- npm install -g mocha
|
|
22
|
+
- npm install -g semistandard
|
|
23
|
+
- npm install -g snazzy
|
package/CHANGELOG.md
CHANGED
|
@@ -1,138 +1,142 @@
|
|
|
1
|
-
# node-red-contrib-aedes Changelog
|
|
2
|
-
|
|
3
|
-
## Mar
|
|
4
|
-
### Notable changes
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Update aedes to version
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
### Notable changes
|
|
24
|
-
- Fix
|
|
25
|
-
|
|
26
|
-
## May
|
|
27
|
-
### Notable changes
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
### Notable changes
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
##
|
|
38
|
-
### Notable changes
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
##
|
|
42
|
-
### Notable changes
|
|
43
|
-
- Update aedes to version 0.
|
|
44
|
-
|
|
45
|
-
##
|
|
46
|
-
### Notable changes
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
## Feb
|
|
50
|
-
### Notable changes
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Dependency badge from David-DM
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
## Oct,
|
|
64
|
-
### Notable changes
|
|
65
|
-
- Update Aedes to version 0.
|
|
66
|
-
|
|
67
|
-
##
|
|
68
|
-
### Notable changes
|
|
69
|
-
- Update Aedes to version 0.
|
|
70
|
-
|
|
71
|
-
##
|
|
72
|
-
### Notable changes
|
|
73
|
-
- Update Aedes to version 0.
|
|
74
|
-
|
|
75
|
-
##
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Notable changes
|
|
97
|
-
- Add secure
|
|
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
|
-
|
|
1
|
+
# node-red-contrib-aedes Changelog
|
|
2
|
+
|
|
3
|
+
## Mar 13, 2023, Version 0.11.0
|
|
4
|
+
### Notable changes
|
|
5
|
+
- Add LevelDB persistence
|
|
6
|
+
|
|
7
|
+
## Mar 03, 2023, Version 0.10.0
|
|
8
|
+
### Notable changes
|
|
9
|
+
- Update aedes to version 0.49.0
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Dec 27, 2022, Version 0.9.1
|
|
13
|
+
### Notable changes
|
|
14
|
+
- Update aedes to version 0.48.1
|
|
15
|
+
- Update aedes-persistence-mongodb to version 9.1.1
|
|
16
|
+
|
|
17
|
+
## Oct 23, 2022, Version 0.9
|
|
18
|
+
### Notable changes
|
|
19
|
+
- Update aedes to version 0.48
|
|
20
|
+
- Update node-red-node-test-helper to version 0.3.0
|
|
21
|
+
|
|
22
|
+
## Jun 03, 2022, Version 0.8.2
|
|
23
|
+
### Notable changes
|
|
24
|
+
- Fix Scorecard Warnings
|
|
25
|
+
|
|
26
|
+
## May 29, 2022, Version 0.8.1
|
|
27
|
+
### Notable changes
|
|
28
|
+
- Fix issue with incomplete credentials
|
|
29
|
+
|
|
30
|
+
## May 22, 2022, Version 0.8
|
|
31
|
+
### Notable changes
|
|
32
|
+
- Update aedes to version 0.47
|
|
33
|
+
|
|
34
|
+
## Feb 18, 2022, Version 0.7
|
|
35
|
+
### Notable changes
|
|
36
|
+
- Fix Close Time Out Issue
|
|
37
|
+
## Oct 17, 2021, Version 0.6
|
|
38
|
+
### Notable changes
|
|
39
|
+
- Add output node for publish events
|
|
40
|
+
|
|
41
|
+
## Apr 23, 2021, Version 0.5.2
|
|
42
|
+
### Notable changes
|
|
43
|
+
- Update aedes to version 0.46
|
|
44
|
+
|
|
45
|
+
## Mar 08, 2021, Version 0.5.1
|
|
46
|
+
### Notable changes
|
|
47
|
+
- Update aedes to version 0.45
|
|
48
|
+
|
|
49
|
+
## Feb 25, 2021, Version 0.5.0
|
|
50
|
+
### Notable changes
|
|
51
|
+
- Add mqtt over websocket path (Thanks Ori Novanda)
|
|
52
|
+
|
|
53
|
+
## Feb, 21, 2021, Version 0.4.2
|
|
54
|
+
### Notable changes
|
|
55
|
+
- Update aedes to version 0.44.2
|
|
56
|
+
- Dependency badge from David-DM added again
|
|
57
|
+
|
|
58
|
+
## Dec, 22, 2020, Version 0.4.1
|
|
59
|
+
### Notable changes
|
|
60
|
+
- Dependency badge from David-DM removed
|
|
61
|
+
- Dependabot added
|
|
62
|
+
|
|
63
|
+
## Oct, 29, 2020, Version 0.4.0
|
|
64
|
+
### Notable changes
|
|
65
|
+
- Update Aedes to version 0.44
|
|
66
|
+
|
|
67
|
+
## Oct, 13, 2020, Version 0.3.7
|
|
68
|
+
### Notable changes
|
|
69
|
+
- Update Aedes to version 0.43
|
|
70
|
+
|
|
71
|
+
## May, 16, 2020, Version 0.3.6
|
|
72
|
+
### Notable changes
|
|
73
|
+
- Update Aedes to version 0.42
|
|
74
|
+
|
|
75
|
+
## April, 07, 2020, Version 0.3.5
|
|
76
|
+
### Notable changes
|
|
77
|
+
- Update Aedes to version 0.41
|
|
78
|
+
|
|
79
|
+
## March 26, 2020, Version 0.3.4
|
|
80
|
+
|
|
81
|
+
### Fixes
|
|
82
|
+
- Certificate loading (Reported in issue #17)
|
|
83
|
+
|
|
84
|
+
## March 26, 2020, Version 0.3.3
|
|
85
|
+
|
|
86
|
+
### Fixes
|
|
87
|
+
- Typing error on aedes.html (Reported in issue #17)
|
|
88
|
+
|
|
89
|
+
## March 22, 2020, Version 0.3.2
|
|
90
|
+
|
|
91
|
+
### Notable changes
|
|
92
|
+
- Update aedes-persistence-mongodb to version 8
|
|
93
|
+
|
|
94
|
+
## March 10, 2020, Version 0.3.1
|
|
95
|
+
|
|
96
|
+
### Notable changes
|
|
97
|
+
- Add secure WSS connection
|
|
98
|
+
|
|
99
|
+
## Feb 25, 2020, Version 0.3.0
|
|
100
|
+
### Notable changes
|
|
101
|
+
- Add secure SSL / TLS connection
|
|
102
|
+
### Fixes
|
|
103
|
+
- Reformat code to [semistandard](https://github.com/standard/semistandard)
|
|
104
|
+
- Prepare internationaization (only en-US implemented so far)
|
|
105
|
+
- Rearrange property windows to allow more features
|
|
106
|
+
|
|
107
|
+
## Feb 20, 2020, Version 0.2.0
|
|
108
|
+
|
|
109
|
+
### Notable changes
|
|
110
|
+
- Add status to node
|
|
111
|
+
|
|
112
|
+
### Fixes
|
|
113
|
+
- Move username and password to credentials
|
|
114
|
+
|
|
115
|
+
## Feb 17, 2020, Version 0.1.1
|
|
116
|
+
|
|
117
|
+
### Fixes
|
|
118
|
+
|
|
119
|
+
- Fix another "port already in use" error
|
|
120
|
+
|
|
121
|
+
## Feb 16, 2020, Version 0.1.0
|
|
122
|
+
|
|
123
|
+
### Notable changes
|
|
124
|
+
- Add authentication
|
|
125
|
+
- Add mqtt over websocket
|
|
126
|
+
|
|
127
|
+
### Fixes
|
|
128
|
+
|
|
129
|
+
- Fix "port already in use" errors
|
|
130
|
+
|
|
131
|
+
### Commits
|
|
132
|
+
- [[`Version 0.1.0`](https://github.com/martin-doyle/node-red-contrib-aedes/commit/9a0f2390674de155c5f48de4ad2415448417d1b9)] - Version 0.1.0
|
|
133
|
+
- [[`Add mqtt over websocket`](https://github.com/martin-doyle/node-red-contrib-aedes/commit/9a0f2390674de155c5f48de4ad2415448417d1b9)] - Add mqtt over websocket
|
|
134
|
+
- [[`Add authentication`](https://github.com/martin-doyle/node-red-contrib-aedes/commit/0005fc587cd8082b2055162b056055314ac694bc)] - Add authentication
|
|
135
|
+
|
|
136
|
+
## Feb 15, 2020, Initial commit
|
|
137
|
+
|
|
138
|
+
### Notable changes
|
|
139
|
+
- Initial commit
|
|
140
|
+
|
|
141
|
+
### Commits
|
|
142
|
+
- [[`Initial commit`](https://github.com/martin-doyle/node-red-contrib-aedes/commit/3b10df634bba92665d486ef83933eafc8d57f9dc)] - Initial commit
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 martin-doyle
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 martin-doyle
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
# node-red-contrib-aedes
|
|
2
|
-
MQTT Broker for Node-RED based on [Aedes](https://github.com/moscajs/aedes).
|
|
3
|
-
|
|
4
|
-
You can use the MQTT protocol in Node-RED without an external MQTT broker like Mosquitto.
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
[](https://github.com/standard/semistandard)
|
|
8
|
-
[](https://www.codacy.com/manual/martin-doyle/node-red-contrib-aedes?utm_source=github.com&utm_medium=referral&utm_content=martin-doyle/node-red-contrib-aedes&utm_campaign=Badge_Grade)
|
|
9
|
-
<!--
|
|
10
|
-
[](https://david-dm.org/martin-doyle/node-red-contrib-aedes)
|
|
11
|
-
[](https://david-dm.org/martin-doyle/node-red-contrib-aedes#info=devDependencies)
|
|
12
|
-
-->
|
|
13
|
-
[](https://github.com/ellerbrock/open-source-badge/)
|
|
14
|
-
[](https://www.npmjs.com/node-red-contrib-aedes)
|
|
15
|
-
|
|
16
|
-
## Background
|
|
17
|
-
This node was created because the original MQTT broker [node-red-contrib-mqtt-broker](https://github.com/zuhito/node-red-contrib-mqtt-broker) uses [mosca](https://github.com/moscajs/mosca) which is no longer maintained.
|
|
18
|
-
## Installation
|
|
19
|
-
You can install the node directly within the editor by using the [Palette Manager](https://nodered.org/docs/user-guide/editor/palette/manager).
|
|
20
|
-
|
|
21
|
-
To install the node from the command-line, you can use the following command from within your user data directory (by default, ```$HOME/.node-red```):
|
|
22
|
-
```sh
|
|
23
|
-
npm install node-red-contrib-aedes
|
|
24
|
-
```
|
|
25
|
-
## Flows
|
|
26
|
-
Just put this node on Node-RED and hit the deploy button. The MQTT Broker will run on your Node-RED instance.
|
|
27
|
-

|
|
28
|
-
|
|
29
|
-
## Features
|
|
30
|
-
- Standard TCP Support
|
|
31
|
-
- WebSocket Support via port or path
|
|
32
|
-
- SSL / TLS
|
|
33
|
-
- Message Persistence (In-memory or MongoDB)
|
|
34
|
-
|
|
35
|
-
For more information see [Aedes](https://github.com/moscajs/aedes/blob/master/README.md#features).
|
|
36
|
-
|
|
37
|
-
## Server without public IP or behind firewall
|
|
38
|
-
If your server is behind a firewall or you cannot open any ports other than the standard http/https ports, the MQTT broker node can be accessible by public clients through a WebSocket path.
|
|
39
|
-
|
|
40
|
-
When your Node-RED server address is `https://yourserver/`, you can set the WebSocket to bind to, e.g., `"/ws/mqtt"` path, to have `wss://yourserver/ws/mqtt` WebSocket at port `443`.
|
|
41
|
-
|
|
42
|
-
You can also bind the WebSocket to the root `"/"` path and having `wss://yourserver/` WebSocket listening at port `443` (or `ws://yourserver/` at port `80`).
|
|
43
|
-
|
|
44
|
-
## License
|
|
45
|
-
|
|
46
|
-
Licensed under [MIT](./LICENSE).
|
|
1
|
+
# node-red-contrib-aedes
|
|
2
|
+
MQTT Broker for Node-RED based on [Aedes](https://github.com/moscajs/aedes).
|
|
3
|
+
|
|
4
|
+
You can use the MQTT protocol in Node-RED without an external MQTT broker like Mosquitto.
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
[](https://github.com/standard/semistandard)
|
|
8
|
+
[](https://www.codacy.com/manual/martin-doyle/node-red-contrib-aedes?utm_source=github.com&utm_medium=referral&utm_content=martin-doyle/node-red-contrib-aedes&utm_campaign=Badge_Grade)
|
|
9
|
+
<!--
|
|
10
|
+
[](https://david-dm.org/martin-doyle/node-red-contrib-aedes)
|
|
11
|
+
[](https://david-dm.org/martin-doyle/node-red-contrib-aedes#info=devDependencies)
|
|
12
|
+
-->
|
|
13
|
+
[](https://github.com/ellerbrock/open-source-badge/)
|
|
14
|
+
[](https://www.npmjs.com/node-red-contrib-aedes)
|
|
15
|
+
|
|
16
|
+
## Background
|
|
17
|
+
This node was created because the original MQTT broker [node-red-contrib-mqtt-broker](https://github.com/zuhito/node-red-contrib-mqtt-broker) uses [mosca](https://github.com/moscajs/mosca) which is no longer maintained.
|
|
18
|
+
## Installation
|
|
19
|
+
You can install the node directly within the editor by using the [Palette Manager](https://nodered.org/docs/user-guide/editor/palette/manager).
|
|
20
|
+
|
|
21
|
+
To install the node from the command-line, you can use the following command from within your user data directory (by default, ```$HOME/.node-red```):
|
|
22
|
+
```sh
|
|
23
|
+
npm install node-red-contrib-aedes
|
|
24
|
+
```
|
|
25
|
+
## Flows
|
|
26
|
+
Just put this node on Node-RED and hit the deploy button. The MQTT Broker will run on your Node-RED instance.
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
- Standard TCP Support
|
|
31
|
+
- WebSocket Support via port or path
|
|
32
|
+
- SSL / TLS
|
|
33
|
+
- Message Persistence (In-memory, LevelDB or MongoDB)
|
|
34
|
+
|
|
35
|
+
For more information see [Aedes](https://github.com/moscajs/aedes/blob/master/README.md#features).
|
|
36
|
+
|
|
37
|
+
## Server without public IP or behind firewall
|
|
38
|
+
If your server is behind a firewall or you cannot open any ports other than the standard http/https ports, the MQTT broker node can be accessible by public clients through a WebSocket path.
|
|
39
|
+
|
|
40
|
+
When your Node-RED server address is `https://yourserver/`, you can set the WebSocket to bind to, e.g., `"/ws/mqtt"` path, to have `wss://yourserver/ws/mqtt` WebSocket at port `443`.
|
|
41
|
+
|
|
42
|
+
You can also bind the WebSocket to the root `"/"` path and having `wss://yourserver/` WebSocket listening at port `443` (or `ws://yourserver/` at port `80`).
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
Licensed under [MIT](./LICENSE).
|