StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
561 stars 199 forks source link

HACS integration wont work with my microinverter SUN-M80G3-EU plus SUN-MI-RELAY-01 #467

Open schlaufon opened 10 months ago

schlaufon commented 10 months ago

image

See above my data when connected via browser to the inverter/logger. I can see all data on my iPhone with the solarman app and also with the windows browser on my laptop. The thing is working.

HOWEVER I do not get ANY information in HA. All entities / sensors are labeled "unbekannt" (=unknown) or in case of "status" ist "disconnected".

I have tried all yamls (deye_hybrid, deye_2mppt, dey_string). None is working. 1 week now , no avail of any data.

Is it possible that this mandotary relay that is connected between the inverter and the mains, causes trouble for the integration?

Please advise!

schlaufon commented 10 months ago

image This is result when installing 1.4.3 . Why renaming the entities?

Murlwauf commented 10 months ago

I have the same problems with this.

Nappyy commented 10 months ago

Same Problem here. SUN-M80G3-EU-Q0 Firmware: MW3_16U_5406_2.32-D1

jfreak80 commented 10 months ago

Same here. But glad, it seems to be not my fault :-)

Pompom009 commented 10 months ago

I have the same problems with this.

stephan101 commented 10 months ago

Same probleme. If a check the console i see the error: ... 2023-12-25 12:32:28.802 WARNING (SyncWorker_1) [custom_components.solarman.solarman] Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values] 2023-12-25 12:32:29.224 WARNING (SyncWorker_1) [custom_components.solarman.solarman] Querying [1 - 125] failed, [1] retry attempts left 2023-12-25 12:32:29.349 WARNING (SyncWorker_1) [custom_components.solarman.solarman] Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values] .....

foundnobetter commented 10 months ago

Same here.

Deye SUN600G3-EU-230 working with Relay firmware MW3_16U_5406_2.32-D1 (It was on Firmware MW3_16U_5406_1.57 before installing the Relay but was not integrated in HA)

Serial starts with 41. So maybe i have to switch to "component for V4 of the protocol" as stated in documentation. I have no idea how to do the switch. Any advise? Thanks

`KeyError: 'solarman' 2023-12-25 12:49:24.341 WARNING (SyncWorker_9) [custom_components.solarman.solarman] Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values] 2023-12-25 12:49:24.654 WARNING (SyncWorker_9) [custom_components.solarman.solarman] Querying [1 - 125] failed, [1] retry attempts left 2023-12-25 12:49:24.768 WARNING (SyncWorker_9) [custom_components.solarman.solarman] Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values] 2023-12-25 12:49:25.189 WARNING (SyncWorker_9) [custom_components.solarman.solarman] Querying [1 - 125] failed, [0] retry attempts left 2023-12-25 12:49:25.189 WARNING (SyncWorker_9) [custom_components.solarman.solarman] Querying registers [1 - 125] failed, aborting. 2023-12-25 12:49:45.568 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry 192.168.201.30 for solarman Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 557, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solarman/init.py", line 28, in async_unload_entry hass.data[DOMAIN].pop(entry.entry_id)


KeyError: 'solarman'`
foundnobetter commented 10 months ago

Update on this issue: It works! As stated here https://github.com/StephanJoubert/home_assistant_solarman/issues/407

you have to

And dont forget to restart HA And do not update to Version 1.51!

schlaufon commented 10 months ago

Update on this issue: It works! As stated here #407

you have to

  • remove solarman integration 1.51 from HACS
  • install solarman integration 1.43 from HACS
  • If you need the deye_2mppt.yaml, as me -- copy deye_2mppt.yaml to config/cutom_components/solarman/inverter_definitions -- add 'deye_2mppt.yaml', to section Lookup_files in config/cutom_components/solarman/const.py

And dont forget to restart HA And do not update to Version 1.51!

Which firmware version runs on your SUN "device" ?

Could you be so kind an d show a pic of your const.py ?!

Because I do not understand your work around (if it is). The _LookupFiles are well defined in the const.py . Why copying it again into const.py ?

Here my screenshot:

image

foundnobetter commented 10 months ago

Deye SUN600G3-EU-230 working with Relay firmware MW3_16U_5406_2.32-D1.

Your const.py ist correct. There is no 2mppt after you downgrade from 1.51 to 1.43. Thats the reason i added it manually.

