Skip to content

Lightweight Modbus Proxy written in C, designed to manage and facilitate communication with devices that only allow one open connection at a time.

Notifications You must be signed in to change notification settings

Kl0ibi/modbus_proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modbus Proxy

The Modbus Proxy is a lightweight tool designed to manage and facilitate communication with devices that only allow one open connection at a time. It acts as a mediator between multiple clients and the Modbus TCP server, ensuring smooth and efficient communication.

This proxy was specifically designed for Huawei Inverters, where the dongle only permits one active connection at any given time. With Modbus Proxy, you can overcome this limitation and enable multiple clients to access the inverter seamlessly.


Features

  • Connection Management: Handles communication for devices that only allow one active connection.
  • Data Caching: Reduces the load on the Modbus server by caching data for repeated client requests.
  • Reliable Communication: Manages retries for failed requests to maintain consistent communication.
  • Configurable Polling: Allows you to set polling intervals and retry limits.

How It Works

  1. The Modbus Proxy connects f.e. to the Huawei inverter via its dongle.
  2. It polls data from the inverter at configurable intervals.
  3. The data is cached and provided to clients that connect to the proxy, avoiding multiple connections to the inverter dongle.
  4. Additional the cached values, are obtain-able as a json.

Installation

  1. Clone the repository:

    git clone <repository_url>
    cd modbus_proxy
    
  2. Build:

    mkdir build
    cd build
    cmake ..
    camke --build .
    
  3. Start the proxy::

    ./modbus_proxy
    
    

Service Start Service Caching json values info values Service Usage

About

Lightweight Modbus Proxy written in C, designed to manage and facilitate communication with devices that only allow one open connection at a time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published