Open nicx opened 1 year ago
anoyone here who could help? :)
I only just started using this project, but I have a SUN-2000L working with modbus-proxy and I have the following settings applied as the defaults didn't work for me:
timeout: 3
connection_time: 1
This has been working stably for about a week now and works when I use qModMaster to query data.
@Gert-dev Hi, could you please show your config.yml? Where is your container running? I'm trying to get it work with my SUN2000 10KTL inverter (IP address is 192.168.3.5) on my Synology Docker( 192.168.1.5) container port 502 mapped to host port 5200 docker run -d -p 5020:502 -v /volume1/docker/modbus/config.yml:/etc/modbus-proxy.yml tiagocoutinho/modbus-proxy my config.yml `devices:
without success. I get this error:
thread 'main' panicked at 'called
Result::unwrap()on an
Errvalue: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', /modbus-proxy-rs/src/lib.rs:181:67 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace
Sure. My configuration:
devices:
- modbus:
url: 192.168.1.199:502
timeout: 3
connection_time: 1
listen:
bind: 0.0.0.0:9000
unit_id_remapping:
1: 0
logging:
version: 1
formatters:
standard:
format: "%(asctime)s %(levelname)8s %(name)s: %(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: standard
root:
handlers: ["console"]
#level: DEBUG
I'm not running modbus-proxy in a container, though, just on a Debian host natively using Python 3.
Also remember that if you want to bind to ports under 1024 on Docker you probably need elevated permissions (also one of the reasons I chose 9000), perhaps that's the problem? I don't know what the python:3.8-alpine
Dockerfile does, but it might be running as a normal user rather than root.
(Finally, not sure if 0
is expanded to 0.0.0.0
in bind
automatically during listening, but it might.)
@Gert-dev thank you for your help! But unfortunately it doesn't work for me. Does anyone has success with Docker and Sun2000?
@nicx Did you get it to work?
@giss69 didn't work here, no chance.
But since i use EVCC anyway i tried it with the proxy integrated there: that works wonderfully. modbus-proxy seems to work differently somehow. Too bad that no maintainer reports here, i would have liked to use the solution. :(
@nicx I'd like to use it with EVCC too. How did you managed it with proxy?
@giss69 just look into the documentation of EVCC, no special needs for the SUN2000, it just worked as expected ;)
@nicx Exactly the same problem, SUN2000 inverter, HA and EVCC. modbus_proxy isn't working for me as well. Thank you for pointing at https://github.com/evcc-io/evcc/pull/4981, will implement this solution, too.
I try to run modbus-proxy via Docker on my Unraid server (IP address of the server is 192.168.0.1). I am using a Huawei SUN2000 10KTL inverter (IP address is 192.168.1.4). I want to connect EVCC and Home Assistant (both containers on my server) simultaneously to modbus-proxy. I mapped the container port 502 to the host port 5020.
My config.yaml:
After starting modus-proxy I tried to connect my clients to it, but with no success. It seems that the connection from modus-proxy to the inverter is working, but for both clients I get a
Client error: RecvError(())
.The log output of modus-proxy:
Any idea what I could do to solve this?