I have hdd plug into my rp4 and I’d like to see the disk usage and how much free space I still have on it. I’m running HA in a docker. I’ve instaled Glances on Rasbian directly (not as an addon in HA) so I can see the external hdd (dev/sda1). I integrated Glances with Home Assistant but sensors show only disk where root folder is located (sd card). Platform “system monitor” didn’t work, as I assume because I’m running HA in container so home assistent doesn’t see folder /mnt/Dysk . Any ideas?
I was trying to bind the volume (mnt/Dysk) to container path /media using portainer, but no success
I have also tried to change existing path /share to /mnt/Dysk but didn’t work
I mean, the HA is running but I still don’t see sensors using systemmonitor
Use the glances API, you should see the drive there. http://Pi4-IPAddress:61208/api/3/fs, then use a rest sensor to grab the info in json format for the drive you want.
I am not really sure but /mnt/Dysk is bind to 2 different paths in container; make that one just to make sure…
My volume structure is almost the same. The screenshot you sent is under ‘homeassistant’ container, right?
This is what I use to get my drive info… (I said in my last post to use a rest sensor, that was a mistake. I use a command_line).
- platform: command_line
command: curl -X GET http://192.168.1.50:61208/api/3/fs
name: Server SSD Percentage
unit_of_measurement: '%'
value_template: '{{ value_json[0].percent }}'
scan_interval: 1800
If since you are after your ext drive, you would want to change the value_template to something else. Possible value_json[2].percent you can change percent to what ever value you want.