Closed tttooommmeeekkk closed 3 months ago
Found the workaround/extension here:
Have you managed to do a normal control of DO port? Do I understand this correctly, that I need to:
Is this all, or anything else is needed?
Yes. The extension done by dl1ekm works as expected (for me with the mentiomed annotations in the discussion-section of his project. But you can also set the register 13011 without a changing the other 2. However I do not know, what happens, when register 13002 is set to e.g. "power optimized mode" and switches the DO and you overrides this by setting register 13011 it seems the best way to do it, as you wrote (set all 3 registers).
Is your feature request related to a problem? Please describe. I actually can not switch the inverters DO relay ("ON/OFF" or "closed/opened") without logging into the built-in webinterface. In some cases I can not reach the local webinterface and make any changes (webinterface seems to be overloaded). HA-Modbus-control seem work anyway and the communication to/with the inverter seems to be more stable and reliable. So a HA-integrated switch would be a kind and reliable solution for switching the DO-Port in situations I would like to (and reduce the dependence of working inverter-webinterface). I already wrote some code to my local modbus_sungrow.yaml that reads the holding-register 13011 (Load-Control-Mode 1 ON/OFF). Here are my existing code-snippets:
It would be nice to have the DO-port of the inverter be switchable by HA, so that one can manually switch the el. relays (without logging into the inverters local webbrowser): for example to activate the heatpumps "instant-hot-water-program" that is connected to that DO-Port (when there is PV-surplus).
Describe the solution you'd like The DO relay should become closed/ON when it gets state 0xAA (decimal: 170) and become opened/OFF when it gets state 0x55 (decimal: 85).
Describe alternatives you've considered A) No support of such an switch. or B) A more complex programming for the whole DO-Configuration (Holding Registers 13001 - 13016).
Additional context The DO-switch-position seems only to be shown by manually switching the register 13011 (as I actually do it by using the inverters webinterface). If the DO-port-configuration (h-register 13001) is set to "1: Load Control Mode" AND the Load Control Mode (h-register 13002) is set to "2: Power optimized mode" (for using PV-surplus with set h-registers 13012-13016) the register 13011 gets no change in status (maybe there is another readonly?-register for a state of a closed/opened DO-Port when using "2. Power optimized mode") .