Skip to content
/ temper Public

Library for accessing temperature functions from TEMPer devices

License

Notifications You must be signed in to change notification settings

taigrr/temper

Repository files navigation

temper

Latest Release Software License Go ReportCard Go Doc

A zero-dependency library to read USB TEMPer thermometers on Linux.

Configuration

On Linux you need to set up some udev rules to be able to access the device as a non-root/regular user. Edit /etc/udev/rules.d/99-temper.rules and add these lines:

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="e025", GROUP="plugdev", SYMLINK+="temper%n"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", GROUP="plugdev", SYMLINK+="temper%n"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7402", GROUP="plugdev", SYMLINK+="temper%n"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1130", ATTRS{idProduct}=="660c", GROUP="plugdev", SYMLINK+="temper%n"

Note that there are many versions of the TEMPer USB and your idVendor and idProduct ATTRs may differ.

Make sure your user is part of the plugdev group and reload the rules with sudo udevadm control --reload-rules. Unplug and replug the device.

Example Code

There are examples on how to use this repo in examples/main.go

Additionally, there is a cli-tool available at temper-cli

Acknowledgement

During my development I tested my code against the shell script found in this article.

As I only have one TEMPer device, I have sourced the product and vendor IDs for other TEMPer devices for the sample .rules file (above) from this repo.

About

Library for accessing temperature functions from TEMPer devices

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages