GithubHelp home page GithubHelp logo

arduinopusherclient's People

Contributors

borfast avatar jsmiguel avatar krohling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduinopusherclient's Issues

client stops "listening" after 30-60 minutes

this is an awesome library! I'm trying to use it for a little water turret project (turret.jit.su). I haven't modified any of the connection code from your example, but I'm noticing that after leaving the board on, after roughly an hour it stops responding to messages from Pusher. I'm logging whether or not client.connected() is false in the loop but it it doesn't seem to be the issue (client.connected() is apparently still true while the board is unresponsive).

Do you know what might cause this (where I should start troubleshooting)? Thanks!

No connection possible from arduino to Pusher

I can't get it to connect from arduino to pusher.
Will you help me, maybe you can find what I am doing wrong.

The situation is as follows

I have added all keys in the pusherclient.cpp. between the "" as you had described.

In the example script in IDE, I haven't changed anything, but when I compile I get the following message: Compilation error: no matching function for call to 'PusherClient::connect(const char [18])'.

When I remove the "your-api-key-here"
in the line: if(client.connect("your-api-key-here")) {

I no longer get compile errors. but get as response in the serial monitor:
21:44:16.328 -> Connecting to host.
21:44:16.328 -> Connection to host failed.
21:44:16.361 -> Connection to Pusher failed.

I suspect the error is in that if(client.connect line.

i used an arduino uno, with ethernet shield

Pusherino

I think it's a serious issue this awesome project isn't called 'Pusherino', as in the official greeting e-mail i got from pusher.com!

ESP8266

this is a long shot, but has anyone tried this for ESP8266 or maybe there is a newer version out there somewhere?

Deprecated

Hi,
I get this warning from pusher: "Pusher protocol versions <= 3 have been deprecated. Support will be removed after November 2013"

So you have any plans to update the library?

issues using client.triggerEvent()

I'm having some real issues triggering my own events from the Arduino. When I send the sample input:

client.triggerEvent("my-event", "some data about my event");

I get "Client Error" in the debug console type column with a "Received invalid JSON" msg.

Then, when I try to pass in JSON for my data like so...

  client.triggerEvent("my-event", "{ \"result\": \"1\" }");

I get this msg: "Unsupported event received on socket: my-event".

Any idea what I might be doing wrong?

Ownership

Hi there!

Let me start by saying thanks a lot for this library - it's awesome and I use it quite often when hacking on Arduino stuff.

I was wondering if we (I work for Pusher) could fork it under our community libraries org? I notice there hasn't been much activity on it for a while - but I'm personally a big fan and I'm more than happy to maintain it.

Either way is cool! Thanks again :)

cannot connect directly after a connection

The library works great, my only problem is when i reset my arduino a few seconds after the connection is made, it cannot reconnect. I have to reset it a few times. I think its because pusher thinks there is already a connection. Is there a way to ask for a new connection, or reset any old connection? Or is it a bug in the library?

[UPDATE]
I now have the following code to try again after failing to make a connection (not very clean):

int i = 0;
int times = 4;
while(connectedToPusher == false && i < times){
delay(5*1000);
connectToPusher();
Serial.println("again");
i++;
}
if(connectedToPusher == false){
Serial.println("Could not connect, times tried: "+times);
}

boolean connectToPusher()
{
Serial.println("Try connect to pusher");
if(client.connect("8178511e2ae898735fc3")) {
Serial.println("connected");
connectedToPusher = true;
digitalWrite(7, HIGH);
client.bind("ledon", ledon);
client.bind("pusher:ping", checking);
client.bindAll(handleAllEvents);
client.subscribe("test_channel");
return true;
}
else {
Serial.println("failed");
return false;
while(1) {}
}
}

Wont work over GSM, timeout?

Hi, i have a simple sketch that connects and outputs its connecton status. (using ethernet sheidl)

If i plug it into my standard internet it works, if i plug it into a working fully connected GSM router (via ethernet) it cannot connect. Yet i can plug a laptop into the GSM router and it works fine, full internet access.

So i can only assume this is either down to timout or something else but its impossible to debug without any real errors?

Have you got any idea why this wont work over a GSM router?

_UPDATE_

Ok, i think i know what the issue is. GSM modems split the packets in order to cope with them and i am assuming that handshake "lines" are being returned and getting split and the library isnt prepared for this and therfore reads part of what it thinks is a line.

Is there a way that this could be fixed, the code in question is:

bool WebSocketClient::readHandshake() {
    bool result = false;
    char character;
    String handshake = "", line;
    int maxAttempts = 300, attempts = 0;

    while(_client.available() == 0 && attempts < maxAttempts) 
    { 
        delay(100); 
        attempts++;
    }

    while((line = readLine()) != "") {
        handshake += line + '\n';
    }


    String response = getStringTableItem(6);
    result = handshake.indexOf(response) != -1;

    if(!result) {
        _client.stop();
    }

    return result;
}

Thanks
Andy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.