Commit ad092139 authored by shastry's avatar shastry
Browse files


parent 3275b096
......@@ -104,13 +104,48 @@ In our case, we have defined a function - 'create_yaml' which contains our logic
2. The HTTP Flow
3. The Flask server- Yaml interface
Node 1: Input node:
This node is taken directly from the pallete available. Its just used to inject a new input into the flow.
Node 2: Our custom Node:
This node needs user inputs. Read the placeholders in each field carefully before entering the values of your device. Folow is a picture of how the node looks like
The next section shows the critical config part of the node. As you can see, we have 3 fields to fill and each of this requires special attention as visible in the placeholder instructions as seen blow:
Node 3: Take a simple function node from the pallete and write into it the following code:
$ var newmsg={payload:"localhost:5000/Newtest?query=".concat(msg.payload)}
$ return newmsg;
Node 4: Set msg url:
This node is just a continuance to the output of the earlier node and the properties are set as follows:
Node 5: Select from the nodes pallete on the left, a 'HTTP Request' node. No further actions needed except connecting it. The node looks like this when double-clicked:
Node 6: Just an output debug node selected from the pallete.
To summarize, here is how ll the connected nodes look like:
The Flow starts with an input node which is connected to our custom Test Node. As the code is written to act upon each input, once an input enters the system, we send it to the Node we created. In the custom node, we take in the application data (details of fields found in the javascript explanation) and these pass this data as parameters in message payload to a create URL which now has localhost as the address with msg.payload attached at the end. Then we use the inbuilt Node-Red **Change** Node to set URL according to the payload received. Then this whole detailed setup is represented as an HTTP request and the message payload is available to the user for verification.
### The MQTT Flow
We have a second flow to obtain data back from the lora server - MQTT flow. Here is how th eflow looks like:
Currently we have made use of two LoRa MQTT integration features: Rx and Status messages.
Each of this node requires a command given below to be inserted into the box as shown in the picture after the command:
$ application/[application id]/device/[device_eui]/rx[or status depending on the node]
The MQTT peaks into two integration offerred by chirpstack - Uplink and Status to obtain the corresponding device data. The devie EUI and application id, for now, has to be manually added by the user to the node
### The Flask server Yaml Interface
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment