Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker
MIT License
367 stars 113 forks source link

Disk Use Error #106

Closed Ben10lightningx closed 3 years ago

Ben10lightningx commented 3 years ago

Whenever I try to run the script it runs for a minute and the gives this error.

send config message something went wrong Connected to broker bash: /usr/sbin/iwgetid: No such file or directory Exception in thread Thread-1: Traceback (most recent call last): 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 am using a raspberry pi 4b on raspberry pi os.

MaxVRAM commented 3 years ago

Hey @Ben10lightningx I've fixed this in PR #104. It was caused by the default config including a Drive1 entry under external drives. I've added a check to ignore missing drives, so you hopefully won't get any errors like this, along with a number of other small fixes.

@Sennevds is currently enjoying his new fatherhood, so doesn't have heaps of time to test and implement my fixes. If you've got a moment, feel free to clone and use my branch and comment on the PR if it works for you or not. Having several people test it and give feedback will make Sennevds' job easier.

Cheers!