2blane / OctoPrint-Webhooks

Make OctoPrint events call your custom webhooks!
GNU Affero General Public License v3.0
28 stars 19 forks source link

Multiple Webhook calls for single event. #15

Open xrxca opened 4 years ago

xrxca commented 4 years ago

I haven't looked all that far into this issue, but when my printers pauses for a color change it triggers the webhook every two seconds till I get to the printer. Since the hook in question is on my own server, I was able to check the logs, on two different prints with a color change part way, on one there were 285 calls, on the other only 97 (I was on the same floor)

My server just validates the call from a machine on the local network then sends a text message using an online service, since I've seen this bad behavior in other apps, my server has a limit (same message repeated within 15 minutes won't get sent) but if I'd set it up to trigger directly on the cloud service I'd have had almost 400 messages sent.

Is this a function of the return value from the webpage, that I can control/change if necessary, something else in Octoprint, or a bug in the plugin?.

There should probably some kind of a throttle.

2blane commented 3 years ago

I have seen this issue before. I think I have a solution, but it's more of a throttle. Will throttle it back to a message every 5 minutes.

DaveTSG commented 3 years ago

For what it's worth, I'm experiencing this too. (I've only recently installed the plugin) OctoPrint 1.5.3, Webhooks v3.0.3, Python 2.7.16.

When I start a print, I get almost a dozen "print started" notifications, and also a "user action needed" notification at the same time.

Other notifications work fine, e.g. print finished I only get one notification, and expected user action needed events (e.g. changing filament) also only results in one notification.

Happy to provide further details if you let me know what's needed... :)

MildMastermind commented 3 years ago

I had the same issue the other day when my printer paused for the first time after installing this. I suspect the printer firmware just spams the "print paused", and there is nothing in the plugin to handle the spamming.

nicholaskillin commented 2 years ago

I just ran into this as well. The user action needed action is pretty bad, sending TONS of Webhooks when triggered.

It also looks like this repo hasn't seen any updates in a while. Is this still being maintained, or should I look for other solutions?

edm00se commented 2 years ago

I also get this with a "print paused" event; endless duplicate messages until I disable the plugin entirely. The other events seem fine to me.

derekantrican commented 1 year ago

This is now being tracked in the new repo here: https://github.com/derekantrican/OctoPrint-Webhooks/issues/5