saidlm / Domoticz-Solax-plugin

Plugin to monitor and control Solax inverter from Domoticz via ModBUS over TCP/IP
MIT License
1 stars 0 forks source link

Modbus Unit_ID #1

Closed jfh75 closed 5 months ago

jfh75 commented 1 year ago

Hello Said !

Thank you so much for providing this plugin. I do not manage to make it work fine, I don't know so much about python, but I was looking through it, trying to locate where to change the modbus slave ID. Here I have the chintdsu meter connected to my Solax G4, which is slave 2, my old EASTRON is slave 1, and my inverter is modbus slave #3. Where is it I may indicate this please ?

Thank you for your help,

JFH

saidlm commented 1 year ago

Hi, thank you for your interest. Honestly speaking I am little bit confused. Your energy meter is conneted via Modbus RTU using dedicated physical RS-485 port. I guess the same bus is used for your EATRON. The both ones are sleve on the bus and Solax acts as the master for them. The connection to Solax G4 can be done using com port - separated Modbus / RS-485 independent from meters one. The second possibility is to use Modbus oner TCP. My understandin is that it is possible only via WiFi communication dongle. Unfortunately it is not possible with Ethernet one :-(. My plugin has been developed and was tested for the second solution. The main reason is I am not able to use com port for Domoticz communication because it is ocupied by Solax Wallbox connection. The identification of the device is done usind IP address and its ID is default one - ID = 1. I haven't tested it but I guess there is no way how to change it in the dongle configuration. Honnestly speaking there is no relevant reason for that in my opinion. If you need to use for communication with Solax RS-485 it is in theory possible. Serial communication is supported by pymodbus module but the plugin doesn't use it at the moment. Modbus TCP is only way for current version.

Martin

jfh75 commented 12 months ago

Thank you for your answer. Today, my bus is connected to a modbus TCP serveur usrIOT N501. I have changed my inverter ID to 1, but still got connection has not been established yet error. There seems to be traffic as Tx and Rx are increasing when monitoring my N501 usrIOT

JFH

saidlm commented 12 months ago

Hi, as I wrote I have tested only direct connection to Solax G4 with WiFi communication dongle. It works to me. The way how to check if the donge souppots Modbus TCP is to try to establish connection to port TCP/502. Just telnet to it gives the answer. If the port is open and the connection is establish it support it. I haven't tested any RS-485 to TCP/IP solution based on external device. There can be difference in Modbus over TCP vs ModbusRTU over IP implementation. The plugin reads all required registers in one read cycle. The question is if the server support it or if it is not limited to small amout of registers etc. It is realy not so easy to answer your question without having the device.

Have you the possibility to communicate with the inverter dirctly over IP? If yes why you don't want to use it?

Martin