You need to add the attributes as per my post above .
Basically you need to go to Configuration > Customizations, select the newly created entity, ensure you have the below attributes:
state_class: measurement
device_class: energy
unit_of_measurement: kWh
Last_rest: some timestamp
Looking at some other posts in another thread we may need to add
method: left
in order to get accurate figures
Rolzzz
(Rolzzz)
August 26, 2021, 5:53am
364
hello all, I’m having trouble working out how I can calculate my kWh usage… I can see it online but would like it in my HA setup…
I can see what I’m generating… also strange why it doesn’t line up with whats online
I’ve tried so many different options with sensors, integrations etc, but I can’t find how to get something simple like this…
I’m still very very new to HA as well… about 2 weeks into it I think haha…
farmio
(Matthias Alphart)
September 9, 2021, 10:21pm
365
Hi fellow Fronians !
Im currently working on a refactoring of the core Fronius integration to have it support UI config, renaming, devices, areas etc with minimal configuration.
Unfortunately I only have a SnapInverter (no Gen24) ,1 meter in my system and no storage, so there are lots of things I can’t test on a real installation.
Maybe someone here is interested in helping out with testing .
Currently inverter, meter and storage data is implemented and I’d only run it in test HA-Installations (it creates lots of entity_registry entries that lead to orphaned entities if something gets changed later).
Edit: see next post
Looking forward to hear what you think!
If you like to join development discussion head over to
https://github.com/nielstron/pyfronius/lissues/40
2 Likes
farmio
(Matthias Alphart)
September 13, 2021, 6:59am
366
So the rewrite is finished now. Testing would still be appreciated.
home-assistant:dev
← farmio:fronius-refactor
opened 06:18AM - 13 Sep 21 UTC
2 Likes
It maybe a very basic question, but how do you get the inverter IP address? If I set a static IP address and use solar web when the wifi access point shuts down I can’t access the inverter only data via Solar.web
Rolzzz
(Rolzzz)
October 28, 2021, 9:10pm
368
When the team came in to install the inverter I made note of the mac address of the wifi then set a reservation on my DHCP server so it would always get the IP I wanted it to have.
So much nicer than setting a static IP on the unit.
And if u can get data off solar.web then ur inverter has an IP address and is connecting to the internet… I would recommend going down the reserved IP via DHCP path.
or start off with a dhcp assigned address so you know what IP it gets to get onto it’s internal website.
hth
farmio
(Matthias Alphart)
October 29, 2021, 5:17am
369
Why does this happen? Doesn’t matter how you configure the IP address, when there is no connection you can’t connect.
Wifi point auto shuts down after one hour seems to be normal configuration btw also have smart meter installed
Rolzzz
(Rolzzz)
October 30, 2021, 3:10am
371
yeah na… def not normal… I monitor my fronius via prtg and it’s always connected via wifi
disregard the weird spikes yesterday about lunch time my PRTG server wasn’t happy haha
farmio
(Matthias Alphart)
October 30, 2021, 4:55am
372
That may be true if you really use the inverter as wifi access point. This is meant for configuration. Later it should be connected to an external wifi access point or, better yet, via ethernet cable. But I guess its just a missunderstanding as I don’t think that the inverter has access to solar.web in access point mode.
That said, there is a “night mode” preventing the inverter to shut down when there is no solar production. This also enables meter readings at night.
What model do you use?
Hey there,
I had the same kind of error in my fronius symo. Datamanager disconnected from wifi multiple times a day. It was driving me mad, I also was able to trigger a disconnect with frequent polling.
Unfortunately i could not convince the installer to change the module, reasoning was “is it generating electricity or not?”…
I got this resolved by hardwiring it to lan.
Rolzzz
(Rolzzz)
November 3, 2021, 10:37pm
374
possible that it could all be wifi signal? have you got inverter outside of the house contributing to potential wifi signal issues?
Had it outside. Next to an esp for reference, the esp never lose wifi, the fronius did constantly. The wifi endpoint was on the other side of the brick wall.
Check the inverter’s firmware - there were firmware versions circa 2019 in some locations where wifi connectivity was pretty poor.
1 Like
farmio
(Matthias Alphart)
November 24, 2021, 6:15am
377
Hey !
The fronius integration is getting a big overhaul in the December release!
home-assistant:dev
← home-assistant:farmio-fronius
opened 08:00PM - 14 Nov 21 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
This is a wrapper PR which contains changes from:
- #57879
- #59677
- #60094
- #60104
- #60192
- #60215
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did this.
This piece of text is published with the release notes, so it helps if you
write it towards our users, not us.
Note: Remove this section if this PR is NOT a breaking change.
-->
The Fronius integration migrated to configuration via the UI. Configuring Fronius via YAML configuration has been deprecated and will be removed in a future Home Assistant release.
Your existing YAML configuration is automatically imported on upgrade to this release; and thus can be safely removed from your YAML configuration after upgrading.
This change will remove manual configuration of Fronius device ID's. Connected SolarNet devices will be detected automatically on startup.
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
This is a drop-in replacement of the current Fronius integration.
This integration now
- provides a ConfigFlow
- doesn't need any other configuration than the IP address or hostname of the Fronius device
- provides an import for the now deprecated yaml config
- uses DataUpdateCoordinators
- has longer update intervals when a device is not running
- creates entities with unique_ids
- assigns entities to devices
- uses SensorEntityDescription
- provides nearly all datapoints the old integration had (except for some omitted entities providing timestamp data of results which are always request time +- some milliseconds)
- is fully type checked
- is tested
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [x] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/20417
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [x] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [x] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io
Beta testers would be highly appreciated.
And if anyone happens to have a battery or Ohmpilot connected via a Fronius device, it would be great if you could send me some data so I can set up unit-tests for it. Just ping me here or via discord!
3 Likes
Dominic
(Dominic McGlinn)
November 26, 2021, 2:49am
378
i’ve to a solar system with power meter but no battery. happy to beta test. @farmio
1 Like
Dominic
(Dominic McGlinn)
December 14, 2021, 3:08am
379
new config with update is working well but my cost never seems to update correctly.
if I look at the config
this is correct and mimics the amount in my solar web, but it just isn’t calculating the total cost correctly.
also I realised I don’t have a seperate meter for my hot water system… dang it
farmio
(Matthias Alphart)
December 14, 2021, 7:09am
380
Where do you get the energy price from?
Rolzzz
(Rolzzz)
December 14, 2021, 7:34am
381
Your electricity bill should have all that… personally I couldn’t get much of HA power stuff working so went to pvputput.org