Saturday, September 26, 2009

BBSB Meets Arduino (Part 3) Home Easy to BBSB Repeater

Thanks to some sample code found here, I've churned out a handly little HomeEasy to ByeByeStandby RF Repeater.
This little project will pick up selected HomeEasy Advanced Protocol devices (like the HE300 Remote and HE303 PIR) and translate them into any ByeByeStandby device code you want.
Thanks to Barnaby and Peter here, and several hacking types, here. You will need a similar 433mhz Transmitter and Receiver to my previous posts, as well as that little £12 Arduino board that you bought and havent used yet 8-)

Monday, September 21, 2009

Putting your Watts on the Web..

Several people have blogged about their solution to publishing their electricity usage online. Here's our solution: Using a CurrentCost Classic, a cool little Linksys NSLU2 (Unslung), and Pachube, the excellent cloud based sensor monitoring service.

Quite a few folks are activley monitoring using this hardware solution, but I think this solution gets the 'quick and dirty' award, as very little else is needed, the data is collected and posted using a little shell script, with no need for perl, ruby or other such stuff.
  • We got the older CurrentCost Classic as the serial data comes out a little slower (9600baud) than the newer, shiny CC128 model, which suited hooking it up to stuff that cant swallow the data rate of the newer model.
  • Get the CurrentCost USB cable as well, it has a USB/Serial converter built in , which you'll need unless you already have a separate one (CurrentCost serial port is 5v RS232, so hooking it up to a serial port directly will get you nothing or magic smoke 8-( )
  • Unsling your NSLU2 so you can telnet/SSH into it and run stuff. (see links above)
  • Hook your CurrentCost to the spare USB port on the NSLU2 (it should also work on a hub btw, but the device below may be different to mine.)
  • run dmesg and look for the device ID of the serial port that is detected - ours was /dev/ttyUSB0
  • Try this filthy script out - you'll need to edit it, to replace: YOUR_PACHUBE_API_KEY with your actual Key from your pachube account, and also your YOUR_FEED_ID in this file to get it to work. - I just have two integer values, one for watts, one for temp on this feed.
  • Two little scripts are provided get-watts , and get-temp which should just echo the data from the CurrentCost to the console, as well as update-pachube which does the biz to the pachube service.

Footnotes: You may need to do some ipkg install magic on the NSLU2, you need grep, sed, cut and curl I forget which ones are in the slugos already.

The NSLU2 is a great platform for this type of stuff, the power consumption is less than 3w according to our killawatt, with processing power to spare, for ..... more stuff in the near future 8-)


UPDATE: An abusive co-worker who is attempting to follow my vague and inaccurate posting has reminded me that there are two missing steps in this post:

  • You need to install some extra packages on your slug, I *think* these are:
  1. picocom - 1.4-1 - A minimal dumb-terminal emulation program. (you will want this to see what is happening on the com port from the current cost)
  2. libcurl - 7.19.5-1 (you need curl for the pachube posting)
  3. coreutils - 7.4-1 -(I think coreuils has cut in it, among other utilities)

(e.g # ipkg install picocom; ipkg install libcurl; ipkg install coreutils)

  • You need to install the PL2303 kernel module so the USB-To-Serial cable is recognised. (following worked for my official currentcost cable) - after doing this check with dmesg for the name of the serial port to point to for your data.

Further abusive comments welcome from anyone, if this is still not correct 8-/ - my apologies.

Friday, September 11, 2009

Hyper-V RDP Issues on Windows 2008? - Disable yer Large Send Offload.

Nasty one this - Hyper-V on Windows 2008 R2 just wouldnt give a stable network connection for remote desktop to Guests, and the host sometimes.

I spent hours searching for a solution on the net, fiddling with Netsh, MTU sizes, switches and NIC drivers, until I spotted this blog entry. Turn off the Large Send Offload setting on the NIC. POW Fixed. Thanks to Daniel Petri. No reboot required.