Comments (9)
I've tried fixing this but have not been able to do so without breaking the overall usability.
I'm looking for someone else to code that for me and submit a pull request.
from sensor.fronius.
I have noticed the same thing...and also that the powerflow sensors are unavailable which makes the power-wheel-card show red errors about them. I have a Fronius inverter that is not yet online so i'm just preparing things in HA for when i'm allowed to power it on.
When you say that overall usability is broken when you try to fix the error in this issue. What is it that gets broken? Isn't it enough to just skip trying to round/convert the state if there is no data to work with? Or if that is not enough set up "empty" data if no data could be fetched (with empty I mean indicating that all the sensors are zero).
I'm trying to see if I can fix these issues...but right now I have a problem where the "powerflow" data isn't polled at all...only the "inverterdata" is polled, as it should. Coding HA integrations is not my dayjob so i'm still struggling to understand their async core. But I cannot understand why only one of the data objects are polling :/
from sensor.fronius.
I have a problem where the "powerflow" data isn't polled at all...only the "inverterdata" is polled, as it should
First thing is to test whether the direct URL gets any data from the Powerflow:
http://{}/solar_api/v1/GetPowerFlowRealtimeData.fcgi
Just put your IP address in the right place and try in your browser. Eg:
http://192.168.0.1/solar_api/v1/GetPowerFlowRealtimeData.fcgi
As for nighttime errors, I 100% agree that it should just skip over if it can't connect.
I just updated the code as I think I had a wrong ConnectionError handling section which I've just tweaked.
from sensor.fronius.
I know it is not getting anything...the inverter is offline :)
Which is the same as what will happen during night, afaik. Unless you configure your inverter to be always online. I expect that HA will continue to poll following the throttle settings, but it only polls one of them.
Right now I reverted back to your code without any of my changes and then I see none of them polling...which looks weird. Both calls the inverter once, at setup, but after all those exceptions due to no state, there is no more polling.
Guess it's time to sleep and continue on this tomorrow :P
from sensor.fronius.
Ok, I think I got my head wrapped around this now and it looks ok when the inverter is offline. But I would like to try it when it's online to see if something is broken then also :P
But that won't happen until earliest on Wednesday this week if the power company does what they are supposed to.
Anyway, I created a fork and uploaded my changes there if you want to look at it and maybe try it.
https://github.com/nilrog/sensor.fronius
There were two issues...
- The exception handling around the requests was not ok. Even with your latest change it threw lots of errors.
- In the sensor class the local variable 'state' could be undefined before it was used.
With these changes there is not much in the logs when the inverter is offline. It only logs that it was unable to fetch the data, everytime it tries to contact the inverter. And it tries to fetch from both urls now when all exceptions are gone.
The power-wheel-card is also happy because the sensors it needs exists...with state 'unknown' so the card shows 'NaN' in the wheel.
But, as I said, I do NOT know how it behaves if the inverter is online...yet. So I might have broken something :| Which is why I haven't sent you a pull-request yet.
from sensor.fronius.
Looks good to me and still retrieves data. I think that's where I was going with the error handling, but the state changes look good.
I'll upload it to the main branch as I've tested it and it seems Ok.
No need to submit a pull request at this point.
from sensor.fronius.
Good, thanks for the testing :)
I usually don't like to push things that I haven't been able to test myself.
Looking forward to tomorrow when I am hopefully allowed to turn on my inverter...and use your sensor for real.
from sensor.fronius.
Great, thanks a lot. No more recurring errors in the log :-)
from sensor.fronius.
Changes have been merged in to current master version. Thanks all for helping.
from sensor.fronius.
Related Issues (20)
- Failed to update: connection error HOT 4
- Not receiving data HOT 1
- Adding support for 2020.8 Energy dashboard? HOT 33
- fronius gen24 & fronius symo always 0 HOT 27
- Sugerencia HOT 3
- WARNING: 2021.9 breaks Energy dashboard derived from this component HOT 4
- Few issues with 0.9.7 HOT 2
- Fronius Battery Support in Energy Manager HOT 6
- kWh instead of MWh in day energy HOT 7
- Energy Cost Sensor - last_reset deprecation (2021.9.4→2021.9.5) HOT 4
- Solar consumption
- No Day/monthly/year Energy Data from Fronius Symo /Gen24 HOT 15
- Fronius SmartMeter Energy AC Consumed Value
- New Energy Screen shows total instead of delta values HOT 1
- Energy Usage is Compounded HOT 3
- Sensor sensor.fronius_day_energy reset to "0" at 23
- Gen24 - API + Webserver becomes unavailable HOT 3
- Received invalid command: energy/info + Failed to update: connection error
- device_state_attributes HOT 2
- SCAN Interval
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 sensor.fronius.