davidrapan / ha-solarman

⚡ Solarman Stick Logger integration for 🏠 Home Assistant
MIT License
66 stars 16 forks source link

Deye 2/4mppt profile - Device Alert shows Error with value: 1900546, 1900548, 1900550 #171

Open terzo33 opened 1 week ago

terzo33 commented 1 week ago

Hi @davidrapan , I always see this error message but actually there is no error, on solarman there is no warning

Screenshot_20240923_073113_Home Assistant.jpg

davidrapan commented 1 week ago

Hi @terzo33, does the Value 1.900.546 changes over time or does it stays the same?

terzo33 commented 1 week ago

Hi @terzo33, does the Value 1.900.546 changes over time or does it stays the same?

Alwasys the same in all 3 of my micro inverters

davidrapan commented 1 week ago

I mean it should be 0 which is OK state. And I have no idea what could this particular value mean... Does your official Solarman App shows anything useful in the Alarm/Fault notifications?

Edit: Are you using stock deye_2/4mppt profile right?

terzo33 commented 1 week ago

Yes 4mppt profile, solarman app doesn't show me any errors

davidrapan commented 1 week ago

And if you browse the history of the notifications? Can you find something there?

terzo33 commented 1 week ago

And if you browse the history of the notifications? Can you find something there?

In solarman app?

Screenshot_20240923_095206_SOLARMAN Business.jpg

davidrapan commented 1 week ago

I could maybe add this values as an OK one for you when Solarman App does not see it as an error....

Anyway can I use this opportunity and ask you if sum of all your PV1-4 Power is ever higher than Output Power?

terzo33 commented 1 week ago

I could maybe add this values as an OK one for you when Solarman App does not see it as an error....

Yes. I think so because i can't see any errors

Anyway can I use this opportunity and ask you if sum of all your PV1-4 Power is ever higher than Output Power?<

Yes is higher, total is 625,25W for pv1/4 but sensor "Output power" show me 601,2W

Screenshot_20240923_111917_Home Assistant.jpg

davidrapan commented 1 week ago

Okay.

Could you please show me full sensor list of all your microinverters in HA?

terzo33 commented 1 week ago

Screenshot_20240923_120713_Home Assistant.jpg

Screenshot_20240923_120717_Home Assistant.jpg

Screenshot_20240923_120721_Home Assistant.jpg

Screenshot_20240923_120725_Home Assistant.jpg

davidrapan commented 1 week ago

Great, thanks!

Are you familiar with integration services? There is one for reading registers, could you look for me for some specific registers? 80 and 82? And show me what values it holds?

terzo33 commented 1 week ago

Where can i found reading register? If you show me I'm very happy to help you

davidrapan commented 1 week ago

You need to have Developer Tools enabled in the HA and then there under ACTIONS you will find Solarman: Read Holding Registers (Modbus Function Code 3) Action. Select Device, input Register (80) and click PERFORM ACTION. And tell me the result. (Repeat for register number 82)

terzo33 commented 1 week ago

You need to have Developer Tools enabled in the HA and then there under ACTIONS you will find Solarman: Read Holding Registers (Modbus Function Code 3) Action. Select Device, input Register (80) and click PERFORM ACTION. And tell me the result. (Repeat for register number 82)

@davidrapan

Screenshot_20240923_135809_Home Assistant.jpg

Screenshot_20240923_135746_Home Assistant.jpg

davidrapan commented 1 week ago

Wonderful!

But to be 100% that they don't show any value could you maybe try to add into your profile and confirm it still does not show any meaningful data?:

      - name: "Test Output"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 0.1
        rule: 3
        registers: [0x0050, 0x0051]

      - name: "Test Input"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 0.1
        rule: 3
        registers: [0x0052, 0x0053]
davidrapan commented 1 week ago

And also:

      - name: "Test PV1 Power"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 1
        rule: 1
        registers: [0x00BA]
        icon: "mdi:solar-power-variant"

      - name: "Test PV2 Power"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 1
        rule: 1
        registers: [0x00BB]
        icon: "mdi:solar-power-variant"
terzo33 commented 1 week ago

And also:

      - name: "Test PV1 Power"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 1
        rule: 1
        registers: [0x00BA]
        icon: "mdi:solar-power-variant"

      - name: "Test PV2 Power"
        class: "power"
        state_class: "measurement"
        uom: "W"
        scale: 1
        rule: 1
        registers: [0x00BB]
        icon: "mdi:solar-power-variant"

Screenshot_20240923_141947_Home Assistant.jpg

Screenshot_20240923_142011_Home Assistant.jpg

Screenshot_20240923_142020_Home Assistant.jpg

davidrapan commented 1 week ago

It should add the sensors into your device so show me list of the sensors please. 😉

terzo33 commented 1 week ago

It should add the sensors into your device so show me list of the sensors please. 😉

Screenshot_20240923_142505_Home Assistant.jpg

davidrapan commented 1 week ago

Does Test PV1 Power anyhow corresponds to PV1 Power?

Edit: Maybe if you change scale from 1 to 0.1?

terzo33 commented 1 week ago

Does Test PV1 Power anyhow corresponds to PV1 Power?<

