Pixela icon indicating copy to clipboard operation
Pixela copied to clipboard

Increment by value higher than 1 / rate limit?

Open craigeley opened this issue 3 years ago • 3 comments

Hello there! So, I am trying to add real-time data in increments larger than 1, for example, ounces of water that I drink. When I finish a water bottle, that would be 24 ounces. I have tried to run this in iOS Shortcuts that sends 24 "increment" PUT messages in a loop, but it is returning an error saying it "cannot parse response." My guess is that I am hitting a rate limit. Am I? Is there better way to increment a pixel by a value larger than one? Or is there a way to add a number to a pixel without replacing the entire pixel?

Thanks!

craigeley avatar May 30 '22 01:05 craigeley

@craigeley Thank you for your question!

The only way to achieve your objective with the current Pixela is the way you wrote it. (Yes, the current specifications are inconvenient and I will consider updating them)

You write that your request may have touched the rate limit, but the rate limit is set at a much higher level (I cannot give you the details of that, sorry).

Therefore, I think there must be some other cause. Let's explore that together!

  • Can you attach a screenshot of the full iOS shortcut you are using?
  • If you change it to run the loop only once, will that cause any problems?
  • What is the result if you intersperse a sleep of 1 second each time in your loop process?

a-know avatar May 30 '22 12:05 a-know

Here is the current shortcut: Screen Shot 2022-05-30 at 8 56 55 AM

As you can see, I have an option to just run the loop a single time. When I use that, I still get the "cannot parse response" error sometimes, but not all of the time. When I run this from the command line, it always works, but it seems like Shortcuts has an issue. Could be a bug on their side, but there is like no way that I can see to debug or look at what is happening here...Any advice you have would be appreciated!

craigeley avatar May 30 '22 14:05 craigeley

@craigeley Thank you for details. ...fmm, it's weird. I think that there is something wrong with iOS shortcut but I can't specify the cause.

BTW, could you try to create and invoke Webhook ( type : increment) instead of PUT /increment ?

a-know avatar May 31 '22 13:05 a-know

(Sorry I've totally forgotten)

I've added a new API endpoint, /add . https://github.com/a-know/Pixela/releases/tag/v1.26.0

Regarding this issue, please that API. I'll close this issue.

a-know avatar May 18 '23 13:05 a-know