Coder Social home page Coder Social logo

Comments (10)

michahell avatar michahell commented on June 15, 2024

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.

from arduinopusherclient.

michahell avatar michahell commented on June 15, 2024

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.
Screenshot here -> http://s14.postimage.org/4h460cqk1/arduino_wrong_JSON.png

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:
https://github.com/squeeks/Pusher-PHP#private-channels

So, why is arduino not getting authenticated?

from arduinopusherclient.

michahell avatar michahell commented on June 15, 2024

I have now got the authentication working for the HTML5 app i'm building, it can succesfully send client events.
However, i needed to authenticate using JSONP using a PHPscript on my own domain. How can this be done in arduino? Or are there any plans to add this functionality to the library? otherwise, it's not possible to send client events!

from arduinopusherclient.

chriswhong avatar chriswhong commented on June 15, 2024

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/

from arduinopusherclient.

pbouchet avatar pbouchet commented on June 15, 2024

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.

from arduinopusherclient.

fsamir avatar fsamir commented on June 15, 2024

+1 for for some better support for triggering events from Arduino (with or without private channels).

from arduinopusherclient.

michahell avatar michahell commented on June 15, 2024

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!

from arduinopusherclient.

pbouchet avatar pbouchet commented on June 15, 2024

@michahell
What is it that prevents you from using it? What is your hardware setup? Are you using an Ethernet shield or something else?

from arduinopusherclient.

michahell avatar michahell commented on June 15, 2024

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!

from arduinopusherclient.

pbouchet avatar pbouchet commented on June 15, 2024

Whoops. Here is the correct URL: https://github.com/reaDIYmate/avr-libraries/blob/master/barebone/PusherClient.cpp

from arduinopusherclient.

Related Issues (13)

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.