Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one of two PV installation shown (both present on one address) #99

Closed
kuuf1986 opened this issue Mar 6, 2024 · 14 comments
Closed

Comments

@kuuf1986
Copy link

kuuf1986 commented Mar 6, 2024

hi,

I have 2 separate Zonneplan PV installations. One with 15 panels (installed in 2021) and one with 18 panels (installed in 2024). The integration only shows one of the installations. Some sensors are duplicated ('Zonneplan last measured value' / 'Zonneplan yield total') but the given values belong only to the first installation of 2021. The sensor Zonneplan yield today shows the combined value of both PV installations.

image

Debug log;
The log shows both installations and unique 'last_measured_power_value' numbers.

[{'uuid': '', 'label': 'PV Installatie', 'type': 'pv_installation', 'start_date': '2021-06-24T22:00:00.000000Z', 'end_date': '2031-06-24T22:00:00.000000Z', 'meta': {'identifier': 'Identifier of installation 1', 'name': 'Zonneplan One omvormer', 'panel_count': 15, 'panel_type': None, 'installation_wp': 5550, 'panel_wp': 370, 'first_measured_at': '2021-06-24T18:31:23.000000Z', 'last_measured_at': '2024-03-06T08:55:23.000000Z', 'last_measured_power_value': 2281, 'grid_stabilization_active': False, 'total_power_measured': 13074780, 'network': {'name': 'Onbekend', 'color': 'unknown', 'status': 'Onbekend'}, 'sgn_serial_number': '', 'module_firmware_version': 'v3.0.10', 'inverter_firmware_version': 'v3.036', 'show_in_contract_screen': False, 'enable_pv_analysis': False}}, {'uuid': '', 'label': 'PV Installatie', 'type': 'pv_installation', 'start_date': None, 'end_date': None, 'meta': {'identifier': 'Identifier of installation 2', 'name': 'Zonneplan One omvormer', 'panel_count': 18, 'panel_type': None, 'installation_wp': 7920, 'panel_wp': 440, 'first_measured_at': '2024-03-05T15:10:09.000000Z', 'last_measured_at': '2024-03-06T08:55:00.000000Z', 'last_measured_power_value': 2819, 'grid_stabilization_active': False, 'total_power_measured': 5900, 'network': {'name': 'Vodafone', 'color': 'poor', 'status': 'Slecht'}, 'sgn_serial_number': '', 'module_firmware_version': '1.2.1r', 'inverter_firmware_version': '3063', 'show_in_contract_screen': False, 'enable_pv_analysis': False}}], 'features': [], 'buttons': []}]

I removed the integration from Homeassistant and deleted it from HACS. Installed again via HACS. Rebooted and installed the integration again but this didn't resolve my issue.

I hope you can help out!

Thanks in advance!

Best regards, Ruud

@fsaris
Copy link
Owner

fsaris commented Mar 6, 2024

Looks like 2 different installs. 1 with 15 panels and 1 with 18 panels.

Was your install changed from 15 to 18 panels?

@kuuf1986
Copy link
Author

kuuf1986 commented Mar 6, 2024 via email

@fsaris
Copy link
Owner

fsaris commented Mar 7, 2024

Ah, sorry misread your first comment.

Need to investigate this further. This worked before but I suspect that the last changes broke this

@LeonJansen
Copy link

Hi @fsaris,

I don't know if it is any help, but i think the problem is in this part of the code:

  result[uuid]["live_data"] = live_data[0]

  # These params are not updated when only selecting data from before
  if not accounts and connection["live_data"]["measurements"]:
      new = connection["live_data"]["total"]
      last = connection["live_data"]["measurements"][-1]
      result[uuid]["pv_installation"][0]["meta"]["last_measured_at"] = last["measured_at"]
      result[uuid]["pv_installation"][0]["meta"]["last_measured_power_value"] = last["value"]
      _LOGGER.debug(
          "Update total power with: %d + (%d - %d)",
          result[uuid]["pv_installation"][0]["meta"]["total_power_measured"],
          new,
          old
      )
      connection["pv_installation"][0]["meta"]["total_power_measured"] += new - old

Looks like you only select the first pv_installation in the array if i'm correct?

@fsaris
Copy link
Owner

fsaris commented Mar 8, 2024

Can you provide some logs with debug data? That enables me to reproduce the situation in my test setup. You can send it to me for example using direct message on the forum https://community.home-assistant.io/u/minifranske/

@fsaris
Copy link
Owner

fsaris commented Mar 8, 2024

Are you able to view the statistics of each install separately in the Zonneplan app?

@fsaris
Copy link
Owner

fsaris commented Mar 8, 2024

Can you test version 2024.3.0b2

Each install gets its own device and the total yield is now part of a different device that holds all total values

@kuuf1986
Copy link
Author

kuuf1986 commented Mar 9, 2024

Are you able to view the statistics of each install separately in the Zonneplan app?

per PV installation I can see the momentary delivered power and the total delivered power of the installation. the grahps only show thet combined power

@kuuf1986
Copy link
Author

kuuf1986 commented Mar 9, 2024

I installed 2024.3.0b2 but don't see any difference. Only 1 device visible

image

image

(after update via hacs -> reboot -> deleted existing devices -> installed zonneplan integration)

@fsaris
Copy link
Owner

fsaris commented Mar 9, 2024

ah, sorry. tagged the wrong branch. Please try 2024.3.0b3

@kuuf1986
Copy link
Author

kuuf1986 commented Mar 9, 2024

I get this now:
Two devices:
image

First one:
image

Second one:
image

The second one shows now two unique last measured values which match both installations so this is good.
One remark; the device info mentions "Zonneplan One omvormer 18 panels door Zonneplan". While the sensors behind this device belong to both installations. So perhaps leave out the 18 panels in the name?

For the rest does this solve the issue I've initiated. I can read both installations now so that is already very nice! :) Thanks!

@fsaris
Copy link
Owner

fsaris commented Mar 9, 2024

Can you try to remove the integration and re-add it again? You should now have 3 devices.

  1. Zonneplan (totals)
  2. Zonneplan pv 1
  3. Zonneplan pv 2

Currently your PV installs are still combined

When that doesn't resolve the issue can you provide a dump of your logs with debug enabled for Zonneplan?

@kuuf1986
Copy link
Author

Reinstall did indeed create three devices, exactly as you indicated. Seems to work just fine now! Thanks!

fsaris added a commit that referenced this issue Mar 17, 2024
- Add home_battery_installation sensors #95
- Fix grouping for sensors for each PV system #99
- Link sensors to correct device and move redundant naming
- Add better entity naming, use device name
@fsaris
Copy link
Owner

fsaris commented Mar 17, 2024

Fix is released with 2024.3.0

@fsaris fsaris closed this as completed Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants