Skip to content

Node Red

Sean Allen edited this page Aug 21, 2018 · 3 revisions

Installation

alt-tag

Node-Red is a flow based programming module that makes it really easy to connect services and accomplish tasks without having to manually code. It was perfect for this project and I was drawn to it from other tutorials on the internet.

To install on Windows 10: https://nodered.org/docs/platforms/windows

Running

To begin working with node-red, open a cmd window and type "node-red". This cmd prompt MUST remain open at all times in order for data to flow from TTN to InfluxDB. Go to the web page specified at the bottom which runs on a local host and bookmark it as its where the flow will be located. The web page can be closed when you're done creating the flow.

Data from TTN Console to InfluxDB

The first step to getting your data from TTN to InfluxDB is to install the TTN library into node-red; downloaded here. This will add a few nodes to the sidebar of node-red. The only one I used was ttn uplink (blue) and set it up as seen below. The access key is found at the application overview section of TTN console at the bottom of the screen.

alt-tag

You'll also need the InfluxDB nodes which can be found here. Here is how I set up the InfluxDB node (orange); the biggest thing to note is that what you specify as "Measurement" is what will be used by InfluxDB to specify what the data is going to be called, so when I write "SELECT * FROM mb7092" in InfluxDB, the data will show up from TTN.

alt-tag

The debug node (green) is fairly straight forward to setup and simply shows the data coming in and being visible within node-red which is handy to see in case something isn't working.

Final note that you have to press deploy in the top right in order for node-red to get to work.

Clone this wiki locally