logo elektroda
logo elektroda
X
logo elektroda

Sofar Solar KTL-X Inverter: RS485 MODBUS Integration with Domoticz - Setup & Tips [90]

starob 98025 318
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #181 19936864
    kumaPL
    Level 5  
    starob wrote:
    Didn't we already rewrite this topic as "ArturHome"?


    hehe I guess so :)
  • ADVERTISEMENT
  • #182 19964441
    januszek82
    Level 9  
    Hello, can you connect a solar sofar with CCA Tigo? So that you can view the inverter in the Tigo app.
  • #183 19964759
    jarczydło
    Level 15  
    xury wrote:
    Have you read Readme.md on github? Everything is described there and how.
    Install python modules
    You need to determine the IP of your LSW3 and enter it in config.cfg
    Unlock MQTT and HA by typing 1 instead of 0
    Set MQTT in configuration.yaml
    Autodiscovery should show the entities by themselves if everything is configured correctly.


    Hello :)
    I have a server on debian 11 doing something at home.
    I launched Michalux's soft col on it and it shows the data from the sofar nicely.
    I would like to put HomeAssistant on it, but all the rest, i.e.
    Install MQTT, INFLUX and GRAFANA from Debian or from HA?
    Please guide me, greetings.
  • #184 19964776
    xury
    Automation specialist
    I have it installed from Debian. There is more control over services.
    I only have HA in docker.
  • ADVERTISEMENT
  • #185 19964793
    jarczydło
    Level 15  
    Thanks.
    So you can do it anyway, I'm not strong in pure linux, I mean simplicity of configuration.
    greetings
  • ADVERTISEMENT
  • #186 19998773
    Michalux
    Level 10  
    Hi.
    If anyone wants to test and has Shelly3EM, I have prepared a solution that downloads data from this device and uploads it to InfluxDB (without using the cloud, i.e. everything on premise :) ). The data can be married with the data from Sofar and then you can see how much the house pulls, and how much it gives back and when :)
    Sofcik here: https://github.com/MichaluxPL/shelly3em
  • #187 20011286
    ynst2000
    Level 10  
    starob wrote:
    I have an inverter and an additional two-way counter SDM630 connected to the modbusWifi Elfin EW11 converter.
    I wrote a plug-in for domoticz in python, it will display and record only the parameters I am interested in.
    You won't get much out of the original logger (whether wired or WiFi) ... such a gadget for the needs of the cloud.


    I also use EW11 and managed to communicate with the SDM630 without problems, but I have a problem with SofarSolar.
    Tests with Modbus Pool app and others and only "Holding registers" works. With "Input registers" I have a timeout.
    I have no experience with modbus and I don't know where the problem is
  • #188 20025196
    spin722
    Level 9  
    [/url]
    ynst2000 wrote:
    I also use EW11 and managed to communicate with the SDM630 without problems, but I have a problem with SofarSolar.
    Tests with Modbus Pool app and others and only "Holding registers" works. With "Input registers" I have a timeout.
    I have no experience with modbus and I don't know where the problem is

    Normally the CRC in Modbus RTU is 2 bytes. The first byte is Hi, the second is Lo. SofarSolar uses back - the first Lo, the second Hi. Maybe that's why you can't communicate?
    I am using a USB-RS485 converter
    Sofar Solar KTL-X Inverter: RS485 MODBUS Integration with Domoticz - Setup & Tips [90]
    together with the terminal on the computer.
    CRC16 can be counted by online calculator
    For example, if you want to read the serial number of the inverter, you must send the command 01 04 20 01 00 08 AB CC (HEX format)
    Here: 01 - inverter address
    04 - function number (Read inverter holding register information)
    20 - Hi register address
    01 - Lo register address
    00 08 - number of registers to read
    AB - Lo byte CRC
    CC - Hi byte CRC

    If you need to read the input registers, it's function number 03.
    For example, it is necessary to know the insulation resistance of the cables from the panels. Register #28 needed to be read. We send in inverter 01 03 00 28 00 01 04 02
    Here
    01 - inverter address
    03 - function number
    00 - Hi register address
    28 - Lo register address
    00 01 - number of registers to read
    04 - Lo byte CRC
    02 - Hi byte CRC

    I have a proprietary program to read all parameters of the inverter. But the program is Chinese, everything is written in hieroglyphs. If needed, we can share it.

    P.S. Sorry for mistakes. I don't really write in Polish because I'm from Ukraine.
  • #189 20031822
    rhkozlowski
    Level 2  
    Good morning,

    Gentlemen, I have this problem with KTL 20 HYD, actually two and I am looking for someone who will help (I will gladly pay):

    1. communication with the DTSU666 energy meter (included with the inverter) via the LoRa USR-LG206-P radio bridge - I think I’ve tried everything and I can’t connect it. The cable works fine. Ask if anyone has tested it, has an idea or any other tested solution for a radio bridge with a counter for this inverter?

    2. setting the operation of the GTX3000 energy storage for the C13 tariff so that:
    a) charging took place during the day in off-peak hours only from PV energy if there is sunshine (not from the grid) and discharging only during the afternoon peak hours. And
    b) the next landing took place at night off-peak (from the grid) and the discharge took place during the morning peak hours, but only at times when there is no solar energy to meet the own needs.
    No matter how you set it, warehouse operation modes 1-3 described in the manual do not provide the intended functionality, only mode 4 (passive mode) remains. And here is a request for help in the selection and configuration of an external device with RS485.

    A polite request for help - and thanks in advance.
    Radek
  • #190 20082713
    fphuralf
    Level 1  
    Hello
    I have Saia modbus meter and SOFAR KTL6.6 inverter
    as you know, the sofar has transmission parameters of 9600/8/n/1.
    I have connected via modbus to siemens s7-1200 via Chinese MODBUS RTU to TCP converter.
    The counter selects the transmission parameters itself, but when the parity is NONE, the stop bits must be 2. I can't change it and I either talk to the sofar or the counter.
    Is it possible to somehow change the sofar to 2 stop bits or some other parity?
  • #191 20085434
    spin722
    Level 9  
    fphuralf wrote:
    Hello
    I have Saia modbus meter and SOFAR KTL6.6 inverter
    as you know, the sofar has transmission parameters of 9600/8/n/1.
    I have connected via modbus to siemens s7-1200 via Chinese MODBUS RTU to TCP converter.
    The counter selects the transmission parameters itself, but when the parity is NONE, the stop bits must be 2. I can't change it and I either talk to the sofar or the counter.
    Is it possible to somehow change the sofar to 2 stop bits or some other parity?


    I do not see the possibility of changing the transmission parameters of the inverter, unfortunately. In one network, the meter and inverter with different transmission parameters will not work.
    If it is not possible to change the transmission parameters in the meter, there are the following variants:
    1 - two separate Modbus RTU - Modbus TCP converters. The first to the meter with the transmission parameters 8-n-2, the second - to another device with the parameters 8-n-1.
    2 - mount the converter next to the counter, transmission parameters 8-n-1 8-n-2 (can be done on AtMega, Arduino).
    3 - replace the counter with another one with 8-n-1 transmission parameters.
  • #192 20085691
    jarek2425
    Level 12  
    spin722 wrote:
    [/url]
    ynst2000 wrote:


    I have a proprietary program to read all parameters of the inverter. But the program is Chinese, everything is written in hieroglyphs. If needed, we can share it.

    P.S. Sorry for mistakes. I don't really write in Polish because I'm from Ukraine.


    Hi can you send this reading program to email? j.swierk(_at_)gmail.com
    Thanks.
  • #194 20088438
    jarek2425
    Level 12  
    spin722 wrote:
    I already sent.


    nothing happened :(
  • #196 20093547
    Mk25121976
    Level 6  
    Please help me how to activate rs485 connector in sofar solar inverter

    Added after 2 [hours] 52 [minutes]:

    Hello, please help me how to activate the rs485 connector 8/8 ktl x inverter

    Added after 55 [seconds]:

    Hello, please help me how to activate the rs485 connector 8/8 ktl x inverter
  • #197 20095736
    spin722
    Level 9  
    Mk25121976 wrote:


    Hello, please help me how to activate the rs485 connector 8/8 ktl x inverter

    The RS485 port of the inverter is always active. The inverter acts as a slave device.
    In order for communication to take place, the master device that will read the inverter must be set correctly.
    What is the master device?
  • #199 20096944
    xury
    Automation specialist
    The master device is the polling device. The inverter itself will not send anything.
  • #200 20096949
    Mk25121976
    Level 6  
    I have a chint dtsu 666 counter
    And solarman apps
  • #201 20096951
    spin722
    Level 9  
    Mk25121976 wrote:
    What is a master device

    Modbus RTU Master - this device (in English device ) initiating communication and sending queries to Slave devices.
    Modbus RTU Slave devices respond to queries sent by Master devices.
    Lipej first read what is the Modbus RTU communication protocol and how it works. Then try to make communication after Modbus RTU.
  • #202 20096965
    Mk25121976
    Level 6  
    I have connected inverter with chint dtsu 666 meters
    via rs485 port
  • ADVERTISEMENT
  • #203 20096983
    spin722
    Level 9  
    Mk25121976 wrote:
    I have connected inverter with chint dtsu 666 meters
    via rs485 port

    The chint dtsu 666 counter acts itself as a Modbus Slave (according to the manual for the lichnik link ). He can't read the inverter.
    To read the meter together with the inverter, you need to add a Modbus Master to the network. It could be a computer, a controller, or some other device.

    PS Why do you want to match the meter to the inverter? The inverter already has a counter in it. It only needed to read it via Modbus RTU.
  • #204 20097005
    Mk25121976
    Level 6  
    And maybe a phone?
    So connect your computer?
  • #205 20097124
    spin722
    Level 9  
    Mk25121976 wrote:
    And maybe a phone?
    So connect your computer?

    I think you can read on your phone too. On the computer, I think it will be better. It all depends on what you need. But as for the phone, you must use the Wi-Fi, Bluetooth, USB or RS232-RS485 converter together with the appropriate application for the computer.
  • #206 20097231
    Mk25121976
    Level 6  
    Massacre
    Thanks for your help but I still don't know how to do it
  • #207 20097845
    FrankAB
    Level 20  
    Mk25121976 wrote:
    Massacre
    Thanks for your help but I still don't know how to do it

    Read the thread from the beginning - there are several solutions.
  • #208 20109016
    Emi_B
    Level 9  
    Michalux wrote:
    I only download what is issued by MODBUS on individual registers.


    Theoretically, you're right, but when I fetch directly, the data is returned:
    Code: Bash
    Log in, to see the code

    and when the call goes from the code, nonsense comes out:
    Code: Bash
    Log in, to see the code

    is it the fault of the logger?
  • #209 20109027
    starob
    Level 29  
    Emi_B wrote:
    and when the call goes from the code, nonsense comes out:


    Yes, it's the logger's fault.. this integration in python does not check the reasonableness of the data.
    Although in your case it doesn't work at all (unless it's incidental).
    Try disabling cloud streaming.
  • #210 20130746
    mariuszml
    Level 12  
    Hello everyone.

    The issue of reading data from Sofar inverters via the LSW3 logger appeared in the thread.
    It is already known that it is possible to download data by sending a local TCP query to the logger on port 8899 with the appropriate frame.

    The question is has anyone tried to implement the inverter functions in the same way?

    I am specifically interested in the function of limiting power to a given %.
    The modbus specification generally provides for this, the question is whether the LSW3 will also be able to handle it?:

    Quote:
    Active power &Over/Under voltage Power Derate Parameter(0x0900-0x093F)

    0901 ActiveOutputLimit U16 0.1% 0 1000 RW ??????? The percentage of active power output Installer


    Maybe knowing this and having already configured the connection at home, someone would be tempted to make a test?

Topic summary

The discussion revolves around integrating the Sofar Solar KTL-X inverter with Domoticz via RS485 Modbus, addressing issues related to communication, configuration, and data retrieval. Users share experiences with various setups, including the use of Ethernet-to-RS485 converters and the LSW-3 logger. Key points include the need for correct transmission parameters (9600 baud, 8 data bits, no parity, 1 stop bit), the importance of proper wiring, and the challenges faced when using different firmware versions. Participants also discuss the mapping of Modbus registers for accurate data reading and the potential for using Node-RED for automation. Solutions for common problems, such as timeouts and data retrieval errors, are provided, along with suggestions for configuring Home Assistant for monitoring.
Summary generated by the language model.
ADVERTISEMENT