-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to list unknown temperature sensors #17
Comments
AFAIK, not currently... I'm going to try 👍 |
Hi @MichalMMac! @perfaram is correct, SMCKitTool does not currently do this. It certainly could though, but I’m wondering, what would be the value in having such an option? Or rather, what would you like to use it for? I saw your comment about wanting to do temperature monitoring. If thats the case, then dshb is the tool you want. SMCKitTool does the same via |
Hello @beltex When I compared that output with my notes on temp sensors 4-letter codes for three different Mac models it seems to me that
|
Okay, so here I am. I started working on it nonetheless, mostly as an introduction to Swift for me. |
@MichalMMac Your absolutely right, it does only show a fixed set of temperature sensors which we know what hardware they map to more or less.
Thanks! :) I see. I had been thinking for a while about iterating through the four character codes (FourCC) for temperature sensors, but I was hesitant to do so since we would not know what they would be for exactly. However, I've gone back and looked at some of my notes on this, and I may just have a solution. I'm going to explore it further, and will get back to you as soon as I can.
@perfaram Here's one way of doing it: let data: [UInt8] = [72, 101, 108, 108, 111, 33]
var str = String()
for value in data {
str.append(UnicodeScalar(value))
}
print(str) |
@beltex Thank you My reasoning behind this is that I don't not know what exactly some temperature sensors are but I will check them anyway. If there is value like >100°C there might be some problem worth investigating. I would rather use a tool which is in active development since I don't know if my problem with smc -l is gonna be fixed. |
See my repo. I added a function to get a key by its index, and another that counts the keys, enumerate them using the previous one, then store them in a dictionary, which associates key->(value, type) |
@MichalMMac Indeed. Thus, the focus for this is only on the temperature sensors, with a new option that would be something like
Keep in mind though that #15 will become more prevalent with these extra sensors. |
@beltex Sounds good. Also having all information on single line could be easier for parsing but can manage with current format. |
Seems to run a bit slow though. This is likely due to the manner in which we have to get the keys (via SMC index). Would be nice to cache them some how, but that might be overkill. http://github.com/beltex/SMCKit/issues/17
Hi @MichalMMac! Sorry about the supremely late response, my sincerest apologies! The
Agreed! Thats done too. |
@beltex Thank you. I am going to test it but I need to install Xcode 7 in VM first. You don't have to be sorry about anything. I am not your customer and you develop this as free opensource project. I am very grateful you responded to my feature requrest :-) |
Work great! Thank you 👍
|
:)
Awesome! np! |
Feature request
Would it be possible fot smckit to display all SMC registers similiary to smc -l?
The text was updated successfully, but these errors were encountered: