Pages: [1]   Go Down
Author Topic: Arduino 1.0 Example>Ethernet>PachubeClient  (Read 1431 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Belgium
Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Replace

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

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you!! Got it working.
Logged

Belgium
Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good !
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino, just love it
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino, just love it
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
//  The address of the server you want to connect to (pachube.com):
byte server[] = {
  209,40,205,190 };

Quote
The Pachube IP address was changed a while back, from 209.40.205.190 to 173.203.98.29.
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:
Quote
client.print("Host: api.pachube.com\n");

Its great with forums :-)
Logged

Nederlands, Svenska, English

Pages: [1]   Go Up
Jump to: