Hard drive power on hours

690 views
Skip to first unread message

Meteo Oberwallis

unread,
Sep 23, 2023, 7:51:12 AM9/23/23
to weewx-user
Hello everyone
I have a Raspberry 3 B+ and an SSD is attached via USB. The operating system (Raspian) and weewx run on it. Now I would like the operating hours of the SSD to be displayed in weewx. This works, if you enter the command "smartctl --attributes "${disk}" | grep Power_On_Hours" via "smartctl", you get the operating hours of the hard drive (https://linuxconfig.org/retrieve-hard-drive -s-age-and-general-health-information-using-linux). Now it would be great if you could display this in weewx. Does anyone have an idea on how this could be implemented? You should be able to save the value of the “operating hours” in weewx?

Kind regards

vince

unread,
Sep 23, 2023, 12:55:31 PM9/23/23
to weewx-user
I would look at extensions like cmon for examples of how to approach this.

Meteo Oberwallis

unread,
Sep 24, 2023, 6:34:00 AM9/24/23
to weewx-user
Hey Vince

I have cmon and can not find the Hours from the disk. Better, when this can see z.b under the about Site form Belchertown?

vince

unread,
Sep 24, 2023, 1:08:43 PM9/24/23
to weewx-user
I was pointing you to an example as a starting point for 'you' to do the work to add that feature.
Message has been deleted

Meteo Oberwallis

unread,
Oct 22, 2023, 4:25:47 AM10/22/23
to weewx-user
Hello Vince.
I have no idea how to solve this? So, better said, how I could then display the value in the Belchertown skin under about, for example. It would also be interesting if you could display the RPI kernel version there. You can read the operating hours of the hard drive with the command in Raspian: sudo smartctl --attributes /dev/sda | grep Power_On_Hours. But how do I get this value in weewx? It should not be written into the database, but can be retrieved every day with a command and then displayed in the Belchertown skin. Or are there other ideas?
Reply all
Reply to author
Forward
0 new messages