`from datetime import timedelta

DOMAIN = 'solarman'

DEFAULT_PORT_INVERTER = 8899 DEFAULT_INVERTER_MB_SLAVEID = 1 DEFAULT_LOOKUP_FILE = 'deye_hybrid.yaml' LOOKUP_FILES = [ 'deye_2mppt.yaml', 'deye_4mppt.yaml', 'deye_hybrid.yaml', 'deye_sg04lp3.yaml', 'deye_string.yaml', 'sofar_lsw3.yaml', 'sofar_wifikit.yaml', 'solis_hybrid.yaml', 'solis_1p8k-5g.yaml', 'sofar_g3hyd.yaml', 'sofar_hyd3k-6k-es.yaml', 'zcs_azzurro-ktl-v3.yaml', 'custom_parameters.yaml' ]

MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)

CONF_INVERTER_HOST = 'inverter_host' CONF_INVERTER_PORT = 'inverter_port' CONF_INVERTER_SERIAL = 'inverter_serial' CONF_INVERTER_MB_SLAVEID = 'inverter_mb_slaveid' CONF_LOOKUP_FILE = 'lookup_file'

SENSOR_PREFIX = 'Solarman' `

schlaufon commented 10 months ago

Deye SUN600G3-EU-230 working with Relay firmware MW3_16U_5406_2.32-D1.

Your const.py ist correct. There is no 2mppt after you downgrade from 1.51 to 1.43. Thats the reason i added it manually.

`from datetime import timedelta

DOMAIN = 'solarman'

DEFAULT_PORT_INVERTER = 8899 DEFAULT_INVERTER_MB_SLAVEID = 1 DEFAULT_LOOKUP_FILE = 'deye_hybrid.yaml' LOOKUP_FILES = [ 'deye_2mppt.yaml', 'deye_4mppt.yaml', 'deye_hybrid.yaml', 'deye_sg04lp3.yaml', 'deye_string.yaml', 'sofar_lsw3.yaml', 'sofar_wifikit.yaml', 'solis_hybrid.yaml', 'solis_1p8k-5g.yaml', 'sofar_g3hyd.yaml', 'sofar_hyd3k-6k-es.yaml', 'zcs_azzurro-ktl-v3.yaml', 'custom_parameters.yaml' ]

MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)

CONF_INVERTER_HOST = 'inverter_host' CONF_INVERTER_PORT = 'inverter_port' CONF_INVERTER_SERIAL = 'inverter_serial' CONF_INVERTER_MB_SLAVEID = 'inverter_mb_slaveid' CONF_LOOKUP_FILE = 'lookup_file'

SENSOR_PREFIX = 'Solarman' `

Wow! I confirm your solution works with me. ThanX alot.

image

I'd like to add that the installation is tricky, if you are not familiar with a downgrade process. Such as I am. For me that is just to much fiddling around and NOT a proper solution with an integration (even if not official and a HACS repository. I' d like to thank @StephanJoubert . I hope has spends a splendid Xmas season and will return in good shape for a new year and some additional fixing. Looks like he's out of the project since a month or two. Hope he will come back. Fingers crossed.

