Using Pachube with Touch ...

Gimmerz and I have been chatting via PM about using feeds from Pachube [url]http://www.pachube.com/[/url] via the Web DAT in Touch.

My first tries at this met with no success when hooking into xml feeds. When I switched to .csv format data I could successfully bring in data form two online sensors. However, when gimmerz tried to get a feed with four or more channels, things stopped working.

Attached is my .toe file. you need to register at Pachube to get your own API key in an email and paste it into the dat as directed in the README text TOP.

this brings the data back in .csv format which can be translated as two cells in a table using the convert DAT.

I think there might be something wrong with the way touch sends the command to pachube for XML. there seems to be an error when trying to authenticate using the API key.

can anyone confirm this - or even better, show the correct way to get this happening properly?

Rod

i find this pachube website interesting. I am going to read up more about it… =)

WOW Rod! It’s really cool what you did! and it’s so simple the .toe !! :slight_smile:

I’ll show it to my students! They will love it! We have a project with the school of interaction design of Seoul and maybe we will use also Pachube!

It’s so great this community!
Nima

Hey Rodney,

I am having the same problems that you are facing. Just to make it more clearer to anyone who is reading:
Feed A - [url]http://www.pachube.com/feeds/2441[/url] has 1 channel
Feed B - [url]http://www.pachube.com/feeds/8731[/url] has more than 2 channels

with XML format - both cases are not working
with CSV format - Feed A is working while Feed B is not

I do not believe that the problem is “an error when trying to authenticate using the API key”,as when I try to enter without any key or even gave a wrong key, pachube will return “Unauthorized”. I think it has to do with the decoding of the data in Touch when Touch receives it. Perhaps this explains why Touch can receive 1 or 2 data channels but not more. It may be a bug in Touch?

Also, just to be sure, I tried running cURL on my system command and I am able to receive both XML and CSV feed from Feed B.

PS: Attached is my toe file. It is identical to yours but a cleaner version and will help if you ever need to make it into application control panel. Look at the blue node to change the necessary variables.

Out,
NaB
pachube_test.toe (5.53 KB)

just a note to those who downloaded the earlier .toe file. please don’t use the key that’s in the file. I accidentally put my own API key in there. I thought it was the edited one. please replace it with your own key and delet mine before passing it on.

cheers,

rod.

using cURL.exe along with the system command can open up lots of cool stuff that the web DAT can’t yet do. please refer to this post [url]using the system command properly - Techniques - TouchDesigner forum

you need cURL.exe somwhere in your execution path to make it work but this is explained fairly well in the post and in the .toe

rod.

Can you post examples of things the Web DAT can’t do yet? Maybe to the RFE forum.
We use libcurl as our engine for the Web DAT now so we should be able to support whatever you can do with the curl .exe

I managed to get this working with pachube’s php library. I just uploaded their example script onto my server and seems to work OK.
pachube_php.toe (4.89 KB)

I’ve fixed a few cases where Pachube wasn’t working with the Web DAT. Builds 7940 or later

Just to confirm…
Now the examples I had trouble with previously, all work fine with the revised webDAT (as of build 7940). Thanks.

rod.

yup… thanx malcolm.

NaB

I can’t find much interesting data on Pachube. Most of what I checked has dead data feeds.

yeah that’s often the case. you can constrain the search to feeds that have had recent activity.
It seems they are going ‘pro’ and offering it as a product now but the free stuff should continue to work.

Rod.