Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues using client.triggerEvent() #7

Open
aamaliaa opened this issue Jan 25, 2013 · 6 comments
Open

issues using client.triggerEvent() #7

aamaliaa opened this issue Jan 25, 2013 · 6 comments

Comments

@aamaliaa
Copy link

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?

@marcoaltomonte
Copy link

Triggering from the Arduino can be done by using private channels only.
You should use this fork for this: https://github.com/marcoaltomonte/ArduinoPusherClient
There is an example for these private channels / client events.
However, the functions you need to call are:

Pusher.subscribePrivate("private-ChannelName"); //your channel name must start with private-
Pusher.triggerPrivateEvent("private-ChannelName", "client-eventName", """"); //same channel, your event name must start with client-

@aamaliaa
Copy link
Author

ah, thanks, i'll check it out. now if only i could make this work with wifly...

@krohling
Copy link
Owner

Hey guys, terribly sorry my support of this library has been... flaky. Working on launching a startup has meant I don't have much time for playing with Arduinos. Which is terrible because I love playing with Arduinos.

@marcoaltomonte
Copy link

Hi. To support wifi you may have to modify the websocket class. A guy tried
to modify the classes to support the wifi shield: he experienced
disconnections after some time. I will ask him if the problem was in some
pusher related issue or if it was an issue if his application.

Il giorno 27/gen/2013, alle ore 20:17, aamaliaa [email protected]
ha scritto:

ah, thanks, i'll check it out. now if only i could make this work with
wifly...


Reply to this email directly or view it on
GitHubhttps://github.com//issues/7#issuecomment-12759478.

@EmilyChristy
Copy link

Hi - I'm trying to get arduino working using the wifi shield and Pusher. Did you get anywhere with this? It would be great to know if it's at least possible!

@marcoaltomonte
Copy link

I am sorry but I do not have a wifi shield to try with. I think it is
possible but it depends on the amount of free RAM on the arduino.

2014-11-10 16:20 GMT+01:00 EmilyChristy [email protected]:

Hi - I'm trying to get arduino working using the wifi shield and Pusher.
Did you get anywhere with this? It would be great to know if it's at least
possible!


Reply to this email directly or view it on GitHub
#7 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants