I’m trying to create webhook since 3 days. But i can’t reach anything.
Firstly i have created a text file named with login.json which contains json data on Desktop, and run cmd window. I run command in terminal then i have changed my file directory to Desktop with cd Desktop command. After that i run command which is particle webhook create login.json. But i got a message Please specify an event name. What’s wrong with?
At this point I think it would be a wise decision to go over the documentation once more, and try do execute the example in there. That should give you a basic idea of what you're supposed to be doing.
This is also a good topic to get going with webhooks relatively easy:
Again, this is mentioned in the docs: http://docs.particle.io/photon/webhooks/#handling-web-responses please do take a look, and read the whole page. That should give you more insight as to what’s going on.
There are also quite a few topics about this on the forum. Please try the search functionality, and I’m sure multiple topics will pop up. Here’s a useful one to get you started: Cloud JSON Parsing
He’s asking you to copy-paste the file into this thread on the forums, so we can see what configuration you’re specifying for the hook, and so we can fix any errors.
Good question! A few people have asked for this feature since we
launched, and it's interesting, I think I can make it work. I'll add it to my backlog and build it when I get a chance.
Thanks!
David
Hi @Dave, have you had a chance to look at this feature yet? I've been full steam ahead on a datalogger but ran into this wall. I'm trying to record voltage, current, and temperature from a project and log it to a database (then plotting it using highcharts). Any way you can think of to accomplish this? I could create multiple webhooks, one for each piece of data but it will be hard to line up the data for review.
I’m planning on doing something similar using Node.js/MongoDB. I found that using JSON structured SSEs work pretty well. I stores my data to mongoDB after which I can graph it using HighCharts. I’d imagine that using Variables would work similarly, although that’d be a polling precess. Just an idea though
Is there any way to subscribe to all events? When I leave event empty it is rejected with Please specify an event name.
I would like to be able to subscribe to “device came online”. Is this possible?
That’s restricted for very special accounts! If you’re a product owner you can see all events for your products. But yeah subscribing to “spark” or something would do the trick for your devices.
edit: if you were watching the public firehose, you’d blow through your rate limit in just a few milliseconds.
The web app handles its own user logins and accepts data that is tied to individually logged-in users via this access token.
In the Photon, after receiving this token, I use that token in the subsequent posts to that web app. The posted data is then tied to user that requested the token. I might have hundreds of different Photon devices logging in to the web app via my “get_token” webhook, each using unique login credentials. However, I want each individual device to see the specific hook response generated by its “get_token” call.
As I understand it now, all of my devices that are subscribing via:
Particle.subscribe(“hook-response/get_token”, gotToken, MY_DEVICES);
will be subscribing to their own as well as the responses intended for all other devices. I do not want all devices to see the responses generated by other publish calls from other devices.
Am I correct here?
Is there any way that a webhook subscription callback can be limited to responses generated by the specific device’s publications?
By the way, I found the answer to my own question.
From the documentation:
“You can also set the topic the webhook will use to help your devices filter and subscribe to the appropriate response! If you have a hook that services hundreds of devices, you can, for example include the device id in the topic, and have your device subscribe to events that only apply to it:”
Could there be a feature to create a new Webhook by cloning an existing one?
It’s kind of tiresome to have to re-create the Webhook every time there is a minor change.