<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'><span style="font-size: medium; font-family: 'Times New Roman'; background-color: rgb(255, 255, 255);">>3) Once I have this tiny web page with my temperature data in it, how </span><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);">>do I set up a micro tiny pico web server, just to serve up less than a </span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);">>dozen web pages, just on the LAN, not WAN? </span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);"><br></span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);">Well, if you can get it down to one page, you can use this little trick:</span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);"><br></span></div><div style="font-size: 12pt;"><span style="font-size: medium; background-color: rgb(255, 255, 255);"><font face="courier new, courier, monaco, monospace, sans-serif">while true; do nc -l 80 < index.html; done</font></span></div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><span style="font-family: 'Times New Roman'; font-size: medium; background-color: rgb(255, 255, 255);"><br></span></div><div>The 'nc' command is netcat. It'll only accept one request at a time and it'll always reply with that index.html (it's ignoring the URL you request), but it might work for your purposes. It might not be installed by default, but it's most likely in your distro's repository. Of course, with the above you'd have to run it sometime. If you want to do a few pages and you want it to start automatically, it might be easier just to go ahead and install Apache. Configuring it to serve a few static pages usually involves little more than installing via your repository and placing the files wherever it's expecting them. (You might try /var/www/html or /srv/www/htdocs).</div><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Ron Frazier (ALE)" <atllinuxenthinfo@techstarship.com><br><b>To: </b>"Atlanta Linux Enthusiasts" <ale@ale.org><br><b>Sent: </b>Thursday, June 6, 2013 2:24:55 PM<br><b>Subject: </b>Re: [ale] [OT] how do I monitor the "weather" in my computer room<br><br>
Hi David and all,<br>
<br>
I appreciate all the replies to my "weather" monitoring question. You
guys have brought up some interesting points and pointed out some
interesting hardware. I've read all the posts but haven't had a chance
to reply to all. I chose this one to reply to since this represents
one of the most interesting inexpensive alternatives.<br>
<br>
As to why I want to measure the temperature of the room, it's just a
quick and simple technique which is a proxy for the pc temperature. I
check the machine every day or two anyway, so I know if the fans are
running or if they're whining, etc. I also know that if the ambient is
within a certain range, then the temperatures of the pc's components
are likely to be within their normal range too. The other reason to do
that is that there is no thermostat in that room. I have to juggle the
opening of the hvac intake and supply vents to sort of balance the
temperature in that room with the rest of the house. Thus, if the
ambient gets too high, I have to open the vents a bit wider. If it
gets too cold (wasting energy), I have to close them a bit.<br>
<br>
The sensor device described in the article mentioned article measures
temperature. I also found this one, which appears to be from the same
manufacturer, which also measures humidity.<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.chinavasion.com/china/wholesale/Electronic_Gadgets/Cool_Gadgets/USB_Hygrometer_Thermometer-Server_Room_Temperature_Monitor" target="_blank">http://www.chinavasion.com/china/wholesale/Electronic_Gadgets/Cool_Gadgets/USB_Hygrometer_Thermometer-Server_Room_Temperature_Monitor</a><br>
<br>
Some other very good sensors have been mentioned. I really had to
stick to a limited budget for this purpose. The quickest and
relatively cheap option for me was to add an additional sensor to my
Oregon Scientific weather station which I already had. This unit
already has multi channel capability, so the radio signals don't
conflict. I only have to push a button on its display panel to get the
basement room temperature and humidity. This solution cost me $ 33.
This sensor is relatively good quality and can link to many Oregon
Scientific products.<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.amazon.com/dp/B000WOG90E/ref=pe_309540_26725410_item" target="_blank">http://www.amazon.com/dp/B000WOG90E/ref=pe_309540_26725410_item</a><br>
<br>
I started thinking about your comment about measuring the temperatures
in the pc. That obviously would have value since I could potentially
do all sorts of neat things with the data including remotely monitoring
it, putting it in a database, graphing it, etc. if I wanted to go to
the trouble.<br>
<br>
Then the thought hit me, WELL DUH!, the pc already has sensors in it!
In fact, I have a widget on my Gnome panel showing the cpu temp and the
hdd temps. So, I started thinking about how to extract this data.
This machine is running mint. As it turns out, I can capture temps on
the cpu, hdd's, and gpu's all from command line utilities as follows.
Lm-sensors is running, which gives some of these capabilities.<br>
<br>
ron@Bugs01 ~ $ sensors<br>
k10temp-pci-00c3<br>
Adapter: PCI adapter<br>
temp1: +42.5°C (high = +70.0°C)<br>
<br>
As far as I know, this is the cpu temperature.<br>
<br>
ron@Bugs01 ~ $ hddtemp /dev/sda<br>
/dev/sda: open: Permission denied<br>
<br>
Woops. Gotta use sudo with this one. That may make it hard to run an
automated script.<br>
<br>
ron@Bugs01 ~ $ sudo hddtemp /dev/sda<br>
[sudo] password for ron: <br>
/dev/sda: ST9320320AS: 26°C<br>
<br>
This is the temperature for that hard drive. I'm not sure if
lm-sensors is driving this or something else.<br>
<br>
ron@Bugs01 ~ $ aticonfig --adapter=1 --odgt<br>
<br>
Adapter 1 - AMD Radeon HD 6700 Series <br>
Sensor 0: Temperature - 75.00 C<br>
<br>
The ATI video driver provides this utility as far as I know.<br>
<br>
So, I can run command line utilities for each critical temperature and
get a sort of free form text output. This brings up more questions.
CAVEAT: I may not have the time to go to the trouble to implement
this. But, it's still neat to learn what options are available.<br>
<br>
1) How can I parse the relevant data for each, title and temp in a
structured format, and email it to myself with the data in the subject
line?<br>
<br>
2) How can I parse the relevant data and put in into a simple web page
as follows? I haven't written raw html in years, so forgive me if
there are errors. I'm changing the begin and end tags for this example
so this doesn't screw up email readers. The data could be put into a
table, but I don't remember how to write that code by hand. One
problem is that each command line utility outputs the answer in a
different format. This page would be updated every few minutes.<br>
<br>
*-html*<br>
<br>
*-head*<br>
*-title*<br>
Bugs01 PC - Temperature readings - 2013-06-06 - 02:03 PM<br>
*title-*<br>
*head-*<br>
<br>
*-body*<br>
Bugs01 PC - Temperature readings - 2013-06-06 - 02:03 PM*p*<br>
*p*<br>
CPU: 42.5°C*p*<br>
HDD1: /dev/sda: ST9320320AS - 26°C*p*<br>
GPU1: AMD Radeon HD 6700 Series - 75.00°C*p*<br>
*p*<br>
*body-*<br>
<br>
*html-*<br>
<br>
3) Once I have this tiny web page with my temperature data in it, how
do I set up a micro tiny pico web server, just to serve up less than a
dozen web pages, just on the LAN, not WAN? Apache would be WAY WAY
overkill for this. I don't need any security as long as the server
responds only if requests are coming from the LAN. The data goes
through the same wifi adapter whether going to the LAN or WAN, but the
source address subnet of the request would be the same as the subnet of
the server.<br>
<br>
4) How do I take the data, and stick it into a text file, spreadsheet,
or database so I can keep historical records?<br>
<br>
There are many possibilities. Again, I may not have time to implement
them, but I'd like to know your thoughts.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
<br>
On 5/29/2013 8:11 PM, David Tomaschik wrote:
<blockquote cite="mid:CAOy4Vzd1LpX+_7iOmrB1JkOFzC7u9Hg11GiQcjoJ0VaJbOJW5g@mail.gmail.com">
<div dir="ltr">Why bother measuring the temperature of the room?
Measure temperatures of the machine if you're concerned about it
overheating. If you want to measure air temperature coming into the
machine, there's an article here on using a $15 USB thermometer to
measure air temperature: <a href="https://grepular.com/Using_Linux_to_Monitor_Room_Temperature_Remotely_and_Cheaply" target="_blank">https://grepular.com/Using_Linux_to_Monitor_Room_Temperature_Remotely_and_Cheaply</a>
<div><br>
</div>
<div style="">BTW, your thermometers actually seem to be quite good.
+/- 1 deg F is very reasonable for measuring room temperature -- in
fact, I would be shocked if there was less than 1 degree of variance in
the temperature throughout the room. In the room where my always-on
computer is, the variance is about 8 degrees from one area to another,
so unless the thermometer is placed very carefully, 1 degree is
insignificant. What would be more interesting is if a given
thermometer is stable, or tends to have readings that float around.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, May 29, 2013 at 2:47 PM, Ron Frazier
(ALE) <span dir="ltr"><<a href="mailto:atllinuxenthinfo@techstarship.com" target="_blank">atllinuxenthinfo@techstarship.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
all,<br>
<br>
I have a computer in a downstairs room that runs all the time. The
processes I have it doing generate lots of heat; and there is no hvac
thermostat there. There is a heating / air vent and return though, so
it gets some air circulation. I need to monitor the temperature in the
room from upstairs.<br>
<br>
I bought an Acurite backyard weather thermometer from home depot with
remote sensor. I put batteries in the sensor and display and verified
that the sensor is transmitting. I sat both units a foot apart in the
living room maybe 12 feed from the honeywell thermostat on the wall. I
trust the temperature reading of the honeywell more than any other
sensor I have.<br>
<br>
The honeywell says it's 73 in this room. It doesn't show decimals.<br>
My fairly nice Oregon Scientific weather station shows 73.6 in this
room.<br>
A cheap Lacross Technology weather monitor that I use to monitor
humidity in the basement says 73.9 in this room.<br>
And a cheap Lacross Technology (I think) wall clock shows 73.0 in this
room.<br>
<br>
It's actually annoying that all these sensors within 12 feet of each
other are so different. I guess I'll assume that the actual
temperature is between 73 and 74; and I think it's more toward 73.<br>
<br>
My NEW weather monitor is showing 74 or 75 on both indoor and outdoor
temp with both sensors in the same place, which probably about 1-2
degrees high. This one doesn't display decimals.<br>
<br>
In any case, while that's not ultra critical, I'm considering returning
it.<br>
<br>
So, I'm looking into other alternatives.<br>
<br>
1) Buy another more expensive weather station, like another Oregon
Scientific. That would cost $ 50 - $ 75.<br>
<br>
2) Buy a wifi or lan attached temperature sensor. That way, I could
just display the weather sensor's web page from a local 192.168.x.x
address and see the temperature in the basement room.<br>
<br>
3) Use a rpi plus a sensor to do the same thing as number 2. Would
probably cost more.<br>
<br>
4) Attach a USB temp sensor to the pc downstairs and run a web server
on it to display the temperature.<br>
<br>
Other than having a more accurate stand alone unit like the one I
bought, I like option 2 best. That way, I could set a web page up in a
small window on my monitor upstairs to show the downstairs temperature
and set it to auto reload every few minutes. Also, I could run a
script on the downstairs computer to poll the sensor periodically and
send me an email if the temperature exceeds a preset limit.<br>
<br>
Anyone know what I might use to get this done?<br>
<br>
By the way, when I was researching how to monitor my basement humidity,
I found out that any humidity sensor less than about $ 300 is probably
rubbish for precision. The tolerance is usually + / - 5%. I think
that's ridiculous, but I guess it's hard to do much better for cheap.<br>
<br>
Thanks in advance.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
<br>
<br>
--<br>
<br>
Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9
Mail.<br>
Please excuse my potential brevity if I'm typing on the touch screen.<br>
<br>
(PS - If you email me and don't get a quick response, you might want to<br>
call on the phone. I get about 300 emails per day from alternate energy<br>
mailing lists and such. I don't always see new email messages very
quickly.)<br>
<br>
Ron Frazier<br>
770-205-9422 (O) Leave a message.<br>
linuxdude AT <a href="http://techstarship.com" target="_blank">techstarship.com</a><br>
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3<br>
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU<br>
<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
David Tomaschik<br>
OpenPGP: 0x5DEA789B<br>
<a href="http://systemoverlord.com" target="_blank">http://systemoverlord.com</a><br>
<a href="mailto:david@systemoverlord.com" target="_blank">david@systemoverlord.com</a>
</div>
<pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Ale mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a>
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature">--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new email messages very quickly.)
Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT techstarship.com
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU
</pre>
<br>_______________________________________________<br>Ale mailing list<br>Ale@ale.org<br>http://mail.ale.org/mailman/listinfo/ale<br>See JOBS, ANNOUNCE and SCHOOLS lists at<br>http://mail.ale.org/mailman/listinfo<br></div><br></div></div></body></html>