Node-RED
Sanity check for Node-RED
Open at https://node-red.big-bang.letsfiware.jp
to access the Node-RED GUI.
Access Node-RED API
Access Node-RED Admin HTTP API with an OAuth2 access token as the Node-RED API endpoint is protected by Wilma.
Get an access token.
Request:
ngsi token --host orion.big-bang.letsfiware.jp
Response:
75eaea327a874b7e78be78364493b2e5906996ae
Access Node-RED Admin HTTP API
Request:
curl https://node-red.big-bang.letsfiware.jp/settings \
--header 'Authorization: Bearer 75eaea327a874b7e78be78364493b2e5906996ae'
Response:
{
"httpNodeRoot": "/",
"version": "2.0.6",
"user": {
"username": "admin",
"permissions": "*"
},
"context": {
"default": "memory",
"stores": [
"memory"
]
},
"libraries": [
{
"id": "local",
"label": "editor:library.types.local",
"user": false,
"icon": "font-awesome/fa-hdd-o"
},
{
"id": "examples",
"label": "editor:library.types.examples",
"user": false,
"icon": "font-awesome/fa-life-ring",
"types": [
"flows"
],
"readOnly": true
}
],
"flowFilePretty": true,
"externalModules": {},
"flowEncryptionType": "system",
"functionExternalModules": false,
"tlsConfigDisableLocalFiles": false,
"editorTheme": {
"projects": {
"enabled": false,
"workflow": {
"mode": "manual"
}
},
"languages": [
"de",
"en-US",
"ja",
"ko",
"ru",
"zh-CN",
"zh-TW"
]
}
}
How to use NGSI node
Create entity
Request:
ngsi create \
--host orion.big-bang.letsfiware.jp \
entity \
--data '{"id":"device001"}' \
--keyValues
Get entity
Request:
ngsi get \
--host orion.big-bang.letsfiware.jp \
entity \
--id device001 \
--pretty
Response:
{
"id": "device001",
"type": "Thing"
}
Create flow
[{"id":"f5717ef56f6b92ee","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"d64a75632b691651","type":"NGSI Entity","z":"f5717ef56f6b92ee","openapis":"c574ed7e49fe8012","servicepath":"/","mode":"normalized","entitytype":"","attrs":"","x":410,"y":100,"wires":[["1600fecad297713b"]]},{"id":"ac8c9b2cb6a23119","type":"inject","z":"f5717ef56f6b92ee","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"device001","payloadType":"str","x":240,"y":100,"wires":[["d64a75632b691651"]]},{"id":"1600fecad297713b","type":"debug","z":"f5717ef56f6b92ee","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":590,"y":100,"wires":[]},{"id":"c574ed7e49fe8012","type":"Open APIs","name":"","brokerEndpoint":"https://orion.big-bang.letsfiware.jp","service":"","idmEndpoint":"https://orion.big-bang.letsfiware.jp","idmType":"tokenproxy"}]
Configuration for nodes
Configuration for NGSI Entity node
Add new Open APIs endpoint.
- Context Broker: Open APIs endpoint
Configuration for Context-Broker node
Set up an broker endpoint and security configuration.
- Broker Endpoint:
https://orion.big-bang.letsfiware.jp
- IdM Type:
Tokenproxy
- IdM Endpoint:
https://orion.big-bang.letsfiware.jp
- Username:
admin@big-bang.letsfiware.jp
- Password:
Your password
Inject payload
Examples
Look at examples here.