Coder Social home page Coder Social logo

Comments (8)

alexdelprete avatar alexdelprete commented on May 24, 2024

Strange. I have reports it works with latest version. Do you have errors/warnings in the full HA log? Tagging @ivanfmartinez also here.

Can you please enable debug on the integration page, so I can check what's going on with the MPPT addresses? Enable it, and after 5m disable it, it will download you the log.

image

Also: on qmodmaster, please enable the rows/columns on the borders (the green table button next to settings on the bar) so I can see the offsets? Also, read from address 40100 for 120 registers and provide screenshot and do the same for address 41100 (for 120 registers again).

image

Thanks.

from ha-abb-powerone-pvi-sunspec.

szamozoli avatar szamozoli commented on May 24, 2024

I finally got to make screenshots with a working inverter. I realised I made a mistake when I opened this bug report. DC power output works flawlessly, but the DC voltage does not appear to change. Knowing this, I will change the name of this bug report accordingly.

I do observe some issues with certain integrations (smart tv, local tuya, etc.), but I think those are not relevant to this solar system.
home-assistant_abb_powerone_pvi_sunspec_2023-12-15T13-36-03.069Z.log

I made the screenshots, but the address 41100 cannot be read from my inverter.
image
image

Thank you.

from ha-abb-powerone-pvi-sunspec.

alexdelprete avatar alexdelprete commented on May 24, 2024

From your debug log it correctly recognizes that it can't find Model 160 at the default address (40122) so it tries at the address 41104, and it finds it. So the sensors have to be correctly updated.

2023-12-15 14:27:35.712 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Base Address: 40000
2023-12-15 14:27:35.712 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Model not 160 try another offset - multi_mppt_id: 120
2023-12-15 14:27:35.732 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Slave ID: 254
2023-12-15 14:27:35.733 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Base Address: 40000
2023-12-15 14:27:35.733 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Model is 160 (UNO-DM/REACT2) - multi_mppt_id: 160
2023-12-15 14:27:35.733 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) mppt_nr 1
2023-12-15 14:27:35.733 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Completed
2023-12-15 14:27:35.733 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Closing Modbus TCP connection

Here's the relevant code that implements the check and changes offset for UNO-DM-PLUS and REACT2 inverters.

        # Model 160 has different offset for UNO-DM-PLUS and REACT2 inverters
        # need to check and try the specific offset address (start address is 41104)
        if multi_mppt_id != 160:
            _LOGGER.debug("(read_rt_160) Model not 160 try another offset - multi_mppt_id: %d", multi_mppt_id)
            try:
                # try address 41104 for UNO-DM-PLUS and REACT2
                read_model_160_data = self.read_holding_registers(slave=self._slave_id, address=(self._base_addr + 1104), count=42)
                _LOGGER.debug("(read_rt_160) Slave ID: %s", self._slave_id)
                _LOGGER.debug("(read_rt_160) Base Address: %s", self._base_addr)
            except ModbusException as modbus_error:
                _LOGGER.debug(f"Read M160 modbus_error: {modbus_error}")
                raise ModbusError() from modbus_error
            # No connection errors, we can start scraping registers
            decoder = BinaryPayloadDecoder.fromRegisters(
                read_model_160_data.registers, byteorder=Endian.BIG
            )

            # register 122
            multi_mppt_id = decoder.decode_16bit_int()

            if multi_mppt_id != 160:
                _LOGGER.debug("(read_rt_160) Model not 160 (UNO-DM/REACT2) - multi_mppt_id: %d", multi_mppt_id)
                return False
            else:
                _LOGGER.debug("(read_rt_160) Model is 160 (UNO-DM/REACT2) - multi_mppt_id: %d", multi_mppt_id)
        else:
            _LOGGER.debug("(read_rt_160) Model is 160 - multi_mppt_id: %d", multi_mppt_id)

I have added a couple of debug log lines to that code, and realased a new v3.3.1-beta.2 that you can install through HACS, you need to enable the beta release option to choose it.

Install it, and capture debug logs as you did before, then send it so we can also see the data from the registries.

from ha-abb-powerone-pvi-sunspec.

szamozoli avatar szamozoli commented on May 24, 2024

I have installed the beta version and captured new logs.
home-assistant_abb_powerone_pvi_sunspec_2023-12-28T12-19-03.957Z.log

from ha-abb-powerone-pvi-sunspec.

alexdelprete avatar alexdelprete commented on May 24, 2024

As you can see from the log, DC1Volt is correctly read: value 203.

So I don't understand why you see -1. The registers are correctly read.

2023-12-28 13:11:29.818 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Slave ID: 254
2023-12-28 13:11:29.818 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Base Address: 40000
2023-12-28 13:11:29.818 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Model not 160 try another offset - multi_mppt_id: 120
2023-12-28 13:11:29.835 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Slave ID: 254
2023-12-28 13:11:29.835 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Base Address: 40000
2023-12-28 13:11:29.835 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Model is 160 (UNO-DM/REACT2) - multi_mppt_id: 160
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) mppt_nr 1
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) dc1curr 4
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) dc1volt 203
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) dc1power 990
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] (read_rt_160) Completed
2023-12-28 13:11:29.836 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Closing Modbus TCP connection
2023-12-28 13:11:29.837 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] End Get data
2023-12-28 13:11:29.837 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Finished fetching abb_powerone_pvi_sunspec data in 0.186 seconds (success: True)

from ha-abb-powerone-pvi-sunspec.

alexdelprete avatar alexdelprete commented on May 24, 2024

I have installed the beta version and captured new logs.

Ok, I think I found the issue. Can you test beta.3 from HACS and capture the debug log again?

Let me know if DC Voltage is finally correct. Thanks.

from ha-abb-powerone-pvi-sunspec.

szamozoli avatar szamozoli commented on May 24, 2024

Works like a charm.
image

Thanks for all the effort! Wish you a happy new year!

from ha-abb-powerone-pvi-sunspec.

alexdelprete avatar alexdelprete commented on May 24, 2024

Thanks for helping me solve this one. Happy new year. :)

from ha-abb-powerone-pvi-sunspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.