Akore
(Akore Jepade)
January 6, 2024, 11:28pm
1
So I had all my sensors setup and working perfectly so I could keep an eye on what my laptop that is running HAos is doing, but since the last update (I am on 2024.1.2), which they seem to be coming fast and furies now, they all show this:
tom_l
January 6, 2024, 11:33pm
2
Akore:
fast and furies
I take it this is the System Monitor integration?
If you read the release notes you will see that this has moved from YAML to the UI.
It should have imported your existing sensors so that you can delete the yaml. Check Settings → System → Logs. There will be a message about this.
Obviously something has gone wrong with the import in your case.
Go to Settings → Devices & Services. Do you see a System Monitor integration card there?
If so, what entities does it contain?
1 Like
Akore
(Akore Jepade)
January 6, 2024, 11:58pm
3
Thanks for the fast reply tom. Yeah I read the release notes so I # out all the sensors as show in attached screenshot. I checked the logs and it says nothing about the computer sensors. I do have the System Monitor integration card and it worked after the first update that was released this month but has since stopped working, it now shows unavailable, see attached screenshot:
tom_l
January 7, 2024, 12:01am
4
Are there any errors in your log related to this?
Akore
(Akore Jepade)
January 7, 2024, 12:03am
5
Non at all… I did a complete reboot of the PC and that did’nt fix it.
tom_l
January 7, 2024, 12:05am
6
I’d try deleting the integration from the UI and re-adding it. Maybe with a restart in-between.
Akore
(Akore Jepade)
January 7, 2024, 12:17am
7
Did not seem to help but then again my brain is fried for today so I will take another look at the system tomorrow and see if I can figure it out when I am able to think and see clearer. Thanks for all the help tom.
1 Like
tom_l
January 7, 2024, 12:49am
8
Just out of interest, did you also update HAOS to version 11.3 recently?
EDIT: there should be a fix for this in the next core patch release (2024.1.3). Something to do with OS 11.3 and storage mounting errors stopping the whole integration.
Issue:
opened 01:12PM - 06 Jan 24 UTC
closed 03:32PM - 06 Jan 24 UTC
integration: systemmonitor
### The problem
System monitor component was moved from YAML to being a UI inte… gration,
After migration no sensors are working.
Tried deleting the integration and starting fresh, but no sensors are created.
Reboot does not help.
Configuration function is only for processes as far as I understand?
### What version of Home Assistant Core has the issue?
core-2024.1.1
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
System monitor
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/systemmonitor
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
Here was my YAML config:
- platform: systemmonitor
resources:
- type: processor_use
- type: memory_use_percent
- type: disk_use_percent
arg: /
- type: disk_use
arg: /
- type: disk_free
arg: /
- type: throughput_network_in
arg: eth0
- type: throughput_network_out
arg: eth0
- type: network_in
arg: eth0
- type: network_out
arg: eth0
```
### Anything in the logs that might be useful for us?
```txt
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:360
Integration: Sensor (documentation, issues)
First occurred: 14:02:48 (1 occurrences)
Last logged: 14:02:48
Error while setting up systemmonitor platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/systemmonitor/sensor.py", line 393, in async_setup_entry
disk_arguments = await hass.async_add_executor_job(get_all_disk_mounts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/systemmonitor/util.py", line 22, in get_all_disk_mounts
usage = psutil.disk_usage(part.mountpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psutil/__init__.py", line 2012, in disk_usage
return _psplatform.disk_usage(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psutil/_psposix.py", line 177, in disk_usage
st = os.statvfs(path)
^^^^^^^^^^^^^^^^
BlockingIOError: [Errno 11] Resource temporarily unavailable: '/media/Media'
```
### Additional information
_No response_
Fix:
home-assistant:dev
← home-assistant:systemmonitor-handle-os-error-during-setup
opened 04:53PM - 06 Jan 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.
-->
Handle OSError during setup, warn and continue.
Main issue is the share issue in OS 11.3 but any issue with reaching a mounted disk would result in a hard stop.
## 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.
-->
- [ ] 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.
- [ ] Untested files have been added to `.coveragerc`.
<!--
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:
- [ ] 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
1 Like
Akore
(Akore Jepade)
January 7, 2024, 1:10pm
9
Yeppers! I am running 11.3
Thanks for finding that! I will wait for the core patch to be released.
chammp
(Chammp)
January 8, 2024, 11:17am
10
I have a similar problem. After the “upgrade” of YAML to UI-configuration (why does this have to be exclusive ? But that’s another topic I don’t want to go into detail about now ) the System Monitor entities disappeared from my area-based dashboards. Before, I assigned an area “Citadel System” to all devices/entities that monitor HA’s host. And after 2024.1.0, this area is empty except one template_switch I added to the mix:
All system monitor entities are still there and report (presumably) correct values when I go to Settings → Devices → System Monitor:
After the migration I reset all interesting entities to use the device’s area (which should default them to the area “Citadel System”), but that also didn’t help.
When I go to the Area (Settings → Areas), the device “System Monitor”, my template switch and the RPi Power sensor thingy are listed, but nothing appears on the standard lovelace dashboard anymore.
So if this gets resolved or someone already has resolved that problem, I’d be psyched to know about that.
Best
gjohansson
(G Johansson)
January 8, 2024, 7:00pm
11
HA OS 11.4 will be released shortly (tomorrow I think) which should fix the problem with CIFS / shares stopping System Monitor from loading correctly.
1 Like
gjohansson
(G Johansson)
January 8, 2024, 7:02pm
12
System Monitor entities are set as diagnostics and as such don’t appear on automatic dashboards (anymore). They need to manually added to dashboards to appear.
chammp
(Chammp)
January 8, 2024, 8:42pm
13
Sure, that thing I seemingly forgot. That probably changed with either the actual migration to UI or with 2024.1. Doesn’t matter, at least I do know the reason now, thanks.
Damn. Might have to actually build some dashboard now…