Added boilerplate for MQTT nodered.

This commit is contained in:
Yohan Boujon 2024-12-11 12:03:19 +01:00
parent b733a4d598
commit a812de619d
3 changed files with 195 additions and 0 deletions

8
node-red/README.md Normal file
View file

@ -0,0 +1,8 @@
# NodeRed
To launch the installation of node red, be sure to have `nodejs` installed, and launch the following commands:
```bash
sudo npm install -g --unsafe-perm node-red
node-red
```
Once all setup you can import the `.json` !

View file

@ -0,0 +1,187 @@
[
{
"id": "198746f833af26ca",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4c9b06ffad932f89",
"type": "debug",
"z": "198746f833af26ca",
"name": "debug 1",
"active": true,
"tosidebar": false,
"console": true,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1230,
"y": 220,
"wires": []
},
{
"id": "5833c1785f0d5c12",
"type": "inject",
"z": "198746f833af26ca",
"name": "Toto timestamp",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "toto",
"payload": "Hello, world!",
"payloadType": "str",
"x": 860,
"y": 160,
"wires": [
[
"cfba9dafbd28ba79"
]
]
},
{
"id": "cfba9dafbd28ba79",
"type": "mqtt out",
"z": "198746f833af26ca",
"name": "",
"topic": "toto",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "3c830ca801586f46",
"x": 1070,
"y": 160,
"wires": []
},
{
"id": "644016f53bdf47c7",
"type": "mqtt in",
"z": "198746f833af26ca",
"name": "",
"topic": "toto",
"qos": "2",
"datatype": "auto-detect",
"broker": "211ac90c1df2c2b0",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 890,
"y": 220,
"wires": [
[
"4c9b06ffad932f89"
]
]
},
{
"id": "3c830ca801586f46",
"type": "mqtt-broker",
"name": "",
"broker": "https://srv-chirpstack.insa-toulouse.fr",
"port": "1883",
"tls": "baca35e28f5a3a27",
"clientid": "",
"autoConnect": true,
"usetls": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "211ac90c1df2c2b0",
"type": "mqtt-broker",
"name": "",
"broker": "https://srv-chirpstack.insa-toulouse.fr",
"port": "1883",
"tls": "2909ad4e1ca13619",
"clientid": "",
"autoConnect": true,
"usetls": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "baca35e28f5a3a27",
"type": "tls-config",
"name": "",
"cert": "",
"key": "",
"ca": "",
"certname": "",
"keyname": "",
"caname": "ca_certificate.txt",
"servername": "",
"verifyservercert": true,
"alpnprotocol": ""
},
{
"id": "2909ad4e1ca13619",
"type": "tls-config",
"name": "",
"cert": "",
"key": "",
"ca": "",
"certname": "",
"keyname": "",
"caname": "ca_certificate.txt",
"servername": "",
"verifyservercert": true,
"alpnprotocol": ""
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB