Jump to content
2,189 posts in this topic

Recommended Posts

11 minutes ago, Cyberdevs said:

@vector sigma

Nice work :) Thanks a lot man. Everything seems to be working fine. I just have to say I'm using my previous sensors. Haven't tested my rig with the sensors included in the package. I'll test them later and report back.

Screen Shot 2018-04-15 at 9.48.37 PM.png

Very good! No matter the kexts you installed unless too old.

Edited by vector sigma
  • Thanks 2
Link to comment
Share on other sites

10 hours ago, vector sigma said:

Guys this package: HWSensors-3_r118.pkg.zip contains an improved version of HWMonitorSMC2.app:

 

Battery (laptops) with capacity, max capacity, cycle count, temperature etc. (anyway not with VoodooBattery but works with Rehabman's kext or in a real mac)

 

@Slice, soon (tonight) I'll commit those changes, just waiting some tests here

 

Thanks!

The package is reloaded to sf.net

About VoodooBattery what is missing? AFAIK Rehabman's kext calculate temperature as current divided by constant as no real sensor exists.

  • Like 1
Link to comment
Share on other sites

1. There should be

Quote

#import "../SMART/NVMe.h"

?

 

2. No such module SystemKit?

 

3. What is the GPU-17635765476125348?

2018-04-16_07-30-07.png

 

4. Right click on HDD gives me empty window

2018-04-16_07-35-31.png

 

Link to comment
Share on other sites

16 hours ago, Slice said:

1. There should be

?

 

2. No such module SystemKit?

 

 

I didn't experience any of those issues but:

1. is referenced in the Xcode project and I didn't expect this is the issue.

2. Well, the issue is that the compiled framenwork is not present because not yet built

possible remedy, go in "Build Settings" and under "Framework Search Paths" add these if missing in two lines:

$(inherited)
${TARGET_BUILD_DIR}/SystemKit.framework

the first is a common solution, the second tells Xcode to link the framenwork in the target build dir where should be present since Xcode build it before everything. Tell me if work because until tonight I cannot try.

If that is not enough we should consider to build the framenwork separately and then add it already compiled.

Anyway the project should compile.. isn't?

16 hours ago, Slice said:

3. What is the GPU-17635765476125348?

At the moment I've no idea but I can image is a bad format argument.

16 hours ago, Slice said:

4. Right click on HDD gives me empty window

2018-04-16_07-35-31.png

 

Yesterday we experience an issue that was causing the app to crash. I'll revise the relevant part of code. In the meantime this is a command line I made to test smart with fabiosun  and contains the code already present in the app. please post the result here so that I can take a look on it (just double click on it)

Edited by vector sigma
typo
Link to comment
Share on other sites

45 minutes ago, vector sigma said:

Try this commandline please: hwsensorsmart

(cliccaci sopra e posta il risultato)

iMac-di-Fabio:~ fabio$ /Users/fabio/Downloads/hwsensorsmart 

----------------------------------------------------

disk0

ATASMARTData(vendorSpecific1: (10, 0, 1, 15, 0, 109, 99, 157, 110, 79, 1, 0, 0, 0, 3, 3, 0, 99, 97, 0, 0, 0, 0, 0, 0, 0, 4, 50, 0, 93, 93, 142, 29, 0, 0, 0, 0, 0, 5, 51, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 7, 15, 0, 84, 60, 181, 17, 51, 14, 0, 0, 0, 9, 50, 0, 95, 95, 52, 18, 0, 0, 0, 0, 0, 10, 19, 0, 100, 99, 0, 0, 0, 0, 0, 0, 0, 12, 50, 0, 96, 96, 121, 17, 0, 0, 0, 0, 0, 187, 50, 0, 1, 1, 104, 1, 0, 0, 0, 0, 0, 189, 58, 0, 96, 96, 4, 0, 0, 0, 0, 0, 0, 190, 34, 0, 67, 53, 33, 0, 19, 33, 0, 0, 0, 194, 34, 0, 33, 47, 33, 0, 0, 0, 13, 0, 0, 195, 26, 0, 88, 63, 37, 97, 114, 4, 0, 0, 0, 197, 18, 0, 100, 100, 6, 0, 0, 0, 0, 0, 0, 198, 16, 0, 100, 100, 6, 0, 0, 0, 0, 0, 0, 199, 62, 0, 200, 200, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 100, 253, 0, 0, 0, 0, 0, 0, 0, 202, 50, 0, 100, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), offLineDataCollectionStatus: 130, selfTestExecutionStatus: 0, secondsToCompleteOffLineActivity: (174, 1), vendorSpecific2: 0, offLineDataCollectionCapability: 91, SMARTCapability: (3, 0), errorLoggingCapability: 1, vendorSpecific3: 0, shortTestPollingInterval: 1, extendedTestPollingInterval: 92, reserved: (2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), vendorSpecific4: (0, 0, 0, 0, 4, 1, 1, 1, 2, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 90, 225, 82, 15, 0, 0, 0, 0, 0, 0, 155, 7, 138, 80, 254, 1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 225, 82, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 15, 0, 0, 0, 175, 69, 225, 129, 3, 0, 0, 0, 183, 224, 67, 0, 0, 0, 0, 0, 39, 18, 0, 0, 0, 0, 152, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), checksum: 59)

SMARTValidateReadData

SMARTReadDataThresholds

----------------------------------------------------

disk1

ATASMARTData(vendorSpecific1: (1, 0, 5, 51, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 9, 50, 0, 99, 99, 16, 17, 0, 0, 0, 0, 0, 12, 50, 0, 96, 96, 152, 13, 0, 0, 0, 0, 0, 177, 19, 0, 98, 98, 19, 0, 0, 0, 0, 0, 0, 179, 19, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 181, 50, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 182, 50, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 183, 19, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 187, 50, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 190, 50, 0, 72, 58, 28, 0, 0, 0, 0, 0, 0, 195, 26, 0, 200, 200, 0, 0, 0, 0, 0, 0, 0, 199, 62, 0, 99, 99, 131, 3, 0, 0, 0, 0, 0, 235, 18, 0, 99, 99, 181, 8, 0, 0, 0, 0, 0, 241, 50, 0, 99, 99, 234, 223, 213, 57, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), offLineDataCollectionStatus: 0, selfTestExecutionStatus: 0, secondsToCompleteOffLineActivity: (104, 16), vendorSpecific2: 0, offLineDataCollectionCapability: 83, SMARTCapability: (3, 0), errorLoggingCapability: 1, vendorSpecific3: 0, shortTestPollingInterval: 2, extendedTestPollingInterval: 70, reserved: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), vendorSpecific4: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), checksum: 199)

