Hi there, We've had a lot of success with the OSX version of this package, but getting it to work on a PC is pretty tricky - anyone else found this too?
Hi there, We've had a lot of success with the OSX version of this package, but getting it to work on a PC is pretty tricky - anyone else found this too?
Get a gadget like this for your website by going to Pachube.apps!
Re: CurrentCost to Pachube app: no hacking necessary!
hi, naturalsystems, when you say tricky do you mean that you did eventually manage it, and it was difficult? or that you never managed to get it to work at all? i've got a feeling it could be a java issue, but it might take a few iterations of things to try before getting it to work - feel free to drop an email to support@pachube.com and i'll see if i can help. what would be helpful to know is what java version you have on the PC. you can find this out either by going to the command prompt (run > cmd.exe) and typing "java -version" or, usually, by going to this website: http://www.java.com/en/download/help/testvm.xml which should let you know what version is installed on the computer.
Re: CurrentCost to Pachube app: no hacking necessary!
Ok, I found a Windows XP computer on which the app didn't work, though I couldn't for the life of me track down the error.
So instead I re-exported the app on that machine from the original source code, and this new one does seem to work (though I did have trouble installing the USB drivers - how about you?) - can you try this version instead and let me know how you get on:
http://community.pachube.com/files/CurrentCost_to_Pachube_Windows_v002.zip
(by the way, you might have to run the app a couple of times before the preferences files is created and it starts up correctly)
Re: CurrentCost to Pachube app: no hacking necessary!
Brilliant, this works just fine now - thanks for investigating this for me.
Re: CurrentCost to Pachube app: no hacking necessary!
I hit the problem below when trying the Linux version on SLAX with Java v6 ud12. (Windows version works ok on the same machine so hardware should all be ok.)
_CC128
0
1
http://
API_KEY
SpringGUI initialized with beginner parameter sets...
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
[0] "/dev/ttyUSB0"
New DataOut created, manual update enabled.
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 0
at CurrentCost_to_Pachube_CC128.setup(CurrentCost_to_Pachube_CC128.java:68)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Unknown Source)
Re: CurrentCost to Pachube app: no hacking necessary!
not sure what this might be, though i have seen this happen when the USB connection temporarily fails.
next time this happens, can you try opening the "Console" app in /Applications/Utilities/console, click "Show log list" in the top left hand corner, it should reveal a list of logs and folders. Look for LOG FILES > ~/Library/Logs > Java and inside this you should see a list of different files with names like "javanativecrash_pid6410". Click these and in the right hand side it will show you the text of the error message. If you are able to deduce which one relates to your crash (should mention the app name, or the timestamp will correlate) can you send the contents to support [ at ] pachube [ dot ] com and i'll see if i can figure out what's going on? If you can find the file "Java console.log" that will be even better.
Re: CurrentCost to Pachube app: no hacking necessary!
Anyone managed to get this working on vista? The driver that the CC site points to for vista seems to work for a couple of cycles then BSOD occurs :-( The one this post points to at the prolific site is just for XP afaik
any help appreciated!
andy
Re: CurrentCost to Pachube app: no hacking necessary!
Hmm, don't have any logs since 2007. I don't think the java is crashing, just the application ceases to respond.
then i think it must be the USB cutting out. does your computer go to sleep perhaps? i have a mac that cycles down, switches off screen and still ran the app for 5 weeks without problems (would have been longer but i had to restart for other reasons...). are you using the CC official cable, or did you make your own?
I'm also a bit confused about the charting. When I create an input I see the charting data from the CC128, but I don't see an X-axis, nor any increments.
i'm not sure which is your feed, so i couldn't tell whether there's something wrong, but here's one that's working (at the time of making this post): http://www.pachube.com/feeds/1280
now, that page link just shows the feed's page, which is basically just a summary and only contains basic graphs with few labels (each of the grey lines indicates 2 hours with -24 hours to the left and 'now' at the right).
but, under each image, is a link to "image" - if you click that, you get a much bigger graph, which you can also configure, following instructions here: http://community.pachube.com/?q=node/104
for example, using that feed i listed above you might try using this link to a more detailed graph:
http://www.pachube.com/feeds/1280/datastreams/1/history.png?w=600&h=300&...
(this dynamic image can then be imported into your own webpage).
Re: CurrentCost to Pachube app: no hacking necessary!
Anyone managed to get this working on vista? The driver that the CC site points to for vista seems to work for a couple of cycles then BSOD occurs
i've had at least one person tell me they got this working with vista.
the current cost page (http://www.currentcost.com/product-datacable.html) says "Vista normally has the drivers pre-installed" - did it not work without installing?
Re: CurrentCost to Pachube app: no hacking necessary!
'did not work without installing' - no, and from various forums across the web it seems this is quite common. People reverting to using an old XP machine seems to be the work around :-(
Re: CurrentCost to Pachube app: no hacking necessary!
just checked the prolific site (http://www.prolific.com.tw/eng/downloads.asp?ID=31) and the XP driver, released 2/12/2009 also lists "Vista" - have you tried it? BSOD too?
Re: CurrentCost to Pachube app: no hacking necessary!
Yep, unfortunately it's worse - it doesn't even recognise the device (in control panels it shows that vista cant start the driver)! But maybe I should pursue that one, at least I dont get a BSOD...
Re: CurrentCost to Pachube app: no hacking necessary!
Ahhhhhhhhhh, now everything becomes clear :
1) yes - my Mac mayhave been sleeping at various times ( in order to reduce electricity ;) )
2) Those graphs look great - that's what I was expecting . This is very interesting indeed
Re: CurrentCost to Pachube app: no hacking necessary!
hi graham: the "v002" application is not for the CC128, only the CC128 app will work with it -- can you try running the CC128 app again and tell me what error you get, if any?
Re: CurrentCost to Pachube app: no hacking necessary!
Hi uh
The message is a Java VM message "Cannot find the main class: processing.app.Base. Program will exit". Im using Java 6 , update 12 (build 1.6.0_12-b04)
Regards
Graham
Re: CurrentCost to Pachube app: no hacking necessary!
one thing you might try is to check how your Java "path" and "classpath" variables are set - are you comfortable modifying them yourself? It's not difficult but you need to figure out where Java is installed (usually in C:\), then you can follow the instructions outlined here: http://www.phoons.com/john/classes/aboutpath.html
if it works please post back here for future ref.
Re: CurrentCost to Pachube app: no hacking necessary!
uh
Tried the suggested mods, but made no difference at all.
Graham
Re: CurrentCost to Pachube app: no hacking necessary!
hmmm... not sure what's up; though one other person mentioned a similar thing a few weeks ago.
the only thing i can suggest is that you download the source code and recreate the app specifically for your machine. this is not as complex as it sounds, though it requires several steps. below i include links directly to the bits you need to download (msg for future visitors: these may change):
1. download and extract processing: http://processing.org/download/processing-1.0.3.zip
run processing once and then quit. you should find a directory called "sketches" somewhere in your documents folder.
2. download and extract into the "libraries" directory insdide the "sketches" directory the following:
- http://www.eeml.org/library/eeml.zip
- http://www.repeatwhiletrue.com/SpringGUI/download/SpringGUI001.zip
the final directory structure (which explains which bits to have where) would be:
- sketches > libraries > eeml > library > eeml.jar
- sketches > libraries > SpringGUI > library > SpringGUI.jar
3. Download and extract the CC128 source code: http://community.pachube.com/files/CurrentCost_to_Pachube_CC128.zip
4. Start Processing. go File > Open and select "CurrentCost_to_Pachube_CC128.pde" in the folder you just extracted. you should see a bunch of code open up in the editor. don't change any of it (until you want to start experimenting!).
5. Go Sketch > Run and after a few seconds the app window should open up. If it doesn't work first time, try again. Check that it's working correctly and recognising your CC128.
6. If all is good then go File > Export Application -- whereupon after a few seconds a window should pop up with the location of your exported app.
you might need to run this app twice to get it to create preference files and work correctly.
let me know how you get on, if you decide to try this out.
(p.s. i realise this somewhat contradicts the title "no hacking necessary"...!)
Re: CurrentCost to Pachube app: no hacking necessary!
Thanks uh, but this is just a bit too involved a process for me.
If you manage to shed any light on the problem or update your app, let me know and I'll try again.
Graham
Re: CurrentCost to Pachube app: no hacking necessary!
hmmm... up till now it's mostly been cc128 + vista that has been a failing combo, XP seems to have worked fine. the error you're reporting sounds different from previous ones, which i believe are due to classpath settings (but in any case, have you tried setting the classpath as described above?)
can you confirm that you've installed the usb driver?
since it has created the preferences file, which should now appear in the same folder as the application (depending on your setup, it might not -- look for "CurrentCostPreferences.txt") can you open that file up in wordpad or notepad and report back what the first line says?
Re: CurrentCost to Pachube app: no hacking necessary!
Havent tried the classpath but will do
This is content of config txt file :-
0
1
http://
API_KEY
Not a lot in there :) Hope it helps..
Dean
Re: CurrentCost to Pachube app: no hacking necessary!
Latest version of JRE, Sun Microsystems, Java 6 Update 11, Windows XP. No go whatsoever - no error messages either.
Re: CurrentCost to Pachube app: no hacking necessary!
ah, seems it's an RXTX error. if you have a moment to work on this (i noticed your tweet that you got it working fine on Win) can you try the following:
Alan Kilian contributes this description:
It's important that you're in both groups, and that you completely log out and log back in again.
This comes from the directions at the bottom of this page, the part aimed at Linux users: http://processing.org/reference/libraries/serial/
Re: CurrentCost to Pachube app: no hacking necessary!
Working very quickly. I installed the driver then the desktop app and it was working immediately.
I am noticing that the app seems to freeze sometimes, I'm not sure if this is due to the power saving/sleep mode on my Mac (PPC G5 with OSX 10.5.5 leopard). I seem to have to restart it. When this happens all the readings are frozen including the countdown to when the next pachube update. I'm using a CC128
Re: CurrentCost to Pachube app: no hacking necessary!
Hmm, don't have any logs since 2007. I don't think the java is crashing, just the application ceases to respond.
I'm also a bit confused about the charting. When I create an input I see the charting data from the CC128, but I don't see an X-axis, nor any increments. It's a simple red chart with the maximum and minimum values , which is fine but are there more detailed charts I can create based on the live sample rate ?
Re: CurrentCost to Pachube app: no hacking necessary!
Hi
I'm having problems getting the app to work.
I'm running Vista and I have a CC128 meter. I installed the app from your original download link, but couldn't get this to start at all. So I read through the posts and downloaded your v002 of the app.
Now I can get the app to start OK. I have set up a manual Pachube feed and posted the URL and API keys into the relevant boxes, but the app says there is no currentcost connected. The USB-serial connection is on COM9 and this comms is working fine. I know because I've been able to get live data from the CC using Dale Lane's CurrentCostGui application on the same port. I'm not running both apps at the same time, as I found out that this prevents the second app from opening the port.
Any ideas what the problem could be?
Thanks
Graham
Re: CurrentCost to Pachube app: no hacking necessary!
Another failed XP/CC128 user here i'm afraid - i have current java vm installed 6 11.
I've tried the pachube version at the start of the page, and ver 2 (just realised this wasnt for CC128) later down and both to no avail.
Machine is running XP Pro SP2. First time i run the app it appears briefly dissapears and creates the preferences file. When i click again - egg timer briefly then nothing - notice in the processes that javaw.exe appears. If i click the app, nothing at all and another javaw.exe process appears, i can get as many javaw.exe for the number of times i click on the app again.
When the preferences file is created, the javaw.exe dissapears straight away.
Any other suggestions greatly appreciated.
Thanks
Dean.
Re: CurrentCost to Pachube app
I'm a little late to this Current Cost party - just got an early U.S. version of the unit. On Mac 10.5.6, could not get the Java app to work. Downloaded the libraries and opened it in Processing. I know the Mac is getting the serial output of the CC - I can see it in the screen app in Terminal. And I know that the Processing sketch is running fine, to a certain point. Then it throws this error:
StringIndexOutOfBoundsException: String index out of range: -6
at the last line of this block of code:
String parseSingleElement(String m, String t){ int start = m.indexOf("<"+t+">") + t.length()+2; int end = m.indexOf("</"+t+">"); return( m.substring(start, end)); }The full error reads like this:
Any Ideas?
Re: CurrentCost to Pachube app
yep, discovered that last week soon after finally getting a working cable for my CC128 (http://twitter.com/pachube/statuses/1807775853) - fixed it, added in a couple other nifty features, and then i promptly fried my hard drive (by other means!) which leaves me a couple of days behind as i restore from backup (last made, unfortunately, before the extra bits were added to the CC128 code). all of which is to say: i'll be uploading the new app later today!
Re: CurrentCost to Pachube app
new version of the app now available for CC128, see this other forum post http://community.pachube.com/node/219
Re: CurrentCost to Pachube app
I've just downloaded this app and it isn't managing to upload any data to Pachube. I've uploaded a dump of the log here:
http://tom.acrewoods.net/files/error_log.txt
Can anyone help me out?
Re: CurrentCost to Pachube app
looking at your logs i see that you've got it set up as 2 clamps, but the XML that the unit is generating is only showing 1 clamp. so what you need to do is either:
a. figure out why the CC only thinks you have 1 clamp (assuming you actually do have 2 clamps) or
b. select 1 clamp in the drop down menu, save prefs and close or
c. if you can't even get to the drop down menu, find the file "CurrentCostPreferences.txt" (depending on your platform it will be in different places) and either delete it, or edit it with a text editor to have 1 instead of 2.
hope that helps.
Re: CurrentCost to Pachube app
I think I might understand the issue - are the clamps meant for 3-phase supplies? I've got two meters in this office with one clamp on each, the second clamp coming in on the appliance 1 channel. What I'm trying to achieve is a single figure for the combined wattage off both meters.
Re: CurrentCost to Pachube app
i'm not sure how to set up the meter for 2 meters -- best to contact current cost about that. as i understand it though, when you set up for 3-phase supplies i don't think the 2nd clamp counts as an appliance channel, though i may be wrong. in that case, the display unit shows the sum of the clamps, but the XML output includes each as separate channels. again as i understand it (haven't tried it myself) the (up to) 3 channels are all counted as a single sensor.
viewing your XML output it appears that your 2nd clamp is not recognised as a channel which i believe (following this doc: http://www.currentcost.com/cc128/xml.htm) it should be. are both clamps definitely being monitored (i.e. summed) on your display unit?
Re: CurrentCost to Pachube app
After talking with CurrentCost I've set it up with two transmitters, one per meter. They're both being picked up on the display unit as the main reading and appliance 1 respectively, and have been gathering data for a few weeks with totals, the little graph showing the night/day/eve breakdown, etc. all working fine.
I've not done anything else clever, I just started the program up, said use two clamps + transmitters.
I did try switching the app to just read from one clamp, which just reads the first clamp on the main channel, and then noticed that when I changed between the main channel and the appliance 1 channel on the display unit the app picked up the change in figures (i.e. it was recording the appliance 1 figure when that was shown on the display unit).
Re: CurrentCost to Pachube app
so that sounds to me like you might not have it setup in quite the same way that CC says on their website FAQ: http://www.currentcost.com/faq.html where my reading of it (and of the spec doc shown above) is that multiple clamps are summed on the display unit, but on the XML appear as different channels within a single appliance. the pachube current cost app is looking for multiple channels within a single "sensor" (i.e. each clamp appears as a different channel), it's not looking for multiple sensors, as it sounds like you have it set up. not sure what to suggest for you - the app code is of course open source so you're welcome to recode it for your particular scenario, but as far as i know (and as far as CC's spec tells us) the app will work if you are able to set it up so that the 2 clamps are considered part of the same sensor (not sure the intricacies of how you do it on your particular display device).
Re: CurrentCost to Pachube app
had the same problems getting the app to work on XP, was a few problems in the end:
only had java 1.4 installed so upgraded to 1.6.
The .exe still failed to start so created the following file (named it cc.bat) in the same directory as the .exe:
This failed with the following error:
It's an old pc with only 1G of RAM so changed batch to the following:
java -Xms64m -Xmx512m -classpath lib/CurrentCost_to_Pachube_app.jar;lib/core.jar;lib/pachuino.jar;lib/serial.jar;lib/RXTXcomm.jar;lib/SpringGUI.jar CurrentCost_to_Pachube_appAnd all started up fine. Hope it helps resolve some folks.
Re: CurrentCost to Pachube app
just to be clear - this resolves the XP problem noted above, and not the 2-clamp issue (though I thought the XP problem was resolved in the last release!).
smeg24: is the bat file you created generic enough for windows users that i should just include it in the next version release of the CC app?
Re: CurrentCost to Pachube app
That's how they advised me to set it up for two separate meters - one as an appliance. I can't see anything in the FAQ about this, just about using clamps for a 3 phase supply.
Strangely, I'm sure that the reading on the Pachube app was the combined reading from both meters. Maybe I was just dreaming.
I'll have to get in touch with them again.
Re: CurrentCost to Pachube app
Right, I emailed them to check. They came back to me and said I'd set it up in the correct way, and that the new Techtoniq software understands the appliance feeds from the CC128 unit.
It might be worth emailing them to check how you retrieve appliance 1-9 feeds from the unit, I'm happy to road test any code.
Re: CurrentCost to Pachube app
I've now grabbed some raw data from the serial port, it turns out that there's a pretty simple way to do this. The CC128 kicks out data for the main sensor (0) and the appliance sensors (1-9), one line of XML per sensor reading. Here's a sample:
So the Pachube app needs to be able to read up to 10 sensors separately. Most people will, in the future, use this to get more granular data for a few appliances. But it would be good to also let users add all the sensors together where they have several meters, based on the set-up we've gone for after conversations with the CurrentCost people.
Re: CurrentCost to Pachube app
First of all congratulations to everyone on putting this together – it’s a fantastic effort. We have a village ‘climate committee’ in Oxfordshire and they have come up with the idea of encouraging as many people as possible in the village to get smart meters. They want to collate everyone’s results and to be able to publish them in the monthly newsletter with an accompanying article in order to engage people to reduce consumption. There is also a future idea to make a friendly challenge to a neighbouring village, to compete to see which village can reduce their energy usage by the greatest percentage.
I’ve been asked to investigate whether this might be logistically possible. So far I’ve invested in a current cost meter and linked the data up with Pachube... all works well and v encouraging. The one stumbling block I’ve come across is Pachube doesn’t seem to be able to extract any historical data. So if for example I turn my PC off at night, (and hence the connection to Pachube) then there is a gap in the data readings for this period. I’ve been led to believe that historical data is however stored within the unit, and the Techtronic literature suggests the historical data is output every two hours. Are there are any plans for one of the relevant pachube applications (I’m presently using CurrentCost_to_Pachube) to be able to retrieve this historical data and fill in the gaps when they occur?
My other query would be how easy might it be to collate feeds from households in our village via Pachube to achieve the kind of data sample that I mention above? One way might be if there was a group feed, say "Fulbrook Village" or "toby friends" where you could add in feeds and it gave the graph for the total for all the feeds submitted. Perhaps there are better ways to achieve this though?
Many thanks for your thoughts in advance.
Toby
Re: CurrentCost to Pachube app
Hi Toby
We'll be introducing some new more powerful features to the Pachube API over the next few weeks to make this kind of thing easier. Watch this space for some aggregation, calculus and statistical tools......
Meanwhile, until retrospective data update is enabled, it's worth pointing out that the Current Cost Pachube software is open source so it would be pretty straightforward for someone to modify the code so that it reports kWh (rather than watts) every 2 hours, and then sums up for the time the computer is switched off the next time it can connect to Pachube. Then, in terms of building something to collate those feeds, this could be done fairly easily using javascript in a webpage - something that a web developer should be able to do.
Re: CurrentCost to Pachube app
I have a appliance that power on and off very quickly (every ~25 seconds - it's a very low power heater). This means that the graph that the app generates looks like this: /\/\/\/\/\. While this is fine and expected (in the GUI), when pachube is updated the latest value seems to be uploaded, which causes the pachube graph to look erratic too.
Any chance that the app could be changed to update pachube with the average power value parsed since last update?
Something like a cumulative total for each clamp, and the number of messages parsed since last pachube update, that could be divided into and used for the value to push to pachube (assuming at least one value has been received since last pachube update).
Re: CurrentCost to Pachube app
We don't currently have plans to update the app - but since the source is open, hopefully either someone will build upon it, or we will finally get round to updating it!
Re: CurrentCost envi to Pachube app on Mac osx 10.5.7
Have read several times through this blog and can't get my configuration working.
Have tried trial versions of the apps on currencost for both pc and Mac compatability.
What I have been able to do;
instal current cost>pachube and current charts on mac
instal current cost>pachube and techtoniq on xppc
Problems;
Serial cable driver linked here does not instal on my mac but earlier version does from sourceforge.net.
Data streams to techtoniq displaying complete data for 24 hour period (pc only)
No energy data on either pc or mac for currentcost>pachube app. Temp is displayed in app and transmitted to remote site.
What i want to do;
embed the pachube graphs for data consumption with my pv data graphs here
http://my.opera.com/mikepotts64/blog/solar-graphs-and-stats
any thought?
Re: CurrentCost to Pachube app
Can't answer for techtoniq's software, but it's a little strange that using Pachube software you successfully update temperature but not power. What Current Cost unit do you have? And are you able to capture its XML stream and post here?
And have you tried the latest dev version of the software found here: http://community.pachube.com/currentcost_dev -- this *should* auto detect all your sensors and appliances.
Re: CurrentCost Envi to Pachube app
Thanks for your prompt response.
I have the Envi (cc128). The latest software doesn't register either temp or energy, Mac or pc.
I am not sure how to capture the xml stream on the Mac. is that something through terminal? I did get a data stream on the PC using C2 terminal
Re: CurrentCost to Pachube app
Yes, if you can paste in the data stream here for us to have a look at we may be able to tell if you have a model that we haven't accounted for. Which country are you located in? We've noticed there are slightly different XML formats for UK vs. US versions of the CC128.
Re: CurrentCost to Pachube app
I am in Australia, unit from SmartNow.com.au
I will attempt to get an xml feed from a windows device which does read the data in techtoniq app.
Currentcost to pachube.com
Temp stream here http://www.pachube.com/api/feeds/6087/datastreams/0
Power stream should be here but not registering at all http://www.pachube.com/api/feeds/6087/datastreams/1
and from beta v2
AND FROM C2
I will leave V10.7 running
Re: CurrentCost to Pachube app
Thanks, but it's the XML from the device itself that we'll need to see in order to be able to debug. You mentioned you were able to access this using C2 terminal. Please paste what you get back here and we'll have a look at it. Note that you can wrap your XML paste in "code" HTML (i.e. <code> and </code>) in order to format it correctly.