davidrapan / ha-solarman

⚡ Solarman Stick Logger integration for 🏠 Home Assistant
MIT License
110 stars 25 forks source link

Device Setup failed with release higher than v24.08.17 - "Device Time" parsing error #128

Closed optim1se closed 2 months ago

optim1se commented 2 months ago

Describe the bug: After Upgrade from Solarman v24.08.17 to v24.08.21, my Device(DEYE SUN-M80G3-EU-Q0) in Solarman shows: "Setup failed, retrying: [] Querying failed."

After downgrade to v24.08.17, Inverter is reachable again and Solarman is working as expected.

Attach the debug log:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.solarman.parser
Quelle: custom_components/solarman/parser.py:179
Integration: Solarman (Dokumentation, Probleme)
Erstmals aufgetreten: 10:30:29 (120 Vorkommnisse)
Zuletzt protokolliert: 10:57:22

ParameterParser.try_parse: start: 0, length: 113, [..., 12288, 0, 0, ....], definition: {'name': 'Device Time', 'class': '', 'state_class': '', 'uom': '', 'scale': 1, 'rule': 8, 'registers': [22, 23, 24], 'icon': 'mdi:clock-time-three-outline'} [ValueError: time data '48/0/0 0:0:0' does not match format '%y/%m/%d %H:%M:%S']

To Reproduce: Steps to reproduce the behavior:

  1. Update Solarman over HACS to v24.08.21
  2. Restart Homeassistant

Expected behavior: Inverter should be reachable after update to v24.08.21.

Metadata: Template type: deye_2mppt Inverter type: DEYE SUN-M80G3-EU-Q0 Version: v24.08.21

Additional context Inverter has no internet access. That may be the reason for the strange time.

davidrapan commented 2 months ago

fix: Ignore incorrect datetime while parsing

Will be part of today's pre-release.

And could you maybe check why that happened? If it's due to reading incorrect registers or maybe cause of incorrect time in the inverter?

Thanks. 😉

optim1se commented 2 months ago

Oh great, thank you very much.

Sadly i dont know how i can check the device time on a different way.

But i think it's reading the correct registers. I saw its working for one other user: https://github.com/davidrapan/ha-solarman/issues/84#issuecomment-2297105667 with maybe the same device, but with internet connection.

@CrazyUs3r Do you have an M80-G3 or G4?

CrazyUs3r commented 2 months ago

I have g3 The problem with the time is that the inverter only gets the time after starting. At the moment I'm testing it with the npt of the fritzbox but I don't think the logger gets the time. After a few minutes it pulled the time from the China server and then the error went away.

davidrapan commented 2 months ago

Ah I see, okay then. Missing time won't be a problem anymore. 👍

optim1se commented 2 months ago

@CrazyUs3r you could create an automation to write the date and/or time after startup over modbus or even every 5 minutes when the logger gets new data.

It would be nice to know, where the datetime must be changed, so that the device will increment by itself, but maybe its wasted time to search for....

@davidrapan the registers are fine. I manually changed them and the logger has reset its daily production.

optim1se commented 2 months ago

Then this can be closed. Thanks for your fast support and great work.