Modbus MQTT and Node-Red

Modbus is a de facto standard, truly open and the most widely used network protocol in the industrial manufacturing environment.-ref Modbus Faqs

Because of its popularity there is a growing requirement for reading data and controlling Modbus devices over TCP/IP networks using MQTT.



The aim of this project is to create a node-red dashboard to send and receive data to modbus devices.

The project is based on real flows that I have developed for electricity monitoring.

I will be using a modbus simulator to simulate a modbus TCP/IP device and the modbus node-red nodes.

Getting Started

You will need to install the modbus nodes by going to menu > manage Pallete and search for node-red-contrib-modbus and install .

modbus-nodes

There are 13 nodes that are installed and appear under their own category in the node palette.

modbus-simulatorYou will also need a modbus device.

I will use the modbus simulator available for free here.

You should also have a basic knowledge of modbus.

I didn’t know anything about it when I started with my first project and so I had to do a lot of research.

I created a page of my notes along with useful links to resources that I found useful. See Modbus working notes

 

Videos

The following three videos

Introduce you to the Modbus Nodes

Show you how to Convert various modbus payloads into Integers,floats etc.

The final video show you how to send and receive data from MQTT to Modbus.

Resources:

video1

video2

video3-

Related Tutorials:

Please rate? And use Comments to let me know more
[Total: 2   Average: 5/5]

Leave a Reply

Your email address will not be published. Required fields are marked *