hacking a cheap usb thermometer to send notifications about house temp
When I leave my home empty in the winter I always worry my furnace will die, causing my house to freeze (broken pipes/water damage). Commercial wifi based temperature notification systems are available (e.g. Nest), but all I've seen cost >$150. I wondered if I could use a cheap USB thermometer ($13 on Amazon) attached to an old mac laptop and have it send notifications via email.
First I bought a cheap USB thermometer. Something called the TEMPer (https://goo.gl/qRwhm6). It cost about $13. Here's an article about the TEMPer: https://www.phoronix.com/scan.php?page=article&item=ebest-temper-linux&num=1
I don't have linux box like the person writing the article above, but I do have an old mac laptop. To interact with the USB thermometer you need to install libusb. On a mac the easy way is using home brew. The following commands will install homebrew (skip if you have it) and use homebrew to install libusb:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install libusb
sudo easy_install snmp-passpersist
Next you need a gmail account to send the emails through, and you'll have to configure gmail to allow your laptop to send email via SMTP. You can do this at https://myaccount.google.com/. From the homescreen under Sign-in & Security you should see a linked called Signing in to Google. And after clicking on that link click on App passwords. It will probably ask you to enter your gmail password next. Then you need to create a new app. Under the Select the app and device you want to generate the app password for. heading, select Other (custom name) in the select app box. Give it some name (I used "python"). And click Generate. This should then give you a 16 character password that will allow our temp sensor to send emails. Copy this password and save it (but keep it secret).
Note: I don't know the security implications of this. You are creating an alternate password that can be used to access at least parts (and maybe all) of your gmail. Google generates this password, and it seems pretty strong (16 random characters). However, if you are uncomfortable with this, quit now and delete this access (there should be a trash can icon next to the newly allowed "python" app). Alternatively, create a dummy gmail account that you'll use only for this purpose.
Finally, some caveats about this approach. 1) you are going to need to leave you computer running the whole time you are gone, and it needs to not sleep, run out of power, or crash. So go in your settings and adjust accordingly. 2) You'll need stable internet at your house. In my case I used wifi, so if the connection is lost there will be no temp. notification. 3) To be notified, you'll obviously need to receive emails wherever you travel (so this isn't going to work if you go off the grid), and you'll need to check your emails semi-regularily (I'd imagine you have a day or so before your pipes freeze when it's sub-zero outside). 4) You'll also need a plan in place if your furnace does die. Like call the neighbors, or furnace repair company, and have some way for them to enter the house. 5) I don't know if this will work on Windows. There are blogs showing how to do similar things on Linux with a TEMPer themometer (see above). Regarding Linux, setting up a Raspberry Pi to do this might be a nice low-power solution (though my mac laptop uses maybe 10-20 watts with the monitor dimmed so it's not a big waste of energy).