No :(

Edit: Maybe if you change scale from 1 to 0.1?<

Screenshot_20240923_143246_Home Assistant.jpg

Screenshot_20240923_143347_Home Assistant.jpg

davidrapan commented 1 week ago

Okay nevermind. It was worth the shot regardless. Thank you for your help! Very appreciated!

terzo33 commented 1 week ago

It's a pleasure for me to help you

davidrapan commented 1 week ago

@terzo33, can you try v24.09.23?

And easiest way how to clean up sensors after changes is to delete and re-add device after the update to newer version.

terzo33 commented 1 week ago

@terzo33, can you try v24.09.23?

And easiest way how to clean up sensors after changes is to delete and re-add device after the update to newer version.

Interval update for pv information is always 5 min😔😔

Another error

Screenshot_20240923_161026_Home Assistant.jpg

davidrapan commented 1 week ago

Create another debug log file for me from at least one hour.

davidrapan commented 1 week ago

Another error

That's really weird though... I wonder if is the register even correct?

terzo33 commented 1 week ago

Another error

That's really weird though... I wonder if is the register even correct?

How can I help you?

davidrapan commented 1 week ago

How can I help you?

That were just my thoughts...

Show me list of all sensors which you have there now so i can see if rest of the changes are okay.

And record for me that debug log file from at least one hour please. I'll check the data for PV sensors.

terzo33 commented 1 week ago

How can I help you?

That were just my thoughts...

Show me list of all sensors which you have there now so i can see if rest of the changes are okay.

And record for me that debug log file from at least one hour please. I'll check the data for PV sensors.

Screenshot_20240923_162740_Home Assistant.jpg

Screenshot_20240923_162745_Home Assistant.jpg

Screenshot_20240923_162748_Home Assistant.jpg

Screenshot_20240923_162752_Home Assistant.jpg

I'm recording debug log

terzo33 commented 1 week ago

@davidrapan another error🙈

Screenshot_20240923_163836_Home Assistant.jpg

I don't understand

terzo33 commented 1 week ago

@davidrapan

debug log

home-assistant_log.txt

davidrapan commented 1 week ago

Great, I'll look into it.

davidrapan commented 1 week ago

Hi @terzo33, try through that service call for reading registers read register number 109 and set the quantity to 4 (that means it will read registers from 109 to 112). Those registers contains voltage and current of your panels.

Try to read them in like 10 seconds interval and see if the values changes every call or not.

davidrapan commented 1 week ago

Little OT, could you also show me values of registers 15 and 19? Thank you!

terzo33 commented 1 week ago

Hi @terzo33, try through that service call for reading registers read register number 109 and set the quantity to 4 (that means it will read registers from 109 to 112). Those registers contains voltage and current of your panels.

Try to read them in like 10 seconds interval and see if the values changes every call or not.

Yes. Change with 1/2 minutes interval

terzo33 commented 1 week ago

Little OT, could you also show me values of registers 15 and 19? Thank you!

Screenshot_20240924_125236_Home Assistant.jpg

davidrapan commented 1 week ago

Yes. Change with 1/2 minutes interval

Can you show me?

terzo33 commented 1 week ago

Yes. Change with 1/2 minutes interval

Can you show me?

See clock

This interval is 3 min but I saw also about 2 min

Screenshot_20240924_133621_Home Assistant.jpg

Screenshot_20240924_133954_Home Assistant.jpg

davidrapan commented 1 week ago

To really have concrete results could you do 3 in a row with 1 min space in between each?

Edit: Follow up question... Is the refresh period the same for all 3? Current - Power - Voltage? (When you look at list of all sensors)

terzo33 commented 1 week ago

To really have concrete results could you do 3 in a row with 1 min space in between each?

Edit: Follow up question... Is the refresh period the same for all 3? Current - Power - Voltage? (When you look at list of all sensors)

Interval time is about 4/5 min.

I don't understand😓... other values of microinverter update with 5/6 seconds

Screenshot_20240924_134631_Home Assistant.jpg

Screenshot_20240924_135003_Home Assistant.jpg

Screenshot_20240924_135501_Home Assistant.jpg

Screenshot_20240924_135956_Home Assistant.jpg

Screenshot_20240924_140451_Home Assistant.jpg

terzo33 commented 1 week ago

Edit: Follow up question... Is the refresh period the same for all 3? Current - Power - Voltage? (When you look at list of all sensors)

Yes the same time but only for pv information.

davidrapan commented 1 week ago

Yes the same time but only for pv information.

You mean Voltage and Current also updates with 5 min interval?

terzo33 commented 1 week ago

Yes the same time but only for pv information.

You mean Voltage and Current also updates with 5 min interval?

Yes

davidrapan commented 1 week ago

Hey, open the folder with solarman code. Open file named api.py and on the row 210 REPLACE that row with following:

_LOGGER.debug(f"[{self.serial}] Returning {result_count} new values to the Coordinator. [Previous State: {self.get_connection_state()} ({self.state}), Values: {result}]")

Restart the HA and enable debug, log for a while and then attach it here, thanks.

terzo33 commented 1 week ago

Hey, open the folder with solarman code. Open file named api.py and on the row 210 REPLACE that row with following:

_LOGGER.debug(f"[{self.serial}] Returning {result_count} new values to the Coordinator. [Previous State: {self.get_connection_state()} ({self.state}), Values: {result}]")

Restart the HA and enable debug, log for a while and then attach it here, thanks.

Doesn't work

Screenshot_20240924_143824_Home Assistant.jpg

Screenshot_20240924_143908_Home Assistant.jpg

davidrapan commented 1 week ago

Only that single row you should have replaced, it looks like you removed some rows after 210...

davidrapan commented 1 week ago

You accidentally removed these rows right after 210:

            now = datetime.now()
            self.state_interval = now - self.state_updated
            self.state_updated = now
            self.state = 1
terzo33 commented 1 week ago

You accidentally removed these rows right after 210:

            now = datetime.now()
            self.state_interval = now - self.state_updated
            self.state_updated = now
            self.state = 1

Done :) I'm recording debug

terzo33 commented 1 week ago

@davidrapan

I had to lighten the file

home-assistant.txt