For starters let me repeat the steps to downgrade.

  1. Go to the installed repositories in HACS(probably Solarman 1.5.1) and DELETE that completely.
  2. Check with your file editor, that all files in "custom components" under solarman are gone.
  3. Search in HACS now for the solarman repository. DOWNLOAD Version 1.5.1 (!!!!).
  4. Install the Solarman
  5. Reboot HA
  6. Go to the solarman files -as @foundnobetter describes above- and DOWNLOAD the 'deye_2mppt.yaml' (it will be stored on your PC where any other downloaded files go, normally under Windows into the file drawer "downloads"
  7. Repeat now steps 1. and 2.
  8. Search in HACS now for the solarman repository. DOWNLOAD Version 1.4.3 (!!!!).
  9. DO NOT Install the Solarman yet from HACS!
  10. Reboot HA
  11. Go NOW to the solarman files -as @foundnobetter describes above- and UPLOAD the 'deye_2mppt.yaml' from your PC drive INTO the folder with all the other solarman components into the folder inverter definitions:

image

  1. PLUS now Change the const.py by adding one line in LOOKUP_FILES = [ 'deye_2mppt.yaml', .......]
  2. Make sure there ist a commata "," behind your added line
  3. ONLY NOW install Solarman from HACS
  4. Choose "deye_2ppt.yaml" in the pop-up, together with you device ID (=logger, NOT inverter), and the IP.
  5. Almost done.
  6. Reboot HA

Have fun!

P.S.: to do all this you need HA with a file editor . I do not remember if new installations of HA come with it, or whether it has to be added manually. Just for just....

image

foundnobetter commented 10 months ago

One more offtopic hint: Within HA, for me Studio Code Server is way better than File editor.

stephan101 commented 10 months ago

Hey,

the solution above works for my deye SUN-M80G3-EU plus SUN-MI-RELAY-01 Relay firmware MW3_16U_5406_2.32-D1.

For the ID i use the logger ID (39xxxxxxxx) not the microinverter ID (23xxxxxxxx). I see the PV1, PV2 current/voltage, Total AC Output Power (Active) and so on.

Only same parameters are not filled: Communication Prototocal Version, Hardware Version, Update Time,....

I don't understand realy whats the difference between 1.51 an 1.43.

One hint: If I downgraded in hacs the solarman version I had to wait > 1 minute befor i pressed the Button Download. If I was too fast, i always downloaded the version 1.51. But may be the reason for this is my old hardware (Raspberry Pi 2 Model B with debian bookworm).

Thanks a lot Stephan

1bieber commented 10 months ago

I've the same issue with my SUN-M80G3-EU with firmware MW3_16U_5406_2.32-D1. Since a few days all my solarman sensors switched to "unknown" state. Honestly I was not able to trace it back to an update or something else. I appriciate the solution mentioned before here but I'm very lazy. Therefore the question: Is there any chance to just wait for an update to fix the issue?

schlaufon commented 10 months ago

I've the same issue with my SUN-M80G3-EU with firmware MW3_16U_5406_2.32-D1. Since a few days all my solarman sensors switched to "unknown" state. Honestly I was not able to trace it back to an update or something else. I appriciate the solution mentioned before here but I'm very lazy. Therefore the question: Is there any chance to just wait for an update to fix the issue?

I doubt that @StephanJoubert is listening these days. The amount of "unfinished" issues has formed quite a queue. I do no see any other developer involved in this rerpository. Sad enough. So, this might take a long while before fixed...

I am lazy too, plus I do not have any mood to play with .yaml files. However I took the steps (1.to17.) described above and it worked. Just give it a try! Good luck!

stheid commented 9 months ago

Is the issue with this inverters caused by the changes in the inverter definitions (yaml) or in the 1.5.x changes inside the code?

1bieber commented 9 months ago

I've the same issue with my SUN-M80G3-EU with firmware MW3_16U_5406_2.32-D1. Since a few days all my solarman sensors switched to "unknown" state. Honestly I was not able to trace it back to an update or something else. I appriciate the solution mentioned before here but I'm very lazy. Therefore the question: Is there any chance to just wait for an update to fix the issue?

I doubt that @StephanJoubert is listening these days. The amount of "unfinished" issues has formed quite a queue. I do no see any other developer involved in this rerpository. Sad enough. So, this might take a long while before fixed...

I am lazy too, plus I do not have any mood to play with .yaml files. However I took the steps (1.to17.) described above and it worked. Just give it a try! Good luck!

Thanks!

Small feedback from my side: I removed the solarman integration completely and bought a TP-Link Tapo P110 smart plug (10-15€) which works really great. There is a really well working HACS integration which deploys daily and monthly generated energy sensors out of the box. I really enjoy this smart plug combinated with the HACS integration in HA, especially for energy components.

stheid commented 9 months ago

After trying it out myself, the whole issue boils down to:

derklausi commented 7 months ago

Thanks for this Link, i think it will work for me too with 1.43 ... hoping for sun tomorrow to see :-)

Kolbi commented 7 months ago

So in conclusion the inverter definition is alright? Need to see what changed from 1.4.3 to 1.5.1.

After trying it out myself, the whole issue boils down to:

Kolbi commented 7 months ago

I guess it's related to switching to https://github.com/jmccrohan/pysolarmanv5

schlaufon commented 7 months ago

@Kolbi ????

jmccrohan commented 6 months ago

I've released pysolarmanv5 v3.0.2 which (I hope) will resolve the issues with Deye Microinverters.

