-
Notifications
You must be signed in to change notification settings - Fork 61
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
little info as to how to use private channels #3
Comments
Never mind, i now understand that this is simply not possible without a server-side authorisation... really too bad. You can't 'just' send messages from arduino to whatever app you're making. Gets really cumbersome this way, but, let's see if it works. |
Okay, i got my authentication working, that is, on my serverside (my own domain). However, Pusher won't accept arduino as authenticated client, as there seems to be something wrong with the JSON arduino sends. This is my entire arduino sketch -> http://s14.postimage.org/f2o1ccwvl/arduino_sketch.png This is the arduino sketch line where i authenticate: client.subscribe("private-hitit", "def7cddb263b06e03ad1:52cd5f19949ac39039a206347baff007d6472464496190c23850cceaabbca382"); And the key is the one that this PHP library provided me with: So, why is arduino not getting authenticated? |
I have now got the authentication working for the HTML5 app i'm building, it can succesfully send client events. |
It took some doing, but I finally got a successful authentication to a private channel from my Arduino. I had to trim down the libraries and add a couple of new functions, things seem to get loopy when dealing with very large strings. I'd love some feedback... I am a n00b and this is probably very sloppy code. http://www.charmcitynetworks.com/news/sending-pusher-client-events-from-an-arduino/ |
Nice one! I didn't know you could have two simultaneous sockets with the ethernet shields. I'm using client-events with a Wifly module. These support multiplexed HTTP too, but require a specific firmware to do so. This specific firmware lacks other functionalities that I need though, so I can't use it. Instead I do everything on the AVR, which allows me to make it work with only 1 TCP socket (however this means you have to put your secret key on the device, so there can be security issues with this approach). My implementation is available here. |
+1 for for some better support for triggering events from Arduino (with or without private channels). |
i'd like to bump this thread, until Pusher decides to do something about this :) (this is important! help out the IoT community so we can build awesome stuff for you to put on your showcases! How about an indoor hanging garden modular system which uses Pusher? Sound good? Well, i'm about to embark on such a project and i would love to use Pusher for it, but as it stands now... I don't think so! |
@michahell |
Wait... This is not the actual thread i wanted to post a reaction on. I'm sorry about the reply, it was a bit ment towards the Pusher creators :p I had it bookmarked because it had to do with pusher ><. i'll remove it! But still, i'd love to see your implementation (currently your posted link breaks here). I had a similar hardware setup like you did (WiFi xBee + shield) and i'd love to be able to do the auth on AVR as well, that would solve the issue for me! |
Whoops. Here is the correct URL: https://github.com/reaDIYmate/avr-libraries/blob/master/barebone/PusherClient.cpp |
Mostly concerning the auth_token. Where do we get it from? Is it the CSRF token spoken about here ->
http://pusher.com/docs/client_api_guide/client_connect
or is it just something we choose ourselves?
The text was updated successfully, but these errors were encountered: