Remote RPI system monitor

I’ve been using this great tool for a while on a few different RPi, except the host machine that’s running my HA setup. On that machine Ive been using the SystemMonitor integration instead.

Is there any reason why I couldn’t use this system_sensors on the HA machine? MQTT is running on this same machine.

I don’t see a reason that it shouldn’t work on the same machine. Depends more on how you installed Home Assistant, with Home Assistant OS it’s probably difficult and won’t survive updates.

Could someone help and tell me what I’m doing wrong!? I’m running PiHole on a pi3, and HA on a pi4, I’ve followed all the steps from Sennevds but when running “python3 src/system_sensors.py src/settings.yaml” I get this;

something whent wrong
Connected to broker
Connected to broker
Connected to broker
Connected to broker
Connected to broker
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "src/system_sensors.py", line 42, in run
    self.execute(*self.args, **self.kwargs)
  File "src/system_sensors.py", line 50, in update_sensors
    if settings['sensors'][sensor] == False:
KeyError: 'disk_use_drive1'

I’ve haven’t changed anything in ststem_sensors.py and I’m running python3 on the Pihole.

Cheers!

Had the same problem, i used the old commit https://github.com/Sennevds/system_sensors/commit/2fd00d23b315d2d9b4a99cf076d90cc86fa0edfc
and it works. Something is wrong in the latest commit but i´m not familiar enough with python to debug and PR.

do

git clone https://github.com/Sennevds/system_sensors
cd system_sensors
git checkout 2fd00d23b315d2d9b4a99cf076d90cc86fa0edfc

and then follow from step 2 from the installation https://github.com/Sennevds/system_sensors#installation

1 Like

is there any way to disable the external disk usage check? i keep getting the following warning

Template variable warning: 'dict object' has no attribute 'disk_use_Drive1' when rendering '{{value_json.disk_use_Drive1}}'

I deleted the following lines from settings.yaml

external_drives:
  Drive1: /boot/

Still I keep getting the warning.

Hi. I’m not very experienced with python but having trouble installing.
It says on this thread to install

  • psutil
  • paho.mqtt
  • pytz
    But it does not say on the github. Is this still the case?

Just follow the steps on github

Okay, will do. I don’t understand step 5. Does that go in the newly created folder?

Just execute the commands and all will be fine

Hi, I know I’m probably been simple but I’ve followed the commands and it doesn’t appear it is working for me. I’m assuming the commands listed are abbreviated?
Here is what I got in the image, I skipped step 4 as I’ve already got python3 up to date.
Could you point out what I’m doing wrong here please.

Why did yoi change to the root user to execute the commands? It doesn’t tell you to do that anywhere in the guide.

@Burningstone if you see the very top line, I tried without changing to the root user and it kept telling me it didn’t exist.
Not sure if I should delete and start again.

Did you do a git clone?

Okay delete the folder and do it again and this time follow the steps exactly.
There’s no where written to change to root (don’t do that please)

  1. git clone https://github.com/Sennevds/system_sensors.git
  2. cd system_sensors
  3. pip3 install -r requirements.txt
  4. sudo apt-get install python3-apt
  5. Edit settings_example.yaml in “~/system_sensors/src” to reflect your setup and save as settings.
  6. python3 src/system_sensors.py src/settings.yaml
1 Like

Thank you. I know it’s me doing it incorrectly but just not used to coding. Microcontroller fine, Python not so much.

I just don’t understand step 5. Do I copy the who line and paste in terminal? I’m using a headless setup btw, so can’t see the folders.

Use this to edit the file

nano ~/system_sensors/src/settings_example.yaml

Then use this to rename it

mv ~/system_sensors/src/settings_example.yaml ~/system_sensors/src/settings.yaml
1 Like

Thank you!

Do delete and start again, do I use this command

rm -r FILES/DIRECTORIES…

and then start from the beginning, git clone etc

rm -r ~/system_sensors/

Hi again. This is probably unbareable but here I go, it has not worked.
Step 3 didn’t work and then not sure if I did the next steps correctly, as an error was given.
I tried to edit the file with the commands you gave me but when using ‘nano’ a menu was brought up, so when out of that menu, a pasted the ‘mv’ command.

Can you see my error here?

Pip is not installed on your system.

Install it with

sudo apt-get -y install python3-pip

Then do the step 3 again