Coder Social home page Coder Social logo

Comments (10)

AndersHoglund avatar AndersHoglund commented on June 24, 2024

No problems last night. Nothing new in the logs. Typical, when you start logging, no problems. Will keep an eye on this.

But i did look back in history to the first time I noticed this happening, Jan 29. So now we have at least two records of this happening.
/A
Screenshot 2024-02-29 History – Home Assistant

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

Happened again last night, twice. And of course, I had no debug logging running at that time.

2024-03-08 00:00:56.613 ERROR (MainThread) [custom_components.fusion_solar.sensor] Error requesting FusionSolarKiosk data: HTTPSConnectionPool(host='uni002eu5.fusionsolar.huawei.com', port=443): Max retries exceeded with url: /rest/pvms/web/kiosk/v1/station-kiosk-file?kk=JrlNJcLJ3daMl24aN4F45PIiLxw36xax (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f70818650>: Failed to establish a new connection: [Errno -3] Try again'))

2024-03-08 01:51:41.614 ERROR (MainThread) [custom_components.fusion_solar.sensor] Error requesting FusionSolarKiosk data: HTTPSConnectionPool(host='uni002eu5.fusionsolar.huawei.com', port=443): Max retries exceeded with url: /rest/pvms/web/kiosk/v1/station-kiosk-file?kk=JrlNJcLJ3daMl24aN4F45PIiLxw36xax (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f762b93a0>: Failed to establish a new connection: [Errno -3] Try again'))

All entities seem to recover, except Lifetime energy:

Screenshot 2024-03-08 at 09-10-26 Huawei VR – Home Assistant

Turned on debug this morning to see what the data from Huawei looks like:

2024-03-08 09:11:41.917 DEBUG (SyncWorker_47) [custom_components.fusion_solar.fusion_solar.kiosk.kiosk_api] {'realTimePower': 4.193, 'cumulativeEnergy': 25062.17, 'monthEnergy': 125.15, 'dailyEnergy': 4.54, 'yearEnergy': 426.98}
2024-03-08 09:11:41.923 DEBUG (MainThread) [custom_components.fusion_solar.sensor] Finished fetching FusionSolarKiosk data in 0.323 seconds (success: True)
2024-03-08 09:11:41.924 INFO (MainThread) [custom_components.fusion_solar.fusion_solar.energy_sensor] sensor.kronkarrs_huawei_vr_jrlxxxxxxxxxxxxxxxxxx36xax_total_lifetime_energy: not available, so no update to prevent issues.

Cumulative Energy data from Huawei seems OK, but this integration returns nothing (or "not available" or "Unknown").
Can it be the glitch filter locking up? Rebooting HA fixes this.
/A

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on June 24, 2024

¯_(ツ)_/¯
I really am thinking about to just remove all code related to handling API errors and just passing data that is received from Huawei

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

Yeah, I understand your frustration. Same here. Giving up trying to hide the Huawei crap data is one way.....But please, give it one more chance. Maybe my initial "fix" using a global would work better? I could give that a try.
Or just make fewer kiosk accesses. 10min interval when Huawei updates only every 30min is a bit of a waste, 15min polling might be enough. From 144 to 96 times a day. Not sure what the Kiosk limit is. Where do I change this time interval?
/A

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on June 24, 2024

https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/blob/master/custom_components/fusion_solar/sensor.py#L91

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

Thnx. I increased access rate to once every minute, to provoke failure. Added some debug logging in energy_sensor.py to see what kind of state data we deal with when it fails.

            if entity is not None:
                _LOGGER.debug(f'{self.entity_id} State: {entity.state}')
                try:
                    current_value = float(entity.state)
                except ValueError:
                    _LOGGER.info(f'{self.entity_id}: not available, so no update to prevent issues.')
                    return

Nothing in the log as yet.
/A

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

Been logging all day yesterday and all night at 60s rate and no problems seen. Will revert to 10min rate and keep logging.
/A

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on June 24, 2024

Any update? Or can this issue be closed?

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

No incident has occurred since last report, even when trying to provoke.
But this code can still lock up and require restart in some situations, so it is still a lurking problem.

Close if you wish, I can re-open if and when it happens again. Actually, closing the issue may jinx it and provoke a failure ;-)
/A

from homeassistant-fusionsolar.

AndersHoglund avatar AndersHoglund commented on June 24, 2024

Again last night:

2024-04-08 22:50:51.441 ERROR (MainThread) [homeassistant.components.hassio.data] Error fetching hassio data: Error on Supervisor API: System is not ready with state: setup 2024-04-08 22:51:07.164 ERROR (MainThread) [metno] Access to https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned error 'ClientConnectorError' 2024-04-08 22:51:07.165 ERROR (MainThread) [homeassistant.components.met.coordinator] Error fetching met data: Update failed: 2024-04-08 22:51:07.227 ERROR (MainThread) [custom_components.fusion_solar.sensor] Error requesting FusionSolarKiosk data: HTTPSConnectionPool(host='uni002eu5.fusionsolar.huawei.com', port=443): Max retries exceeded with url: /rest/pvms/web/kiosk/v1/station-kiosk-file?kk=JrlNJcLJ3daMl24aN4F45PIiLxw36xax (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5e600b90>: Failed to establish a new connection: [Errno -3] Try again'))

from homeassistant-fusionsolar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.