Comments (10)
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
from homeassistant-fusionsolar.
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:
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.
¯_(ツ)_/¯
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.
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.
from homeassistant-fusionsolar.
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.
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.
Any update? Or can this issue be closed?
from homeassistant-fusionsolar.
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.
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)
- All sensors unavailable (Kiosk) HOT 5
- Half of entities are unavailable HOT 4
- Unexpected error fetching FusionSolarOpenAPIDeviceRealKpiType data: 'NoneType' object is not iterable HOT 15
- No more entities provided HOT 63
- User/pass is output to log file. HOT 4
- Always disconnecting HOT 3
- Energy dashboard showing wrong values HOT 2
- Wrong device_class? HOT 1
- Steps in cumulative quantities. (open api) HOT 1
- Kiosk mode: SyntaxWarning: invalid escape sequence '\?' HOT 2
- Question: have you ever considered using APIs from the web portal? HOT 5
- Error requesting FusionSolarKiosk data HOT 1
- Not in coordinator data HOT 5
- Some numerical sensors do not allow to be used completely in the statistics cards HOT 6
- New entities created when updating kiosk URL HOT 1
- sensor.solar_total_lifetime_energy unknown HOT 6
- Some sensors take previous values at midnight HOT 2
- Not all kiosk sensors are present in Home assistant HOT 2
- Possible to adjust 'Active Power Adjustment'? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-fusionsolar.