CurrentCost with Bifferboard

64 views
Skip to first unread message

d1savowed

unread,
Dec 27, 2009, 5:39:46 PM12/27/09
to Bifferboard
Hi all,
As I received a CurrentCost meter for xmas (to go with the other
three types I have) I thought I would get busy coding something to
make it usable with the Bifferboard. The device itself throws out some
nice XML every 6 seconds or so, but I wanted a slimmer way to get the
data rather than using Perl etc.

Using the example GPS code that Nelson Neves posted on here, I threw
together some code that creates a HTTP server in the background from
which you can pull either specific variables or a string of data from
the device via a GET request.

I've tested it on my board and it works great and with very little CPU
usage. I will be doing a bit more work on it as I would like to it be
capable of changing the device and listening port at runtime rather
than compile-time, and I also want to investigate getting it to push
messages itself via GET requests (though that will probably be a spin-
off).

I am quite tempted to see if I can fit one of my bifferboards into the
casing (as there seems to be a fair amount of room), so that an extra
ethernet connector can be fitted to it (or a wireless dongle) and have
it all self-contained :-)

The code is at http://www.linux-depot.com/?p=projects&s=currentcost

If anyone uses it let me know how you get on :-)

Stu

Nelson Neves

unread,
Dec 27, 2009, 6:24:46 PM12/27/09
to biffe...@googlegroups.com
Thanks for the mention and for using my code ;) !

You have really catch the trick with the http://url:port/command stuff, that's the idea!

Regards,
Nelson.


--
You received this because you are subscribed to the "Bifferboard" Google group - honest!
To unsubscribe from this group, send email to bifferboard...@googlegroups.com

d1savowed

unread,
Dec 27, 2009, 6:39:47 PM12/27/09
to Bifferboard
Hi Nelson,
Not a problem, I've also added your name in the credits within the
code (only seemed fair). I plan to do a bit more updating so that
things like the serial port and tcpip port can be changed at runtime,
just havent got round to it yet.