Kolbi commented 6 months ago

Can someone please try to uninstall Solarman via HACS, restart HASSIO, install Solarman again and restart again? I guess then latest pysolarmanv5 should be used.

derklausi commented 6 months ago

Hi, can someone, who is using Deye Microinverters test the new Version V5 to see if it now works again? I downgraded to v4, so its more work for me to test and re downgrade if its not working. If someone has not downgrade it would be easy to test and give feedback.

TheYoshy commented 6 months ago

For me it works now (Deye SUN-80G3-EU + relaybox). Updatet today directly from 1.4.3 to 1.5.1. THX

derklausi commented 6 months ago

Hi, ok, i also did it, updated from 1.4.3 to 1.5.1 directly. Deye Sun M80G3 (MW3_16U_5406_2.32-D1) and two Sun 600-G3 (MW3_16U_5406_2.32-D1) are working. All with Relay Boxes. I'm just a litte bit confused, because 1.5.1 was the Version before. Is it replaced under the same Version Number? Thank you very much!!!

jmccrohan commented 6 months ago

Hi, ok, i also did it, updated from 1.4.3 to 1.5.1 directly. Deye Sun M80G3 (MW3_16U_5406_2.32-D1) and two Sun 600-G3 (MW3_16U_5406_2.32-D1) are working. All with Relay Boxes. I'm just a litte bit confused, because 1.5.1 was the Version before. Is it replaced under the same Version Number? Thank you very much!!!

The Solarman integration doesn't include a versioned depends on pysolarmanv5, so by reinstalling you are getting the same version of Solarman v1.5.1, but the latest version of pysolarmanv5 (v3.0.2).

bhuebschen commented 6 months ago

i can confirm that 3.0.2 and deye_2mppt.yaml works with SUN-M80G3-EU-Q0 after upgrading from 1.4.3 to 1.5.1

flxhaas commented 6 months ago

I'm seeing:

Logger: custom_components.solarman.solarman Source: custom_components/solarman/solarman.py:88 Integration: Solarman (documentation, issues)

Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values]

After complete un-/reinstall

:-(

fresse68 commented 6 months ago

Deye SUN600G3-EU-230 working with Relay firmware MW3_16U_5406_2.32-D1. Your const.py ist correct. There is no 2mppt after you downgrade from 1.51 to 1.43. Thats the reason i added it manually. `from datetime import timedelta DOMAIN = 'solarman' DEFAULT_PORT_INVERTER = 8899 DEFAULT_INVERTER_MB_SLAVEID = 1 DEFAULT_LOOKUP_FILE = 'deye_hybrid.yaml' LOOKUP_FILES = [ 'deye_2mppt.yaml', 'deye_4mppt.yaml', 'deye_hybrid.yaml', 'deye_sg04lp3.yaml', 'deye_string.yaml', 'sofar_lsw3.yaml', 'sofar_wifikit.yaml', 'solis_hybrid.yaml', 'solis_1p8k-5g.yaml', 'sofar_g3hyd.yaml', 'sofar_hyd3k-6k-es.yaml', 'zcs_azzurro-ktl-v3.yaml', 'custom_parameters.yaml' ] MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) ...

I love you so much, schlaufon

1.5.1 didnt work for me with a Deye M80 and firmware MW3_16U_5406_1.57

jmccrohan commented 6 months ago

I'm seeing:

Logger: custom_components.solarman.solarman Source: custom_components/solarman/solarman.py:88 Integration: Solarman (documentation, issues)

Querying [1 - 125] failed with exception [V5FrameError: V5 frame contains invalid start or end values]

After complete un-/reinstall

:-(

Please enable debug logging and attach same.

Add the following to configuration.yml:

logger:
  logs:
     custom_components.solarman: debug
jasonkaisersmith commented 3 months ago

I have the same issue here, but I have a DEYE SUN-M80G4-Eu-Q0

schlaufon commented 3 months ago

with SUN-M80G3-EU plus SUN-MI-RELAY-01 it still works. Maybe open another thread or consult DEYE about the difference. I am sorry I cannot assist in this matter. Good luck! @jasonkaisersmith

Paddel0815 commented 2 months ago

I also have the 'Deye SUN-M80G3-EU-Q0' and unfortunately, I can't read anything. Which SN should be entered now? And which version should be running? Screenshot_20240822_115934_Chrome