petro
(Petro)
July 7, 2024, 9:10pm
52
There’s 2 separate issues. Which one do you have?
This thread was created to address issues caused by custom integrations that @tom_l has highlighted.
Separately, there’s an influx of people who have a separate (older) issue related to purge that will be addressed in 2024.8. That issue was not created by this release, it’s just more apparent with this release.
If you have issues related to purge, please check out the issue linked above . Otherwise, this is not the correct thread.
4 Likes
nickrout
(Nick Rout)
July 7, 2024, 9:21pm
53
Thanks for clarifying @petro
corvy
(Corvy)
July 8, 2024, 9:45pm
55
Just for clarity, why is the issue more apparent with this release? I have two installs, one old one that has been upgraded for years which has the DB issue, but the other (newer Install) has not.
Is it just more apparent because the history / recorder stalls in this release? What was the issue before?
Sorry for nagging. I just want to understand.
3 Likes
verwoest
(Timo Verwoest)
July 9, 2024, 5:24am
56
Yes this is a good workaround, thank you.
zigomatic
(zigomatic)
July 9, 2024, 7:30am
57
There are some HA which start 2 or 3 years ago where the schema of the DB is involving. Like mine, starting in 2021 with schema version 23 where we are now in version 43. There was no issue till an update coming with 2024.7 of Alpine version that cause sqlite dependencies and locking of database.
It’s not core HA code change or sql code purge change.
For those old db, even with new schema, they still have some difference in table (index, keys) . I’m not a DBA but it’s what I understood.
So now migration script will have to recreate some tables to remove those parts which is no more used but remains. It’s a risky process and sqlite have define some steps (12) for that where thanks to @bdraco try to resolve.
I hope this is more clear for everybody
details here : Purge causes recorder to stop writing to the DB until HA is restarted (Auto purge happens at 4:12am) · Issue #117263 · home-assistant/core · GitHub
Solution (you need to consider this for advanced users/own risk - backup and check to have enough free disk space of course !
It’s solve the issue on mine.
Link: Purge causes recorder to stop writing to the DB until HA is restarted (Auto purge happens at 4:12am) · Issue #117263 · home-assistant/core · GitHub
3 Likes
ddeconin
(Diether De Coninck)
July 9, 2024, 8:29am
58
Hi,
I encountered (probably the 1st issue).
Is there a way to write an automation to get a notification (that part I know how to do) when the recorder stops working? (that part I don’t)…
D.
zigomatic
(zigomatic)
July 9, 2024, 11:03am
59
yes, possible via a check on CPU usage and memory increasing.
2 Likes
petro
(Petro)
July 9, 2024, 11:20am
60
It’s more apparent because more people are hitting it. The bug existed long before this release but there wasn’t enough people/information to figure out what the problem was. Just take a look at the linked issue and you’ll get a history dating back before this release.
1 Like
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?