My Account

Wish List (0)

Saved Carts


Approved Re-Seller
Follow us on Facebook! Follow us on Twitter! Follow us on Instagram!

How to Use the TEMPer USB Sensors

August 03, 2017

The TEMPer USB sensors are super easy to get setup on your Raspberry Pi thanks to a python library available on GitHub.

Start by installing the required packages:

sudo apt-get install python-usb python-setuptools

Once that’s installed you can proceed to clone the git to your Pi

cd ~
git clone git://

Once you have downloaded the repository you have two methods of using it:

  1. Through a simple temper-poll script
  2. Writing your own python script

To install the temper-poll script simply cd to the downloaded repository

cd temper-python

Then run the setup script

sudo python install

Once that is done, you can simply use the following command to get the temperature and humidity from the sensor


If you want to take things further and write your own script! Within the temper-python directory you will find another directory called temperusb, move into this dir.

cd temperusb

In here you will notice a couple of scripts, we are interested in the and scripts. is the actual library so we don’t need to edit that one, we just need to make sure we have a copy of it in the same directory as our own script. is a good example to base our script off of.

Start by running the script and see what happens

sudo python

As you’ll see it produces the same result as the temper-poll script.

If you get this error:

ValueError: Attempted relative import in non-package

Edit the script and change this line

from .temper import TemperHandler
from temper import TemperHandler

From here you can copy the script and edit it to suit your needs!

Last update: January 15, 2018


Leave a Comment

Leave a Reply

* Name:
* Comment:
* E-mail: (Not Published)
Website: (Site url with http://)
Verification code: