Comments (24)
Same thing happened again last night. I am testing a fix where we do not accept any new life time energy data if current power is zero. ie:
power = self.coordinator.data[self._kioskId][ATTR_DATA_REALKPI][ATTR_REALTIME_POWER]
if (power) == 0:
_LOGGER.debug(f'{self.entity_id}: new value ({new_value}) is discarded if no power is reported ({entity.state}), so not updating.')
return float(current_value)
from homeassistant-fusionsolar.
Seems to work. No bad bars on the energy page this morning.
But then there are no positive glitch anymore when looking at the "Current Year Energy" data. Has Huawei fixed this in their end at last ? Might not need to do any PR for this. Well, just have to wait and see a bit more...
/A
from homeassistant-fusionsolar.
Nah, that fix does not work. Positive glitch again this night.
But I can not really understand why it does not work? Is entity ATTR_REALTIME_POWER not available when handling life time energy? Puzzled...
/A
from homeassistant-fusionsolar.
I think Huawei is trying to minimise the impact of the kiosks on their systems. So probably some caching that is missing while they are recalculating the metrics?
from homeassistant-fusionsolar.
Yeah, some caching or time shift problem. SolarEdge cloud have similar problems, either NULL data returned or Lifetime energy lower than current year energy. They are doing nothing to fix that. Moved to Solaredge local MODBUS/TCP access instead, works OK. Will try to do the same with Huawei, once installer password is reset so I can get in there.
Until then, I will try my old fix in the api layer, modified to check for zero power and reject any new energy data then. OpenAPI might be a way fwd too, unless those glitches appear there too?
What a mess.....
/A
from homeassistant-fusionsolar.
I'm using the integration with an OpenAPI account. I don't see any glitches
from homeassistant-fusionsolar.
The fix above do work, if correct data type is used.
if (power) == '0.00':
_LOGGER.debug(f'{self.entity_id}: new value ({new_value}) is discarded if no power is reported ({entity.state}), so not updating.')
return float(current_value)
/A
from homeassistant-fusionsolar.
Will you create a PR?
from homeassistant-fusionsolar.
I have not yet moved over to this new kiosk implementation, experimenting and testing on the old one. I will PR the old one and if you want you can copy it here.
from homeassistant-fusionsolar.
See tijsverkoyen/Home-Assistant-FusionSolar-Kiosk#42
from homeassistant-fusionsolar.
The fix above do work, if correct data type is used.
if (power) == '0.00': _LOGGER.debug(f'{self.entity_id}: new value ({new_value}) is discarded if no power is reported ({entity.state}), so not updating.') return float(current_value)
/A
I've got the same problem as you with value zero glitches. I'm using the kiosk implementation as well. Where do I enter the code?
from homeassistant-fusionsolar.
The fix above do work, if correct data type is used.
if (power) == '0.00': _LOGGER.debug(f'{self.entity_id}: new value ({new_value}) is discarded if no power is reported ({entity.state}), so not updating.') return float(current_value)
/A
I've got the same problem as you with value zero glitches. I'm using the kiosk implementation as well. Where do I enter the code?
Use the older Kiosk implementation, https://github.com/tijsverkoyen/Home-Assistant-FusionSolar-Kiosk
Not sure why there are two implementations, one with the fix and one without.
Or convert to OpenAPI supported by this one.
/A
from homeassistant-fusionsolar.
You should not use the older Kiosk implementation. I will not provide any support for that on.
from homeassistant-fusionsolar.
Should be fixed in #46
I will release a new version in a few moments.
from homeassistant-fusionsolar.
You should not use the older Kiosk implementation. I will not provide any support for that on.
Thank you. I've updated it now and hope it works.
from homeassistant-fusionsolar.
Let me know. Because I don't experience these glitches. So it is really difficult for me to test
from homeassistant-fusionsolar.
Stupid me: see #46 (comment)
from homeassistant-fusionsolar.
PR: #48
from homeassistant-fusionsolar.
Let me know. Because I don't experience these glitches. So it is really difficult for me to test
The problem remains. This is how both the Energy Tab and the Database looks like when the "glitch" happend. First the sensors become unavalible and then lifetime energy becomes 0. I guess Home Assistant calculates the difference from last hour of lifetime energy and then displays it in the graph. Since the difference is 0 and 10000 the graph will look bad. I looked at the graph the hour before and there was no problem.
from homeassistant-fusionsolar.
Yeah, sorry. I has implemented it wrong. I releases 2.3.3 yesterday. Could you recheck with that version
from homeassistant-fusionsolar.
Still the same problem. First the sensors become unavalible and then zero value in total_lifetime_energy.
I think that "unavalible" and "0" should not be stored in the database. Or if you only store values in total_lifetime_energy that is the same or bigger than previous value.
from homeassistant-fusionsolar.
As I said in PR #48, those lines in custom_components/fusion_solar/fusion_solar/energy_sensor.py
should be removed:
if not isfloat(new_value):
_LOGGER.warning(f'{self.entity_id}: new value ({new_value}) is not a float, so not updating.')
return float(current_value)
if not isfloat(current_value):
_LOGGER.warning(f'{self.entity_id}: current value ({current_value}) is not a float, send 0.')
return 0
if float(new_value) < float(current_value):
_LOGGER.debug(
f'{self.entity_id}: new value ({new_value}) is smaller then current value ({entity.state}), so not updating.')
return float(current_value)
Open in file editor and do it yourself.
/A
from homeassistant-fusionsolar.
As I said in PR #48, those lines in
custom_components/fusion_solar/fusion_solar/energy_sensor.py
should be removed:if not isfloat(new_value): _LOGGER.warning(f'{self.entity_id}: new value ({new_value}) is not a float, so not updating.') return float(current_value) if not isfloat(current_value): _LOGGER.warning(f'{self.entity_id}: current value ({current_value}) is not a float, send 0.') return 0 if float(new_value) < float(current_value): _LOGGER.debug( f'{self.entity_id}: new value ({new_value}) is smaller then current value ({entity.state}), so not updating.') return float(current_value)
Open in file editor and do it yourself. /A
I removed the lines and it has been stable since. Is this fix implemented correctly in the newer versions?
from homeassistant-fusionsolar.
Yes, PR #52 was merged and included in release version 2.3.4
Case closed.
/A
from homeassistant-fusionsolar.
Related Issues (20)
- getStationList deprecated? HOT 24
- Error doing job: Task exception was never retrieved HOT 2
- All Inverter and Meter entities return "Unknown" HOT 14
- OpenAPI set battery mode HOT 1
- Help with OpenAPI account HOT 6
- Getting the most out of this great add-on HOT 11
- Division by zero HOT 2
- Daily Solar Energy sometimes exceeds the day and is displayed in the Energy Dashboard HOT 12
- New API calls HOT 9
- No entiteiten in HA HOT 16
- Integration does not work with the Huawei iSitePower-M HOT 4
- Efficiency graph in bar chart HOT 7
- Integration create too many entities HOT 3
- ACCESS_FREQUENCY_IS_TOO_HIGH HOT 21
- Alarms and automation HOT 2
- Total current year energy not available constantly HOT 7
- real time power vs active power HOT 3
- Home energy consumed HOT 31
- Expose Hourly, Daily and Monthly Plant data HOT 2
- How do i know if my installer activated the API correctly HOT 4
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.