Arduino 1.0 Example>Ethernet>PachubeClient

I'm trying to make the Arduino 1.0 Example>Ethernet>PachubeClient work but is won't.

I've entered my IP/feed/key as described

// fill in an available IP address on your network here, // for manual configuration: IPAddress ip(10,0,1,20);

// fill in your feed address here: client.print("PUT /api/46529.csv HTTP/1.1\n");

// fill in your Pachube API key here: client.print("X-PachubeApiKey: ***************************************************************************** \n");

and compiled/uploaded without error.

The monitor shows this text

connecting... HTTP/1.1 401 Unauthorized Date: Wed, 01 Feb 2012 22:20:51 GMT Content-Type: text/plain; charset=utf-8 Connection: close WWW-Authenticate: Basic realm="Web Password" Cache-Control: no-cache Content-Length: 50 Age: 0

You do not have permission to access this resource disconnecting.

I don't know if the problem is the sketch or my patchube feed or key. If someone could confirm that the example sketch should work after entering the personal key/feed, I know the problem is at the pacube side configuration.

Any help would be appeciated.

I'm having the same problem. Can anybody help?

It 's solved but I did not find it myself (credits to WARD - my personal guru)

2 problems I encountered:

1: the included API 1.0 example sketch is not correct


client.print("Host:\n"); with client.print("Host:\n");

(UNACCEPTABLE that this is not correct in an example sketch, people get confused and loose Arduino appetite)

2: make sure that the key you created in the Pachube website has

Permitted Methods all

I would NEVER have found this myself, the Pachube website urgently needs a simple, correct, straightforward geting started file on the home page and all outdated data should be updated or deleted.

Thank you!! Got it working.

Good !

Do you know if anyone have filed this as a bug?

Ok. I filed a bug report and attached some proposed changes. I'm pretty sure there are still things to change in these examples and I'm not 100% foolproof either so the changes I proposed might have issues as well but they worked for me at least.

I can certainly recommend reporting bugs and writing patches if you find any more errors or anything else that needs to be changed in Arduino. It will still take some time before the fix "gets out there" but I have found it way more effective than just writing in the forums.

Hi. I'm also tryng to get a Data feed working on Pachube (thread,94424.0.html) I also use the example "PachubeClient" though my compiler is in Linux Ubuntu (Arduino 0022ubuntu0.1).

I asume this might be exactly the same code and I discovered that the IP address in the example has been changed in March 2010.

//  The address of the server you want to connect to (
byte server[] = { 
  209,40,205,190 };

The Pachube IP address was changed a while back, from to


I have my sketch not working yet but I will try to update my sketch tonight by using a key with all permissions and the changed section:


Its great with forums :-)