TEMPered: Install on Pi from source

Forums:

For Pcsensor TEMPerHum, here are the commands for the installation procedure:
sudo apt-get update # to update the lists of packages
sudo apt-get upgrade # to upgrade the software packages
sudo apt-get autoclean # to clean up by deleting extra files
sudo rpi-upgrade # to upgrade the kernel
then reboot # required after kernel upgrade

sudo apt-get install dh-autoreconf # next software packages needed before install
sudo apt-get install libudev-dev
sudo apt-get install libusb-1.0-0-dev

With the system updated and libraries installed, next install the sensor libs and program.
Use the linux standard directory for additional software. First the HID library.
cd /opt
sudo mkdir PCsensor
cd PCsensor
sudo git clone git://github.com/signal11/hidapi # the library to access the usb device
cd hidapi
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install

With the library installed, prepare to plug the TEMPerHUM into the usb hub.
Remember that all usb devices draw power that can overload the Pi, so use a powered hub.
The sensor when plugged in will need to have read and write access for all users.
The /etc/udev/rules.d will be used to set this. The TEMPerHUM has the usb ID of 0c45:7402 that can be confirmed with the command lsusb. First set the rule in the local directory.
cd udev
edit the file 99-hid.rules and make these changes:
insert a “# “ at the start of the line beginning “SUBSYSTEM”
change the line KERNEL to include “{idVendor}==”0c45” and “idProduct}==”7402”
save and exit the file then copy like
sudo cp -p 99-hid.rules /etc/udev/rules.d/.
After copying the file remove and then plug in the sensor and check by the command
ls -l /dev/hid*

With the hidapi library installed, next we will install the program to read the sensor
sudo apt-get install cmake-curses-gui
cd /opt/PCsensor
sudo git clone git://github.com/edorfaus/TEMPered
cd TEMPered
Referring to the README file using the cmake process (notice the "." at the end).
sudo ccmake .
Then the sub commands: "c" to configure then "g" to save and go
sudo make
Then the executables will be in ./utils and ./examples
I have a modification of one example and some python code to read the sensor.