corvy
(Corvy)
July 9, 2024, 10:49pm
61
Thanks, I see the issue is connected with the SQLite version combined with old DB schemas and that some install methods had an earlier upgrade of SQLite, and now “we all got it” because of Alpine updates.
ggaljoen
(Ggaljoen)
July 10, 2024, 5:42am
62
Have the same recorder issue and added “auto_purge: false” (without result).
But now I notice a higher power consumption, is that also related?
When recorder freezes, after restart, the CPU load falls to its normal value.
Read before ask could have helped me…
frenck
(Franck Nijhof)
July 10, 2024, 7:33am
63
Opened up a pull request to block icloud3 from breaking the Home Assistant recorder:
home-assistant:dev
← home-assistant:frenck-2024-0403
opened 07:25AM - 10 Jul 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## 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.
-->
Block the current version of the `icloud3` custom integration, as it breaks the Home Assistant recorder.
https://github.com/gcobb321/icloud3/issues/349
As the issue isn't fixed, we don't know the upcoming fixed version, hence I've set it to the `current version` + `patch`.
The alternative, is to set `None` as the fixed version, but that downside of that is: When the issue is fixed upstream, it will still be blocked.
## 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
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] 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:
## 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] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] 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.
<!--
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+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
4 Likes
frenck
(Franck Nijhof)
July 10, 2024, 8:01am
64
Opened up a pull request to block older versions of places from breaking the Home Assistant recorder:
home-assistant:dev
← home-assistant:frenck-2024-0404
opened 07:59AM - 10 Jul 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## 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.
-->
Block known breaking versions of the `places` custom integration, as it breaks the Home Assistant recorder.
https://github.com/custom-components/places/issues/289
## 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
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] 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:
## 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] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] 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.
<!--
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+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
3 Likes
same thing happening here
PV-Joe
(Pv Joe)
July 10, 2024, 8:54am
66
I have the same problem with Home Assistant 2024.7.1
The recorder stops at 4:11 in the morning.
I have none of the mentioned integrations above installed.
Restarting Home Assistant solves the problem until the next morning.
Please InfluxDB is still recording and the data isn‘t lost using Grafana.
Please solve the problem as soon as possible.
I don‘t like loosing all data from my energy dashboard
tom_l
July 10, 2024, 9:05am
67
So you have the first issue. For which a temporary solution is available in the first post.
1 Like
frenck
(Franck Nijhof)
July 10, 2024, 9:10am
68
Opened up a pull request to block older versions of hass-variables from breaking the Home Assistant recorder:
home-assistant:dev
← home-assistant:frenck-2024-0405
opened 09:08AM - 10 Jul 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## 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.
-->
Blocks custom integration `variable` older than `3.4.4` as those cause issues with the Home Assistant recorder.
https://github.com/enkama/hass-variables/issues/120
## 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
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] 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:
## 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] I have followed the [perfect PR recommendations][perfect-pr]
- [ ] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] 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.
<!--
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+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
2 Likes
frenck
(Franck Nijhof)
July 10, 2024, 9:19am
69
I think those three custom integrations cover the second issue set out in the OP.
The first issue has been fixed on dev, and will be shipped in 2024.7.2.
My goal is to ship it today.
…/Frenck
11 Likes
corvy
(Corvy)
July 10, 2024, 9:29am
71
Will it (it being the SQLite DB rewrite) really be merged in 2024.7.2? The github issue still refers it to be a fix for 2024.8. Smart fix for the custom integrations
PV-Joe
(Pv Joe)
July 10, 2024, 9:30am
72
Thanx for pointing out the temporary solution.
I added the lines to my configuration.yaml
Now I have seen that Frenck is working on a 2027.2 update.
I wonder if that solves the problem.
Do I have to delete the lines in my configuration.yaml after updating to 2027.2?
corvy
(Corvy)
July 10, 2024, 9:36am
74
Wonderful! This is very good! Thanks for the link and confirmation.
I’ve read the release note. Is this going to result in a full states table rebuild for those of us on mariadb as well? It’s difficult to find any information because only sqlite has been mentioned in all the talk about this bug (and mariadb as far as I can tell from my own instance doesn’t seem to have any problems), but presumably this patch will change the database version number, so will affect those of us not using sqlite as well?
DrBando
(Dr Bando)
July 10, 2024, 12:33pm
78
Thats good news, thanks!
I’ve two questions: is it possible to reactivate icloud3 again without locking up the database because just the requests are blocked?
And: if I would migrate from SQLite to MariaDB or Influx, would that help as well?
Thanks in advance.
bdraco
(J. Nick Koston)
July 10, 2024, 12:56pm
79
The problem was unique to SQLite and did not affect MySQL/maria/postgresql so there is no table rebuild for those engines.
The SQLite states table rebuild does not increment the schema version since it’s not a change in schema, its only a table rebuild to remove the old legacy schema that some systems have since SQLite currently has no way to drop a foreign key without a table rebuild. If your system was created with newer schema, this issue would never happen. It only affected older systems.
The MySQL/maria/postgresql engines have a different issue where the recorder runs out of IDs, but that only happens when you record massive amount of data over a long time. That is fixed in 2024.8.x, and you will see a migration to schema 44 there for those engines but it’s very unlikely that you have this problem unless you record 100000+ states per day.
6 Likes
Thanks for confirming that, and providing a bit more insight into things. You’re a star.
verwoest
(Timo Verwoest)
July 10, 2024, 5:52pm
81
Just installed 2024.7.2 and removed the workaround. But issue remains: recorder does not work (energy dashboard and history graphs stop showing data).
At reboot:
Logger: homeassistant.setup
Source: setup.py:406
First occurred: 19:55:29 (1 occurrences)
Last logged: 19:55:29
Setup of ‘recorder’ is taking longer than 300 seconds. Startup will proceed without waiting any longer
Logger: homeassistant.setup
Source: setup.py:248
First occurred: 19:55:39 (4 occurrences)
Last logged: 19:57:43
Unable to set up dependencies of ‘history’. Setup failed for dependencies: [‘recorder’]
Unable to set up dependencies of ‘energy’. Setup failed for dependencies: [‘history’, ‘recorder’]
Unable to set up dependencies of ‘logbook’. Setup failed for dependencies: [‘recorder’]
Unable to set up dependencies of ‘default_config’. Setup failed for dependencies: [‘energy’, ‘history’, ‘logbook’]
Logger: homeassistant.setup
Source: setup.py:271
First occurred: 19:55:39 (4 occurrences)
Last logged: 19:57:43
Setup failed for ‘history’: Could not setup dependencies: recorder
Setup failed for ‘energy’: Could not setup dependencies: history, recorder
Setup failed for ‘logbook’: Could not setup dependencies: recorder
Setup failed for ‘default_config’: Could not setup dependencies: energy, history, logbook