krbaker / hass-sunpower

Home Assistant SunPower Integration using the local installer ethernet interface.
Apache License 2.0
49 stars 22 forks source link

Use of deprecated constants STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING #55

Closed bdurrett closed 1 month ago

bdurrett commented 4 months ago

Sharing from the log file that requested I submit a bug report here:

Logger: homeassistant.components.sensor Source: helpers/deprecation.py:205 Integration: Sensor (documentation, issues) First occurred: 12:33:14 PM (6 occurrences) Last logged: 12:33:14 PM

STATE_CLASS_MEASUREMENT was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues STATE_CLASS_TOTAL was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues STATE_CLASS_TOTAL_INCREASING was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues

stovedoctor commented 3 months ago

is this something we can fix or wait for a update?

jd3073 commented 3 months ago

Exact same issue, with these additional variables reported:

Logger: homeassistant.const Source: helpers/deprecation.py:205 First occurred: February 11, 2024 at 3:01:52 AM (16 occurrences) Last logged: February 11, 2024 at 3:01:59 AM

DEVICE_CLASS_POWER was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues DEVICE_CLASS_VOLTAGE was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.VOLTAGE instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues DEVICE_CLASS_CURRENT was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.CURRENT instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues DEVICE_CLASS_TEMPERATURE was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues DEVICE_CLASS_POWER_FACTOR was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER_FACTOR instead, please create a bug report at https://github.com/krbaker/hass-sunpower/issues

krbaker commented 1 month ago

I will try to get to this, I'm happy to take a patch, TBH I'm not using this right now (I switched to using an Enphase Envoy to read the panels.. side note: don't do this, I was told it was supported, its not)

heyhewmike commented 1 month ago

(I switched to using an Enphase Envoy to read the panels.. side note: don't do this, I was told it was supported, its not)

I believe SunPower uses custom firmware on the Enphase MIs.

krbaker commented 1 month ago

Sadly it works (at least 99%) but they won't support it (the way I heard what they were saying was 'sunpower won't let us'). The panels I have use IQ7XSs which were only sold attached to 360w Sunpower AC panels. My PVS had stopped reporting data as they seem to do a lot. That, along with all of sunpowers data corruption I was super fed up so I asked enphase and at the time the answer I got was yes, it will work. So I had it running for ~9 months because they told me it would. The Envoy is way better than the PVS and Enphase support is awesome.

My panels for some reason stopped reporting on an automatic firmware update to the Envoy. In the process of debugging the customer support folks noticed the sunpower panels and said they couldn't support that configuration. I even sent them the previous comms and they said 'sorry, that was incorrect'. I ended up getting it working again by removing and re-adding the panels but its clearly not going to be well supported (after this 'fixing' things I'm actually curious if this was just a general bug unrelated to the Sunpower inverters)

Why is Enphase awesome?

sg1888 commented 1 month ago

Sadly it works (at least 99%) but they won't support it (the way I heard what they were saying was 'sunpower won't let us'). The panels I have use IQ7XSs which were only sold attached to 360w Sunpower AC panels. My PVS had stopped reporting data as they seem to do a lot. That, along with all of sunpowers data corruption I was super fed up so I asked enphase and at the time the answer I got was yes, it will work. So I had it running for ~9 months because they told me it would. The Envoy is way better than the PVS and Enphase support is awesome.

My panels for some reason stopped reporting on an automatic firmware update to the Envoy. In the process of debugging the customer support folks noticed the sunpower panels and said they couldn't support that configuration. I even sent them the previous comms and they said 'sorry, that was incorrect'. I ended up getting it working again by removing and re-adding the panels but its clearly not going to be well supported (after this 'fixing' things I'm actually curious if this was just a general bug unrelated to the Sunpower inverters)

Why is Enphase awesome?

  • A real, supported local API.. it has less data than this hack manages to pull (per panel only gets current watts) but still, they actually allow me to get my data.
  • They allow and support self-install. You have to complete a training but its quite reasonable and then you get access to your system as if you were an installer.
  • They will try and help with almost anything. They were willing to work through setting up a grid profile to enable frequency-watt scaling that works with the Powerwall and is compliant with my local grid. This give the powerwall very fine control over the solar output so it doesn't have to keep bouncing between full and no power from the solar.

Great insights about the Enphase. Sadly, my system has the older integrated Sunpower/SolarBridge inverters so I can't make the switch. I also had issues with the PVS - my PVS5 stopped working last year. The PVS has a 10 year warranty, so Sunpower replaced it with a PVS6. The PVS has a 10 year warranty - did you ever ask SunPower to replace it?

I also have some issues with the PVS. Two months after I received the replacement, the PVS stopped reporting data to SunPower (though I was still able to access production data from your add-on). TBH, I'm not sure if the constant polling is causing the unit to fail, or if the extra power draw from the travel router is causing the problems.

kpfleming commented 1 month ago

or if the extra power draw from the travel router is causing the problems.

I am not using a travel router, and have the earlier version of the PVS6 with dual Ethernet ports, so I don't have anything pulling power from the PVS... and I have the same 'reporting failure' issues.

We're really far off the topic of this issue though, and should move to some sort of Sunpower+HA self-help group :)

krbaker commented 1 month ago

Adding this as it looks like the same class of error Logger: homeassistant.const Source: helpers/deprecation.py:206 First occurred: 3:07:49 PM (16 occurrences) Last logged: 3:08:54 PM

DEVICE_CLASS_POWER was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER instead, please report it to the author of the 'sunpower' custom integration DEVICE_CLASS_VOLTAGE was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.VOLTAGE instead, please report it to the author of the 'sunpower' custom integration DEVICE_CLASS_CURRENT was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.CURRENT instead, please report it to the author of the 'sunpower' custom integration DEVICE_CLASS_TEMPERATURE was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please report it to the author of the 'sunpower' custom integration DEVICE_CLASS_POWER_FACTOR was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER_FACTOR instead, please report it to the author of the 'sunpower' custom integration

krbaker commented 1 month ago

Found MOAR Logger: homeassistant.const Source: helpers/deprecation.py:206 First occurred: 4:19:55 PM (11 occurrences) Last logged: 4:19:57 PM

ELECTRIC_POTENTIAL_VOLT was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead, please report it to the author of the 'sunpower' custom integration ELECTRIC_CURRENT_AMPERE was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricCurrent.AMPERE instead, please report it to the author of the 'sunpower' custom integration TEMP_CELSIUS was used from sunpower, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'sunpower' custom integration

stovedoctor commented 1 month ago

Is there something we need to add/edit to our configuration or will a updated version fix issue?

krbaker commented 1 month ago

I'm in the process of cleaning them up, its just a matter of switching which constant its using (so far), the PR above solves a bunch, I should get to the rest in a bit.

edit for clarity.. the PR above will go into a new release, once available and updated it should be fixed.