SMARTValidateReadData

SMARTReadDataThresholds

------------------------------------------------

BSD Name: disk0

Product Name: MAXTOR STM3250310AS                     

Product Revision Level: 3.AAC   

Serial Number: 6RY3EDGC

Medium Type: HDD

Capacity: 250,06 GB (250059350016 bytes)

Physical Interconnect: SATA

Physical Interconnect Location: Internal

Temperature: 33C°

S.M.A.R.T. status: Ok

 

------------------------------------------------

BSD Name: disk1

Product Name: Samsung SSD 840 EVO 120GB               

Product Revision Level: EXT0AB0Q

Serial Number: S1D5NEAD713475A

Medium Type: SSD

Capacity: 120,03 GB (120034123776 bytes)

Physical Interconnect: SATA

Physical Interconnect Location: Internal

Temperature: 28C°

Life: 98%

S.M.A.R.T. status: Ok

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, fabiosun said:

special version..remember :P:)

Sure, next version will show also the rotation rate for mechanical hard drives (like Rotation Rate = 7200rpm")

rpm.png.ae1582eaecf98660904140166cbafbe2.png

On 16/4/2018 at 5:46 AM, Slice said:

About VoodooBattery what is missing?

Max cycles and current cycles count. Didn't remembar if also the vendor show up.

Edited by vector sigma
apict added
Link to comment
Share on other sites

@Alpha22, thanks, your looks fine now.

On 17/4/2018 at 5:15 PM, Slice said:

I think you forgot to check an optional value != nil before unwrap it.

Can be and also due to a wrong logic. Please test this: [removed] I'm working on. running it in Xcode you should see where is crashing.

P.S. some code commented and moved, needs a clean up.

Edited by vector sigma
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Hi @vector sigma,

I made the follow change compared to rev 121

  public func temperature(_ unit: TemperatureUnit = .celsius) -> Double {
    var temperature: Double?
    if let prop = IORegistryEntryCreateCFProperty(service,
                                               Key.Temperature.rawValue as CFString!,
                                               kCFAllocatorDefault, 0) {
    
      temperature = prop.takeUnretainedValue() as! Double / 100.0
    } else {
      temperature = 0
    }
    
    switch unit {
    case .celsius:
      // Do nothing - in Celsius by default
      // Must have complete switch though with executed command
      break
    case .fahrenheit:
      temperature = Battery.toFahrenheit(temperature!)
    case .kelvin:
      temperature = Battery.toKelvin(temperature!)
    }
    
    return ceil(temperature!)
  }

That way if prop=nil then temperature=0

It is not good way but the way there is no crash at as! unwrap. The better will be to keep temperature to be optional Double.

  • Like 2
Link to comment
Share on other sites

3 hours ago, Slice said:

It is not good way but the way there is no crash at as! unwrap

Good. The following is working as well?

public func temperature(_ unit: TemperatureUnit = .celsius) -> Double {
    var temperature: Double = 0
    if let prop = IORegistryEntryCreateCFProperty(service,
                                                  Key.Temperature.rawValue as CFString!,
                                                  kCFAllocatorDefault, 0) {
      
      temperature = prop.takeUnretainedValue() as! Double / 100.0
    }
    
    switch unit {
    case .celsius:
      // Do nothing - in Celsius by default
      // Must have complete switch though with executed command
      break
    case .fahrenheit:
      temperature = Battery.toFahrenheit(temperature)
    case .kelvin:
      temperature = Battery.toKelvin(temperature)
    }
    
    return ceil(temperature)
  }

No optional value, just initialize the temperature variable.

This framenwork was a swift 3.2 converted to 4 by me, also I've made similar corrections. Later I'll send to the mantainer a pull request with our changes.

EDIT

from the same dev I found this: https://github.com/beltex/SMCKit, later I'll take a look if there's something suitable for us..

EDIT II

Slice please tell me if you have Xcode 9.3 ... some changes I want to do for newer version of Swift... a step to be ready for the incoming Swift 5

Edited by vector sigma
Link to comment
Share on other sites

6 hours ago, vector sigma said:

Ok, give me a whistle when (if) you decide to do it

I'll prefer to use Xcode7 which is able to compile Swift3 because my notebook is not compatible with HighSierra.

Link to comment
Share on other sites

28 minutes ago, Slice said:

I'll prefer to use Xcode7 which is able to compile Swift3 because my notebook is not compatible with HighSierra.

Isn't swift2 shipped with it? swift3 comes with Xcode8. Anyway macOS 10.4 will have Swift 5 embedded... the stable one. I don't think you are able to compile the project with it, I'm wrong?

Edited by vector sigma
Link to comment
Share on other sites

Hi, I can try to add multiple xcode .lproj and detect the Xcode version available to chose the right one. Swift 4, 4.1 and 5 I think will use the actual code with different settings. For Swift 3.2 compatibility I can try but I dind't have old Xcode to test with yet.

EDIT

Compatibility is only meant when the code syntax is old, like was written in swift 3, but HWMonitorSMC is written in Swift 4 instead. That means that cannot be compiled in Xcode 7 nor in Xcode 8, no way.

Edited by vector sigma
Link to comment
Share on other sites

×
×
  • Create New...