osx-temperature-sensor

OSX temperature sensor

Usage no npm install needed!

<script type="module">
  import osxTemperatureSensor from 'https://cdn.skypack.dev/osx-temperature-sensor';
</script>

README

osx-temperature-sensor

OSX Temperature Sensor library for node.js

NPM Version NPM Downloads Git Issues deps status Code Quality: Javascript Total alerts MIT license

Quick Start

This small library captures CPU temperature on macOS using SMC - all values are in degree Celsius

Installation

$ npm install osx-temperature-sensor --save

Usage

Here a small example how to use this library:

const osxTemp = require('osx-temperature-sensor');

let temperature = osxTemp.cpuTemperature();
console.log('CPU-Information:');
console.log(temperature);

News and Changes

Latest Activity

  • Version 1.0.7: updated documentation
  • Version 1.0.6: reverted license to MIT (thanks to Frank Stock)
  • Version 1.0.5: changed license to GPL
  • Version 1.0.4: Add compatibility for Node 12 and fix deprecation warnings
  • Version 1.0.3: updated issue template
  • Version 1.0.2: updated documentation
  • Version 1.0.1: updated documentation
  • Version 1.0.0: initial release

If you have comments, suggestions & reports, please feel free to contact me!

This library is used by one of my other libraries systeminformation, also available via github and npm

Reference

Function Reference

Function Comments
osxTemp.version() library version (no callback/promise)
osxTemp.cpuTemperature(cb) CPU temperature (if sensors is installed) in Celsius
- main main temperature
- cores array of temperatures
- max max temperature

This library is supposed to only work on macOS

Known Issues

I am happy to discuss any comments and suggestions. Please feel free to contact me if you see any possibility of improvement!

Comments

If you have ideas or comments, please do not hesitate to contact me.

Happy monitoring!

Sincerely,

Sebastian Hildebrandt, +innovations

Credits

Written by Sebastian Hildebrandt sebhildebrandt

Contributers

OSX Temperature: Credits here are going to:

Copyright Information

OS X aand macOS are registered trademarks of Apple Inc., Node.js is a trademark of Joyent Inc., All other trademarks are the property of their respective owners.

License MIT license

The MIT License (MIT)

Copyright © 2020 Sebastian Hildebrandt, +innovations.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Further details see LICENSE file.