A quick and easy way to get the temperature of your Raspberry Pi with a single command. Built in NodeJS.
Requires NodeJS.
The suggested usage is npx
, because that way you'll always be running the latest version of pitemp
without installing it. npx
is installed by default with npm
. You can get npm
by installing NodeJS.
npx pitemp
// pitemp is reporting every X seconds.
// Main: 62.322° C - Max: 62.322° C
You can install pitemp
globally with your favorite package manager.
npm install -g pitemp
yarn global add pitemp
Then simply run pitemp
with the command.
pitemp
// pitemp is reporting every X seconds.
// Main: 61.323° C - Max: 62.826° C
- Default:
1
Change the interval (in seconds) at which the temperature is reported.
Reports a more verbose log of your temperature.
npx pitemp -v -t 3
Machine | Operating System | Working |
---|---|---|
Raspberry Pi 4 (4GB RAM) | Ubuntu 20.04 | Yes! |
MacBook Pro | MacOS Catalina | Yes! |
Windows (Intel) | Windows 10 | Yes! |
If you test this somewhere, please create an issue with your information on your machine and operating system so we can add it to this compatibility table.
Try these steps only after you've tried the package and received bad results.
- In some cases, you'll need to install the linux sensors package to be able to measure temperature. For example, on DEBIAN based systems, you can install them
sudo apt-get install lm-sensors
.
- Ensure you're running
cmd
with administrator privileges.
- Ensure you've installed Xcode CLT, or force a fresh install by:
- Get the path of your current Xcode CLT.
xcode-select --print-path
- Delete it.
sudo rm -r -f /Library/Developer/CommandLineTools
- Install Xcode CLT.
xcode-select --install
- Get the path of your current Xcode CLT.
If you're still facing issues, create an issue and I'll try my best to help you out.