After an eternity of waiting Current Cost have finally made their IAMS available to buy. One might have expected a fanfare, we’ve been waiting for these for over a year now, but there was nothing, no blog post, no tweet, nada. Thankfully Kevin Turner (@netcompsys) spotted them for sale. For those not familiar with the IAMS (Individual Appliance Monitors) when used in conjunction with a Current Cost monitor (compatible with Trec, Envi, EnviR ,EnviRW) an IAM allows you to measure the electricity usage for an appliance. Multiple IAMS can be used with a single monitor to give you an overview of your total usage.
As you can see from the graphs at the bottom of this post there’s clearly something not quite right with my fridge-freezer. Every hour for half an hour it uses 400 Watts. Lets do a couple of calculations and find out what this really means in electricity usage and how much money I’m frittering away.
400 / 2 == 200 (Watts per hour) - half 24 * 0.2 == 4.8 (kWh) 4.8 * 365.25 == 1753 (kWh per year)
You read that right. It’s using 4.8kWh a day! Most modern fridge freezers use around 300kWh a year, depending on their size, and I’m using nearly six (6) times that. Let’s say I’m paying 12.5 pence per kWh. In one year my current fridge-freezer is costing me £219.13 versus £39.50 if I were to buy a new one – that’s £179.63 difference. If I pick a new fridge-freezer that uses less than 300kWh a year the saving increases. I could almost buy a new fridge freezer each year with the money I’m wasting!
As you can see, being able to measure what’s going on by using the IAMS has highlighted that I really need to replace my existing fridge freezer with something much more efficient.
Taking another look at the graph you can see one other area that needs to be looked at. Those computers are eating a lot of electricity. Only this morning did I get round to plugging my laptop into an IAM to measure it’s power use. 45W .. all day .. every day.. Let’s just say that it’s prime for replacement but also that it does now get powered off when it’s not being used.
So, get measuring and get saving!
Finally, upgraded the TV after living with a 28″ Sony CRT for 14 years. If I’m honest I didn’t really spend much time thinking about which TV to pick, I went for the LG32LD350. So far the TV has worked perfectly and has the added bonus of a serial port. LG don’t hide what this port is for, in fact the protocol and port settings are in the user manual. This is a real breath of fresh air. Look at Sony with their Control-S / Control-L protocols that they didn’t really want you to use. So that’s put LG in my good books and I hope they continue to supply this information. I was also intrigued to get copies of both the GPL and LGPL licences with the documentation. Another project to take a look at.. but later.
Straight away I decided to get working on some serial port control interface. As I said the documentation is there but control needed to be very simple. Luckily I’d already got a SheevaPlug for my birthday in February, so I was just a case of connecting this to the TV with a USB to RS232 device and a Null modem adapter or and serial cable. The USB Serial port uses the PL2303 so is detected without issue. The serial port settings are nothing special, standard console settings
Baud rate : 9600 bps Data length : 8 bits Parity : None Stop bit : 1 bit
I installed apache2 and php on the SheevaPlug and set about building a test class to control it. It works, although it needs some tidying up. If you want to try it out you can download it. It makes use of the PHP serial class, which I’ve included in the tarball.
LGTV.php - Main class control.php - Example script channels.csv - Channel list data.csv - Command list
Configuration and setup is simple. After including the class we create an instance
include('LGTV.php'); $tv = new LGTV;
There are a couple of variables that we can set, first of all we set the setId. This should match the id of your TV set, configured from its “Options” menu. If you use a value of 0x00 then all TV sets connected would respond to all the commands issued. I guess this could be useful if you had a big wall of screens or were using them as in store displays or something.
The default serial port is set as /dev/ttyUSB0 but you can change this using the tty variable.
$tv->tty = '/dev/ttyS0';
Next we need actually try and connect to the TV. If all is well the result of the serialInit command will be true.
$stat = $tv->serialInit();
You can now send commands and query the TV set. By default the variable confirm is true. This means that after you send a command and that command is executed, the class will also query the TV for its current state of that command. In other words if your TV has a current volume of 10 and you request a volume of 9 the command will execute and then will return the current volume. In this example it should be 9. This allows you to verify that a command has taken place, although it does mean that two commands are sent to the TV, not just one. You can disable this by using
You should remember to end your script by closing the serial port
Take a look at control.php to see some basic example code. Please note that this is a preliminary release which I’ll keep updating.
October 2, 2010 22:12
Current Electricity Use (15min)
- automated home
- Automated It Technology News
- My Acer page
- My Asterisk pages
- My Work in progress (old)
- Noble Race Car
- openmoko / neo 1973 wiki
- planet openmoko
- Spadgecock Cumpants