top of page
Writer's pictureY. Osroosh, PhD

How to Display Wireless Sensor Data on a Webpage Using Node-RED and Raspberry Pi?

Updated: Mar 28

In a previous post, I explained how to display real-time data from multiple sensors on a webpage using Node-RED. In that project, the sensors were connected to PC or Raspberry Pi using USB sensor adapters. In this article, I'm going to describe briefly how we, at EnviTronics Lab, collect wireless sensor data and send them to PC or Raspberry Pi. This data can be displayed on a webpage using Node-RED the same way as with regular USB sensor adapters.



How to setup a private wireless sensor network?

It can be a lot of fun to set up a private wireless sensor network for monitoring soil moisture in your garden, greenhouse or grow room, specially if you don't have to pay any subscription fees.


Here at our Lab, we have developed a wireless solution that takes only a few hours to set up and anyone can do it. We have combined long range wireless nodes, sensors, a gateway and a computer application to setup a private wireless sensor network in star topology.



We have two types of wireless sensor nodes: single-channel (ISHTAR 1P-LR) and 4-channel (SHINAK 4P-LR). Any combination of single and four channel sensor nodes can be used in the network. The total number of the channels (sensors) in a given network, however, must not exceed hundred (100). ​We use ISHKUR G-WF gateway to collect data from the wireless nodes. At least one wireless sensor node and gateway are needed to form a network.


The gateway can be connected to PC over WiFi or USB and all it does is to receive data from wireless sensor nodes in the network and send them to PC (dumb gateway). We have developed a Windows application (SHUSHAN CVI-Wireless) that parses the strings, records and graphs sensor data.

Sensor data that is sent by wireless sensor nodes is in the form of comma-separated strings (csv), and the gateway only adds a little bit of information about the signal strength and itself before sending it to PC.


All DurUntash Lab wireless sensor nodes automatically detect sensor type (only DurUntash sensors), take sensor readings, carry out signal conditioning (e.g. calibration and temperature-compensation), format the results in the form of comma-separated data strings, and make them available at their USB port. This means the only thing you need to do is to connect each sensor to a wireless node and connect the gateway to your hardware of choice (PC, Raspberry Pi, etc).


If it's not clear to you what a comma-separated data string mean, please refer to the user manual of the ISHTAR Zero sensor adapter (as an example). Its communication protocol is explained in detail. Our wireless sensor nodes all have a similar communication protocol.


he ISHKUR gateway works like a sensor adapter that can collect data from a lot of sensors rather than just one. The gateway has a USB port and can be directly connected to a Raspberry Pi board. It can also potentially connect to the Pi over WiFi, but this require additional work and knowledge of the communication protocol. T



How to display wireless sensor data on webpage using Node-RED

So far we learned that we can collect sensor data using the wireless nodes and gateway from DurUntash Lab. Sensor data from DurUntash readout devices is formatted and can be sent to a Raspberry Pi or PC over USB port. You have the option to use the SHUSHAN Windows application to graph and record incoming data. If you're interested in a DIY project, however, you can forget about the app and use Node-RED. Processing wireless sensor data in Node-RED is very similar to using USB sensor adapters with Node-RED.


I my previous post about displaying data on a webpage using Node-RED, I explained how you can develop a simple yet powerful flow in Node-RED that takes incoming sensor data and displays them on a webpage. Instead of repeating the content of that post, I just invite you to read the whole article.




0 comments

Comments


bottom of page