MODBUS RTU gateway, WiFi, Ethernet, WEB server

In my project to get data from the Swegon Casa HRV, FTX, i needed a new solution to distribute the MODBUS data from the CASA.

The thing is that I have a Raspberry Pi(RPi) that is the central HUB for everything going on in our house, but away from the CASA, and the data is there vizualized in a NodeRed dashboard.

Since the CASA RTU is serial, using Waveshare USB to RS 485, and I didn't want to install a new long cabel to the central RPi I used another RPi which is near the CASA.

Intro
I did alot of Googling for how to reach a serial port over a network but ended up with another solution inspired from this NodeRed node. In the text they are refering to the Modbus Flex server. So with a little tweak to their solution it now works.

Flow explaination


As said in the former post, about CASA, the base for the MODBUS communication is the NodeRed node
node-red-contrib-modbus.

The MODBUS client, my central RPi, are doing a HTTP request with an URL

http://test.local:1880/modbus/flex/read?fc=4&address=6200&quantity=12

The URL contains
    MODBUS function code  => 4
    CASA Register address => 6200
    Registers to read     => 12

The MODBUS server, "http in" node, receives the request and forwards the parameters to "Modbus Flex Getter" node which output is sent on back to the client.

Flow
The above flow is found here but please note that its done for the CASA so see it just as a guidance for your solution.

Comments

Popular post, last 30 days

NetworkManager UI and access point, hotspot

Raspberry Pi OS Lite with GUI, RDP, VNC, Chromium

iCloud drive sync, or mount, with a Linux, Ubuntu, device

Installing Ubuntu 24.04 or 24.10/25.04 on an old MacBook Air(2011)

Signal K quick install, Raspberry Pi, Ubuntu

Clone the Raspberry boot disk

SeaTalk1 to NMEA 0183 converter, DIY

Volvo Penta NMEA 2000 Gateway

Waveshare CAN hat with Signal K & OpenPlotter

AIS receiver and dispatcher ! The best ?!