Rest Message Ack's

Hey everyone,

I wrote a simple app for my pebble that sends a HTTPS post to the spark cloud servers. Everything is working fine 80% of the time, however for some reason I think the post messages are not making it down to my device 100% of the time. I looked around a bit but did not fine much about message ACK’s from the sparkcore back up to the calling device? Does anyone know where I can read more about this ?



I don’t know that you’ll get an ACK per-se, but whatever is calling the Spark Cloud API will receive some sort of JSON response, even if it’s a 408 timeout (the Cloud was unable to reach your Core). You may want to see if there’s a way you can display the JSON response or log it for later viewing so you can debug a little more.

Personally, I’ve had problems with a Pebble app that I wrote to control my deck lights. It doesn’t work unless the Pebble app is open on my phone (iPhone 4S), and even then, it can be sketchy. I’m convinced it’s something to do with the Pebble <–> Phone <–> Internet and not the Spark Core itself as I wrote a simple mobile web interface to do the same thing from my phone and it never has any issues.

@ChrisLewis knows a lot about Pebble and Spark, so he may be able to comment. Everything I know about Pebble programming, I learned from his tutorials!

Hi @ril3y,

Good question! If you’re hitting the API to call a spark function, there are a few possible failure scenarios:

  • Timeout (30 seconds) when waiting on a response ok: false, 200 OK status code
  • Core doesn’t have that function ok: false, error: “Function not Found”, 404 NOT FOUND status code
  • Some error happened ok: false, error=the error, 400 status code
  • Something blew up, ok: false, 500 server error code


Hi Riley and all,

See this link for part two (and a link to part one) which may help you in some fashion. I cannot write more at the moment, but soon I will be able and can help more!

Pebble message not working consistently may be a symptom of too small buffers, or messages being sent before the previous one is ACK’d.

Here’s the link: