Webhooks no longer working?

what does spark webhook list say?

1 Like

My list is fine. Didn’t test the webhook though

1 Like

The webhook itself seems to be fine.

    1.) Hook #555608e22ccd38832b2503df is watching for "get_sunrise"
    and posting to: http://api.wunderground.com/api/<myapi>/astronomy/q/NewYork/newyork.json
    created at 2015-05-15T14:55:30.522Z

EDIT: The reason it was created recently was because I wanted to make sure it wasn’t an API key problem, so I remade it with a new one. No change.

EDIT 2: Here’s the line in my code:

    Spark.subscribe("hook-response/get_sunrise", gotSunriseData, MY_DEVICES); 

My other Spark.publish lines are working fine. And no code has been updated since it stopped working.

Can you try removing the webhook and create again to see if it starts working?

1 Like

The one I just posted above I remade about an hour ago.

@Dave might need your help here

1 Like

@ruben did you happen to test your webhook? Are things working alright for you? Mine still isn’t firing.

I haven’t tried a new one but this one looks to be working ok. Sort of . I will say that 1 out of every 2 calls seems to either take forever for a response or it just never gets one. I’m not sure if that has to do with the server “load balancing” requests or if it has something to do with the move to particle. That is, I never used it enough before the move to know if the behavior would have been the same.

Alright, I created yet another webhook, this time with requestb.in, and fired it outside of my code.

Here’s the JSON:

"eventName": "get_sunrise3",
"url": "http://requestb.in/v9a9sfv9",
"requestType": "POST",
"headers": null,
"responseTemplate": "",
"json": null,
"auth": null,
"mydevices": true 

Then, in command line I’ve triggered:

 spark publish get_weather3

Gotten this reply:

posted event!

and seen this in my dashboard:

but, nothing in requestb.in. something’s fishy here!

@lanewinfield shouldn’t it be get_sunrise3 for the publish message?

Yep. I’m an idiot. THAT showed up in requestb.in.

My original issue still stands, though—unable to get data back from get_sunrise.

@kennethlimcp I updated my code as well to try out requestb.in:

Spark.subscribe("hook-response/get_sunrise3", gotSunriseData, MY_DEVICES);  

And put a line at the top of gotSunriseData to debug:

Spark.publish("debug", "sunrise_triggered");

And that doesn’t show up at all in the dashboard. Don’t know if I’m doing that correctly, though.

@lanewinfield i think the hook response appears in the Dashboard when a trigger occurs. Did you see that?

Sorry i would love to unblock you as much as i can but those stuff are beyond my access and the Spark team just wrapped up an awesome week at Maker Faire with all the new name change, photon etc etc. :smiley:

I will bring this up to them on Monday again :slight_smile:

1 Like

Yeah, nothing is showing up in the Dashboard that publishes in gotSunriseData. There is another publish that happens in another part of my code that shows up just fine.

This is controlling my blinds, so this is far from time-pressing, so more partying for the Spark/Particle team! :smile:

Thanks for your help in the interim, @kennethlimcp!

Just tested mine and it works.

Can you try this:

particle webhook GET get_weather http://w1.weather.gov/xml/current_obs/KMSP.xml

particle subscribe mine

In another terminal:

particle publish get_weather

You should see stuff in the Dashboard as well

I’m running this as spark and not particle, but I’ll assume it works the same.

this is the reply I get:


You should see something after that. How many webhooks do you have?

I deleted every webhook but that one so I could test it properly.

Okay. I fixed it, and as one usually finds out, it’s been user error all along. I had been putting my Spark.subscribe() into loop() and never publishing my webhook.

The weird part is that it seemed to work fine that way for three days and then stopped working entirely. I updated the code and it’s working fine now… hopefully it will work indefinitely.

Thanks for your help, @kennethlimcp. Feeling pretty dumb :smile:


Sorry to keep this going, but it looks like the issue still stands, and it seems like someone else on the forum had more luck getting through to the top brass at Particle, so I’ll just divert my attention there.

Thanks again for your help though!

1 Like