home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.96k stars 29.61k forks source link

Fronius integration did not start after core upgrade to 2023.11 #103207

Closed wiedwo closed 10 months ago

wiedwo commented 10 months ago

The problem

After upgrade HA core to 2023.11 the fronius integration did not start and no value are provided. After downgrading to 2023.10.5 the problem could be fixed (ha core update --version 2023.10.5) Unfortunately no hints in the breaking changes in 2023.11

What version of Home Assistant Core has the issue?

2023.11

What was the last working version of Home Assistant Core?

2023.10.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Fronius

Link to integration documentation on our website

https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+fronius%22

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-11-01 22:17:30.740 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fronius platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/fronius/sensor.py", line 67, in async_setup_entry
    solar_net.meter_coordinator.add_entities_for_seen_keys(
  File "/usr/src/homeassistant/homeassistant/components/fronius/coordinator.py", line 108, in add_entities_for_seen_keys
    _add_entities_for_unregistered_keys()
  File "/usr/src/homeassistant/homeassistant/components/fronius/coordinator.py", line 104, in _add_entities_for_unregistered_keys
    new_entities.append(entity_constructor(self, key, solar_net_id))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fronius/sensor.py", line 732, in __init__
    super().__init__(coordinator, key, solar_net_id)
  File "/usr/src/homeassistant/homeassistant/components/fronius/sensor.py", line 649, in __init__
    self._attr_native_value = self._get_entity_value()
                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fronius/sensor.py", line 664, in _get_entity_value
    raise ValueError(f"Ignoring zero value for {self.entity_id}.")
ValueError: Ignoring zero value for None.

Additional information

System Information

version core-2023.10.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.59
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4514 Installed Version | 1.33.0 Stage | running Available Repositories | 1327 Downloaded Repositories | 38
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 26. Mai 2024 um 02:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-6.ui.nabu.casa certificate_status | ready can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.1 -- | -- update_channel | stable supervisor_version | supervisor-2023.10.1 agent_version | 1.6.0 docker_version | 24.0.6 disk_total | 116.7 GB disk_used | 15.6 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Samba share (10.0.2), File editor (5.6.0), TasmoAdmin (0.25.1), FTP (4.7.3), Log Viewer (0.16.0), Samba Backup (5.2.0), Mosquitto broker (6.3.1), ESPHome (2023.10.5), Studio Code Server (5.13.0), Node-RED (15.0.0), MQTT Explorer (browser-1.0.1), Piper (1.4.0), Whisper (1.0.0), Node-RED Dashboard (1.3.0), Vaultwarden (Bitwarden) (0.20.1), Network UPS Tools (0.12.2), Advanced SSH & Web Terminal (15.1.0)
Dashboards dashboards | 4 -- | -- resources | 24 views | 26 mode | storage
Recorder oldest_recorder_run | 22. Oktober 2023 um 15:51 -- | -- current_recorder_run | 1. November 2023 um 22:35 estimated_db_size | 847.48 MiB database_engine | sqlite database_version | 3.41.2
home-assistant[bot] commented 10 months ago

Hey there @farmio, mind taking a look at this issue as it has been labeled with an integration (fronius) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `fronius` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign fronius` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


fronius documentation fronius source (message by IssueLinks)

farmio commented 10 months ago

Hi 👋! Thank you for reporting this issue! Could you provide some information about your Fronius devices?

Maybe you can even get some API responses (when the issue is happening - which may be at night when the inverter is not producing). This would help to understand why this issue appeared and help to avoid happening again it in the future.

FRONIUS_IP=10.1.2.5 # your ip
curl "http://$FRONIUS_IP/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData"
curl "http://$FRONIUS_IP/solar_api/v1/GetPowerFlowRealtimeData.fcgi"
curl "http://$FRONIUS_IP/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System"
curl "http://$FRONIUS_IP/solar_api/v1/GetOhmPilotRealtimeData.cgi?Scope=System"