Closed HorlogeSkynet closed 6 years ago
I have a few Raspberry's laying around here that I would use this on.
As to your questions:
Hey @AdJaGu, glad to hear from you !
1 Okay so this point is checked (I've modified the OP to transform points into checklist)
2 Yeah we'd be definitely using the measure_temp
option of vcgencmd
, as it's the only temperature-relative command
4 I don't entirely get what you meant there, but I disagree with time-based computations as Archey executions are not "persistent"
5 Actually I'd like to make this feature working with Laptop / Desktop systems (without vcgencmd
) too (with the help of the files present within the second path). It would be based on simple computations with values contained there
I could push a new branch with a first prototype, to support further discussion. I'd like to hear other voices too !
@++ 👋 Samuel
EDIT : I've got a working branch !
But there is a problem with the '°' character with locales not supporting unicode (like my Raspberry's)... Related to #5
So are we supposed to display temperatures with 'oC' or 'oF' ?
Another problem : Opening and reading these files is slow... It'll be ~250 ms slower, so this is acceptable I think...
Thanks !
On my Raspberry :
On my laptop :
Tell me what you think about that 👌
There is a branch to test this feature : feature/temperature
I'd wait for many opinions before merging that. For now, your feedbacks are welcome !
Got my Pi 3 with fresh Raspbian on it and have tested this and it works well and runs fast.
Time to execute the script on Pi 3:
Time to execute script on Desktop:
On my Pi 3 I was able to get the degree symbol to display by using ctrl-shift-u + 00b0
.
https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
The below picture shows archey after having applied my edits to it. If this works for you too, would this fix #5?
I have added a pull request with the changes I made. Pull #11
Hey @AdJaGu, thanks for your answer !
°
, I think merging your PR #11 would break backward compatibility for systems with non-Unicode locales (as the @batizisanya's one in #5 when ∅
was present). Although temperature with o
is somehow ugly, I think we should keep it. Or maybe we could "externalize" this character in "options" at the top of the file too ?I'll bring new changes to the branch soon : CPU and GPU distinct temperatures for Raspberry
I'm starting to think also to really externalize these top "options", maybe another branch in the future ?
Bye 👋
Would \xb0F
and \xb0C
work and still be backward compatible?
I'm really not an encoding expert, but the thing is these are just ways to display the same character, but non-Unicode locales can't display Unicode characters...
@HorlogeSkynet I am not familiar with encoding either. I have always used en_US.UTF-8
.
If Unicode is not guaranteed then I would use one of the following and drop ° completely.
Temperature: 54.8 C
or Temperature 54.8 Celsius
.
Yeah we totally can.
vcgencmd
formats the output as XX'C
(surely for the same reason as above...).
We just have to make a choice then !
Okay we are getting closer to a feature merging with 0ae471ccdb7d1d3ab0209123fa822bdd0c76e29f. Maybe we should wait a bit for other advices or comments ?
Any feedback would be good anyway, bye 👋
Closing here as PR opened (#12)
Hey visitor / user !
I'm thinking about adding a new entry for hardware temperature.
This is what it would do :
/opt/vc/bin/vcgencmd measure_temp
for Raspberry (GPU temperature)/sys/class/thermal/thermal_zone*/temp
filesSome questions still opened for you :
lm-sensors
or would we be satisfied with files listed above ?Authentic or future users, feel free to discuss this below 👌
Bye 👋