-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternatives to this project #31
Comments
Thanks for pointing out to this other solution, @IngmarStein . I tried to get this version (Python) as well as the Rust version to run with no success (timeout, no matter what configs I try) since some days. Tried installing this version and also tried Docker, but everything failed. As there was no reaction from @tiagocoutinho in the last issues, I didn't even attempt to seek some help here. That's why I am glad that you @IngmarStein posted this message. |
Just a short feedback @IngmarStein : worked perfectly! One question, although this is out of scope here: what does " with a maximum connection count of 1" mean in this context? Only one connection to the server allowed, or only one connection to haproxy? |
Glad to hear that it's been useful for you! I had reliability issues with the Rust version and I'm not sure whether tiagocoutinho/modbus-proxy-rs#4 would have fully resolved those. The |
Addendum: the haproxy solution does not do TCP-level multiplexing. That means: long-living TCP connections from one client will block other clients for as long as they keep the TCP connection alive. haproxy queues other clients and eventually drops them when |
Firstly thanks for sharing the alternative, I have been testing modbus-proxy for over a week to allow my victron system (1 sec polling) and home assistant (30 sec polling) to read my huawei inverter/meter stats and all seems to be working well so far. I am however interested in understanding if there is any DIY software/hardware solution that would allow multiple simultaneously active clients/cache the results and share to clients without having to do multiple reads similar to what is advertised for the following hardware: 7bit Modbus Proxy - Modbus RTU to Modbus TCP caching gateway 2 x RS-485, 2 х Ethernet, Wi-Fi Unlike most gateways, which only re-transmit packets from one network to another, while introducing additional delay, Modbus Proxy works at its pace all along, reading the requested registers into the internal memory and responds to requests with values stored in memory. Thus, the requested registers are read from the gateway’s cache without delay over Modbus TCP, while the gateway cyclically reads them from the Modbus RTU devices and put data into cache._ |
Wow! life saver. I have been struggling for days to try to get my sun grow inverter to communicate with my rpi and Hass. I am not very code efficient. could you explain what I need to change in the config file? using yours I get.
my inverter is runing on 193.168.31.148 port 502 using gives me. so do I know connect my my other program. inverter to mqtt to port 192.168.31.148:0502? what do I need to change? many thanks.. Jim |
Did you change |
in case somebody find this useful.
problem solved. |
So I rolled my own: http://github.com/ingmarStein/tcp-multiplexer |
The last commit for this project has been one year ago and there has been little activity in the issue tracker as well. Assuming this project is paused, it might be worth looking for alternatives.
Personally, I had good success with HAProxy. Yes, it's not as lightweight but it's rock-solid, extremely scalable, well documented, and supported.
Here's my configuration to proxy a modbus server (port mapping: 5020 -> 1502) with a maximum connection count of 1:
haproxy.cfg
Docker Compose
Maybe this helps someone.
The text was updated successfully, but these errors were encountered: