A few ago we made the review of the Netio PowerPDU 4C a Power Socket, it is an Intelligent Socket which allows Iot and M2M integrations in a very easy way.
Following the complete review of the Netio PowerPDU 4C, it has a lot of interesting features for measurement and control.
In this tutorial we will also talk about one of the creators of the PowerPDU 4C, Netio from the Czech Republic specifically Prague.
Web Site : netio.com
Node-RED & Node-RED Dashboard
Node-RED has become one of the quintessential IoT integration platforms uniting programming and design through nodes, technically it has nodes to interconnect a wide variety of protocols, devices and platforms.
Raspberry Pi
There are several methods to run Node-RED, in my case it is installed on a Raspberry Pi 3 models B, this allows to collect data continuously 24/7, this Raspberry Pi also runs other services and applications such as Grafana, MySQL, MariaDB, Influxdb and LoRaWAN integrations or connection with The Things Network platform.
In this case, the Raspberry Pi has a PoE Power Supply designed based on “tusistemita.com”, a rapid prototyping and mounting system.
If you want to configure your Raspberry Pi from scratch, follow two tutorials on how to install Raspbian Os without desktop.
Materials
- Raspberry Pi 3 B, B+ Raspberry Pi 4
- SD Card or microSD 4 a 8GB
- Mounting Socket System “tusistemita.com”
Where to buy the PowerPDU 4C
Embedded Web Server in PowerPDU
Our PowerSocket has an embedded Web server for configuration and display, from here the json protocol configuration is done through http:
Node-RED and PowerPDU integration
The PowerPDU has a wide variety of protocols available, in this case we will use the http JSON protocol.
JSON is (JavaScript Object Notation) is a lightweight data exchange format.
Using the Node (http Request), the request is made from the Node-RED to the PowerPDU in JSON Object format.
Configured node: to request data.
Tests Performed
A routine will be designed which will periodically request information through JSON:
Final diagram.
General view.
GET requests
Responses to GET requests:
Example: msg.payload.Agent
Example: msg.payload.GlobalMeasure
Example: msg.payload.Outputs.4
Node-RED Dashboard
Node-RED has Node-RED Dashboard a series of nodes to create web interfaces in a very easy way to create Widgets and display variables, in this case we will make a dashboard to display the Voltage and Frequency.
Video: Complete Test
Conclusions
This implementation is perfect for monitoring the electrical consumption of the equipment.
Although this time we are only reading data we could also interact and / or control any of the 4 available Relay outputs in this case we are only using # 4.
In future integrations we could send data to other platforms is the case of Ubidots.
2 things are intended in this tutorial:
- Know the JSON integrations through http.
- Learn how to filter JSON through payloads.
Thanks to Netio for the PowerPDU 4C !!
Downloads
- Archivo Flow.json for import in Node-RED