I still need to work on your original GPS code as it doesn't work with
my device. I have a SirfStar USB dongle which is meant to default to
NMEA but seems to default to the binary format :-(

Stu

Nelson Neves

unread,
Dec 27, 2009, 6:47:01 PM12/27/09
to biffe...@googlegroups.com

I still need to work on your original GPS code as it doesn't work with
my device. I have a SirfStar USB dongle which is meant to default to
NMEA but seems to default to the binary format :-(


I have the same problem with my module, during bifferboard boot serial port may have some speed change (or electrical noise) that is pushing the gps module into factory defaults, meaning binary mode! I have to set it with some sequenced commands to get it back to NMEA in string format!

Still have to discover what is making that ...

Regards,
Nelson.

Nelson Neves

unread,
Dec 27, 2009, 9:19:14 PM12/27/09
to biffe...@googlegroups.com
Hi again,

getting a bit more curious about your currentcost project and the CC128 device I just found that this was something that I saw some time ago but was a bit expensive at the time (current cost had release is first version at that time). I'm about to change to my new home and I had in mind such a project, using a bifferboard with a electrical power meter (Legrand module ref: 04672), BB would capture the electrical pulses and count them (1000 pulses -> 1KW). Then add some light webserver to display stats, etc .... men, I really need to top re-inventing the wheel !!! Just wanted to make something cheap and practical but from what I've checked now CC128 is selling for £39.95 (plus postage cost) in ebay, now this is really a good price! I think that I will consider this CC128 device, thanks for sharing your project!

Regards,
Nelson.

d1savowed

unread,
Dec 28, 2009, 4:48:50 AM12/28/09
to Bifferboard
Hi Nelson,
I looked at that approach originally but as I wanted something
simple and reliable moved away from it. I actually have a few
different power meters that I have written software for (see the
site), but by far the CurrentCost is the easiest. All you need to do
is listen on the serial port and straight away you get some nice
realtime xml data with your current power usage and temperature.

Now that I have a bifferboard fitted to a hub, the plan is to make it
a mini server where my power readings are captured along with my 1-
wire data (again via rs232). The data is then pushed to my bigger
server which runs it through a broker and pushes it to different
sources etc. I still plan to edit the C code and make a formatted
output for people who just want to look at it directly (think iPhone
etc), but I still want to keep it nice and small.

I'm still pretty sure that a bifferboard could fit inside a
currentcost, just the 3v power supply that is troubling me. I guess I
would have to switch to a 5v psu and drop the voltage down for the CC.
That way they could both be powered from the same supply.

Stu

Nelson Neves

unread,
Jan 18, 2010, 12:16:47 PM1/18/10
to biffe...@googlegroups.com
Hi again,

I was getting my rss feeds up to date and found something related with your project,
it can be useful for somebody else:
http://www.ibm.com/developerworks/xml/tutorials/x-ameetut/index.html

special in page 3, regarding the Envi CC128:
http://www.ibm.com/developerworks/xml/tutorials/x-ameetut/section3.html

The final result is a bit different from your project, but the basic is there!

Regards,
Nelson Neves.

ps: My interest in this still remains but I'm still 'busy'! I will go with you project of course!


Stu

d1savowed

unread,
Jan 18, 2010, 3:06:34 PM1/18/10
to Bifferboard
Hi,
That's one way to do it. My old Powermeter script written in Perl
can do the same and a lot more, but the overhead is a lot more. My C
code can be used as a backend, and uses a lot less memory. I have
modified my local ver to call the rrdtool script to do the graphing,
so it saves me calling an external shell via a cronjob etc.

Stu

> > bifferboard...@googlegroups.com<bifferboard%2Bunsu...@googlegroups.com>

Message has been deleted

Andy Clark

unread,
Oct 12, 2013, 6:26:38 AM10/12/13
to biffe...@googlegroups.com
Hi Mick

I can't say I've seen anyone who fits that description on the group.

He appears to have posted a review on Amazon some time ago:


Things have moved on since I looked at CurrentCost, they now appear to have a network-ready solution:


and service:


Dunno what it costs though...


Andy

On 11 October 2013 22:39, MKS123 <mick.sum...@gmail.com> wrote:
Hi,
I was searching for a web display for a CurrentCost device and Google thew up a good post for this on 'LifeOfStu.com' using a Bifferboard
It looks a great piece of coding but unfortunately the download link to Linux Depot no longer works.

A further search for CurrentCost and Bifferboard led me here and I'm hoping you may be the same Stu..?

If that's the case do you still have that code and is there somewhere I can download it?

Thanks
MKS

--
--
To unsubscribe send email to bifferboard...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "Bifferboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bifferboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andrew Scheller

unread,
Oct 12, 2013, 7:34:27 AM10/12/13
to Bifferboard
> I was searching for a web display for a CurrentCost device and Google thew
> up a good post for this on 'LifeOfStu.com' using a Bifferboard

I searched around that blog site for quite a while, but couldn't find
any way of contacting the author - how annoying!

> It looks a great piece of coding but unfortunately the download link to
> Linux Depot no longer works.

Yeah, looks like Linux-Depot used to be run by the same Stuart
http://web.archive.org/web/20111231054857/http://www.linux-depot.com/
but the domain has since expired and been snapped up by some generic
web-hosting company :-(
http://web.archive.org/web/20130925192616/http://www.linux-depot.com/

But then I noticed that http://www.lifeofstu.com/?page_id=43 contains
a download link like
http://www.lifeofstu.com/dl/kernelbuilder/kernel-builder-1.1.tgz which
is very similar to the now-invalid
http://www.linux-depot.com/dl/currentcost/cc128-0.5.tgz
So on the off-chance I tried the URL
http://www.lifeofstu.com/dl/currentcost/cc128-0.5.tgz and that *does*
seem to work :-)

Lurch
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages