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
69.74k stars 28.9k forks source link

A new inst of SolaxPower integration for X3-Hybrid-G4 doesnt show all values #115976

Open Buggxy opened 2 months ago

Buggxy commented 2 months ago

The problem

Hello, I have installed the latest SolaxPower integration today. My issue is that I can read all values but following: Unknown sensors with no update:

All other values are retrieved just fine.

My Invertor: Solax X3 Hybrid G4, Firmware: 3.006.04 + wifi Pocket Dongl

Please, any idea what can be wrong? Many thanks in advance! Igor

What version of Home Assistant Core has the issue?

System Information version | core-2024.4.3 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.12.2 os_name | Linux os_version | 6.6.25-haos arch | aarch64 timezone | Europe/Prague config_dir | /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1467 Downloaded Repositories | 2 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.04.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 28.0 GB disk_used | 10.2 GB healthy | true supported | true board | green supervisor_api | ok version_api | ok installed_addons | ESPHome (2024.4.0), Studio Code Server (5.15.0), Home Assistant Google Drive Backup (0.112.1), Advanced SSH & Web Terminal (17.2.0), File editor (5.8.0)
Dashboards dashboards | 2 -- | -- resources | 0 views | 2 mode | storage
Recorder oldest_recorder_run | April 14, 2024 at 8:14 AM -- | -- current_recorder_run | April 22, 2024 at 4:08 PM estimated_db_size | 5.43 MiB database_engine | sqlite database_version | 3.44.2
Sonoff version | 3.7.2 (eb0a208) -- | -- cloud_online | 1 / 2 local_online | 1 / 1

What was the last working version of Home Assistant Core?

Core 2024.4.3 Supervisor 2024.04.0 Operating System 12.2 Frontend 20240404.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SolaxPower

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solax

Diagnostics information

home-assistant_solax_2024-04-22T12-26-53.715Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Source: components/sensor/__init__.py:575
integration: Sensor (documentation, issues)
Entity sensor.solax_src...._yield_today (<class 'homeassistant.components.solax.sensor.Inverter'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; 

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:744
integration: Sensor (documentation, issues)
Platform solax does not generate unique IDs. ID SRC.....-19 already exists - ignoring sensor.solax_src...._run_mode

Logger: homeassistant
Source: helpers/entity.py:975

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/solax/sensor.py", line 160, in async_refresh
    sensor.async_schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_schedule_update_ha_state
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 975, in async_write_ha_state
    raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <entity unknown.unknown=unknown>

Additional information

No response

home-assistant[bot] commented 2 months ago

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

Code owner commands Code owners of `solax` 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 solax` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


solax documentation solax source (message by IssueLinks)

MaximVB86 commented 2 months ago

Same setup here, same problem Screenshot_2024-04-23-20-22-56-11_c3a231c25ed346e59462e84656a70e50 Screenshot_2024-04-23-20-21-19-05_c3a231c25ed346e59462e84656a70e50

Buggxy commented 2 months ago

yes indeed, this is what I see as well..

mvb1986 commented 2 months ago

I've reverted back to using https://github.com/wills106/homeassistant-solax-modbus, which works fine. It didn't for a while, but seems to work again since this morning.

UI Config:

Interface: TCP/Ethernet Modbus address: 1 Inverter Type: Solax polling frequency: 5 (you can choose how many seconds) IP address: IP address of your inverter/dongle. TCP port: 502 Modbus TCP

You'll get 263 entities, a lot more than what you get with this integration.

Buggxy commented 2 months ago

yes indeed, this is what I see as well..

I've reverted back to using https://github.com/wills106/homeassistant-solax-modbus, which works fine. It didn't for a while, but seems to work again since this morning.

Interesting, I've tried this yesterday and it did not work for me. Do you also use the Pocket wifi dongl, pls? I might to check this again with your setup.

mvb1986 commented 2 months ago

Yes, I use the pocket wifi dongle. The name suggests this would only would over LAN, but wifi works fine as well.

If you have a hard time finding the correct IP of your dongle do this:

Buggxy commented 2 months ago

Wow, I can confirm the Solax modbus seems to be working now! (while SolaxPower still does not) My only problem left is to properly configure the Energy tab, e.g. for battery I cannot select the "solaxbatterypowercharge" sensor value. I have learned that this is because the particular sensor has defined a different device class that is not fitting to the selection condition. Have you succeeded with the Energy tab setup too? Any magical trick?

mvb1986 commented 2 months ago

I'm happy for you.

Here are the sensors I use in my energy dashboard:

That seems to create the correct graphs and overview.

Buggxy commented 2 months ago

Strange, I can see and use the last three items. However I cannot see the 1st two (P1 import, export) even on the all sensors list.

I use following:

Grid: Today's Import Energy Today's Export Energy

S. panels: Todays yield

Battery (same): Solax battery output energy today Solax battery input energy today

I'd like to see something similar as the Solax app is showing, which makes more sense to me.

Buggxy commented 2 months ago

Also I cannot see any House Load in the Energy tab. Though it is among reported sensors.

mvb1986 commented 2 months ago

P1 import and import are related to a separate device I have connected to my digital electricity meter and is not part of the Solax system.

458x840

I should have made this clear from the beginning.

Buggxy commented 2 months ago

Oh, I see now. So you have something else on top of the inverter itself.

davosje commented 1 month ago

Hi, yesterday I updated my home assistant to 2024.5.2 (from 2024.5.0) and now only PV1 Current is still working. My setup X1 mini and wifi dongle with old firmware. Still able to curl the dongle otherwise PV1 also wouldn't work. Hope this will be fixed soon.