Go Down

Topic: Arduino 1.0 Example>Ethernet>PachubeClient (Read 2110 times) previous topic - next topic


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: *****************************************************************************

and compiled/uploaded without error.

The monitor shows this text

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

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.

Arduino leren ? ArdLab Gent - Lid van de STEM-Academie - www.ardlab.gent


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: www.pachube.com\n");
    client.print("Host: api.pachube.com\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.
Arduino leren ? ArdLab Gent - Lid van de STEM-Academie - www.ardlab.gent



Arduino leren ? ArdLab Gent - Lid van de STEM-Academie - www.ardlab.gent


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


Ok. I filed a bug report http://code.google.com/p/arduino/issues/detail?id=826 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 http://arduino.cc/forum/index.php/topic,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.
Code: [Select]
//  The address of the server you want to connect to (pachube.com):
byte server[] = {
  209,40,205,190 };

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

Source: http://community.pachube.com/node/461

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:
client.print("Host: api.pachube.com\n");

Its great with forums :-)
Nederlands, Svenska, English

Go Up