Cumbers

Entries tagged as ‘CurrentCost’

So now I have a slug with SLUGOS…..

May 28, 2008 · 4 Comments

….what should I do (aside from upload currentcost data)?! Dale has an excellent post about the installation, and for me it was pretty much the same. The only real difference was that as Dale is very much a windows chap he used Sercomm Firmware Updater, and as I am more of a linux chap I used upslug2 to flash the device. upslug2 is a simple application that scans for slugs that are in admin mode, and then if you pass the correct parameters will go ahead and flash the firmware, very quick and easy to do!

This post is about getting the slug to be a functional mini linux box (for example the creation of a non-root user).

Bash

I prefer bash to the sh shell, so ‘ipkg install bash’ was the first installation I did. Job Done.

Who wants to be root anyway?

I am primarily an Ubuntu user, have been now for over 2 years and am very happy with it. I like the lack of root user, although you can configure it, and the more or less enforced use of sudo. So my first task was to add a user that was not root, and setup sudo. I started trying to use ‘useradd’, but it was not there, but swapping the two words to ‘adduser’ brought up what we come to expect. a cryptic message stating that I should use ‘adduser {OPTIONS] username‘. Note the lack of mentioning what the actual options could be! A quick google search and I found the following: http://tinylogin.busybox.net/TinyLogin.html which on it details the required options and what to do with them, and thus I constructed: ‘adduser -s /bin/bash -h /home/cumbers cumbers’. Next I created the user directory, chown’d it to my user and did a passwd to set my password.

sudo was just as simple as installing bash. ‘ipkg install sudo’ was all that was required, and then a visudo to edit the sudoers file. I like to use the wheel group with a password so uncommented the relevant line, and then created a wheel group using ‘addgroup wheel’.

With the two steps above I now had a system that I felt was a little more secure in my sometimes careless typing world!

Timezones and ntp

According to the tzdata packages we (the UK) are not in tzdata-europe as you would suspect, but are in fact in tzdata-misc package! A simple ln -s /etc/localtime /usr/share/zoneinfo/<final path to your locale> and I was setup. Again using the ipkg tool I installed the ntpclient and ntp-tools packages. There are various sites that deal with configuring this, so just give it a google!

Miscellaneous

I also installed the following (in no particular order)

  • findutils – gives me locate and updatedb
  • coreutils – something no admin should be without
  • tar
  • gzip
  • ncftp – powerful ftp client, including bookmarks
  • grep

What next for the slug?

The device is surprisingly repsonsive and I am looking forward to pushing it to its limits. Dale has already recompiled perl modules so that he can use the full mysql package, before find out about sqllite, but there seems to be a lot you can do with this piece of kit, so who knows maybe an mp3 server, or just a samba share point for the house! This device was bought to replace an old shuttle pc, that seemed to use about 40W to publish the data, my resting wattage in my house is now around 60, which is pretty damn good!

Categories: CurrentCost · linux
Tagged: , , , , ,

Breakdown of currentcost xml output

May 7, 2008 · 22 Comments

With all the blogject/tweetject activity going on with James Taylor, Chris Hodgins, Nick O’Leary and of course Andy-SC, and with Nick’s excellent guide to getting the data and creating custom graphs, I thought it would be good to blog about the actual xml data, and in doing so create a reference article for new people joining the currentcost foray! I do not know what all the data stands for, and this article will get updated as and when I am told/I work it out!

Updated: XML notations have been updated in line with comments to blog post. Thank you to everyone for helping with this!

<msg>
  <date>
    <dsb>00030</dsb> // This is the 'days since birth'
    <hr>00</hr><min>20</min><sec>11</sec> // The Time
  </date>
  <src>
    <name>CC02</name> // The name of the device
    <id>00077</id>  // Communication channel for device
    <type>1</type> // Hardware version of the device.
    <sver>1.06</sver> // Software version
  </src>
  <ch1>
    <watts>00168</watts> // Value from the 1st channel clamp
  </ch1>
  <ch2>
    <watts>00000</watts> // Value from the 2nd channel clamp
  </ch2>
  <ch3>
    <watts>00000</watts> // Value from the 3rd channel clamp
  </ch3>
  <tmpr>25.6</tmpr> // Current Temperature as recorded by unit
  <hist>
    <hrs> // Total Kwh used in 2 hour blocks
      <h02>000.3</h02>
      ....
      <h26>003.1</h26>
    </hrs>
    <days> // Total Kwh used per day(s)

      <d01>0014</d01>
      ....
      <d31>0000</d31>
    </days>
    <mths> // Total Kwh used per month(s)

      <m01>0000</m01>
      ....
      <m12>0000</m12>
    </mths>
    <yrs> // Total Kwh used per year(s)

      <y1>0000000</y1>
      ....
      <y4>0000000</y4>
    </yrs>
  </hist>
</msg>

Questions that I would like answered.

  • Is the data stored in persistent memory? Answered by AndySC. Yes it is flash memory :)
  • What does DSB stand for? Answered by Nick in comments below and xml above

Categories: CurrentCost
Tagged: , ,

3KW spike 2pm – 4pm

April 10, 2008 · 4 Comments

Using the CurrentCost meter and the graphing that has been setup, I noticed yesterday a 3KW spikethat lasted an hour, before dropping to 2.4KW for 40 minutes.

I had a feeling that my Storage Heaters were to blame, but wanted to double check. I am currently with Scottish and Southern Energy (SSE), and am on their SuperDeal tariff. A quick check on their website (which does not render in firefox on linux :( ) did not provide any tariff information. So after a lengthy phone call and the guy on the phone needing to refer to a book(!) I got my answer that between 2 and 4 in the afternoon I get a boost of electricity! Since then I have turned off the boost, and lowered the overall temperature on the heaters and today I am down 750W(ish) on yesterday which is a good start. Hopefully when this weather sorts itself out I can lower them further and save my precious pennies (and help “Save the Planet”!).

Categories: CurrentCost
Tagged: , ,

CurrentCost – Initial thoughts

April 10, 2008 · 13 Comments

There is a small CurrentCost craze going on at Hursley, which involves people setting up their piece of kit and seeing what cool things they can do with the data.

CurrentCost is basically an induction meter. Clamp one end to your electricity meter, and plug in the little lcd display and (fingers crossed) you should start seeing the current electricity usage of your humble abode.

There are a couple of reasons why this is cool. Firstly anyone can set this up. No need for Andy Standford-Clark skills to be up and running with this. Therefore it is something that is accessible to the masses, which is a good thing. Using this unit you can see what happens when you turn lights on, what the dishwasher has done to your power, and from this you could start changing the way you live to try and save money. Secondly (and this is the geeky part) you can get the data from the unit via a serial cable. Every 7ish seconds the unit will send data over the wire in xml format, which you can then do what you like with.

I have already spoken to one Hursleyite that has managed to save about £7 a month as he did not realise that his home hifi was drawing a large amount of power even in standby! I have just had my first full 24 hours of using the kit and will blog about my findings later…..

Categories: CurrentCost
Tagged: