1
0
Fork 0
blog.kempkens.io/content/posts/2015-07-12-porting-pcsensor-to-freebsd.md

33 lines
1.7 KiB
Markdown
Raw Normal View History

2015-07-12 16:47:01 +00:00
---
2021-08-28 19:50:49 +00:00
date: "2015-07-12T18:46:00Z"
description: Introducing my port of the pcsensor utility to FreeBSD.
tags:
- pcsensor
- freebsd
- english
slug: porting-pcsensor-to-freebsd
2015-07-12 16:47:01 +00:00
title: Porting pcsensor to FreeBSD
---
Last week, it got rather hot where I live and so I got interested in measuring the temperature of the room where I keep my NAS and various other devices. I started looking for cheap USB thermometers and quickly found [this one](http://www.amazon.de/gp/product/B009RETJIO). It has some decent reviews and costs only around 16€, which seemed perfect to simply play around with.
2015-07-15 15:11:36 +00:00
The device only comes bundled with Windows software, but there is an open source utility called `pcsensor` which allows you to use it via the command line on Linux. I don't have any Linux devices in the room that I wanted to measure. Since the source code was pretty straightforward and only minimal changes were required to port the utility to FreeBSD, I did just that! You can find the ported source code on [GitHub](https://github.com/nifoc/pcsensor-freebsd).
2015-07-12 16:47:01 +00:00
2021-08-28 19:50:49 +00:00
{{< highlight text >}}
2015-07-12 16:47:01 +00:00
$ pcsensor -h
pcsensor version 1.0.3
Aviable options:
-h help
-v verbose
-l[n] loop every 'n' seconds, default value is 5s
-c output only in Celsius
-f output only in Fahrenheit
-a[n] increase or decrease temperature in 'n' degrees for device calibration
-m output for mrtg integration
-d output with Bus and Device number
-D display device list
-D[n] specific device number
2021-08-28 19:50:49 +00:00
{{< / highlight >}}
2015-07-12 16:47:01 +00:00
If you want to read the temperature from the device, you might have to prefix the call to `pcsensor` with `sudo`.