OctoPrint-IFTTT icon indicating copy to clipboard operation
OctoPrint-IFTTT copied to clipboard

Added ability to specify and call a custom webhook instead of specifying maker keys

Open derekantrican opened this issue 3 years ago • 3 comments

Resolves #39

Let me know if you have any additional things you would like me to add. I am unfamiliar with Python, Octoprint webhooks, and the various "languages" used here (eg jinja & KnockoutJS) so I made what changes I could, but there could be other things missing. Some things I noticed that might need to be updated:

  • translations? (not sure what the process is for that)
  • Readme (looks like there's two - I imagine one is for this repo and one is for the plugin page)
  • plugin version
  • in testing, I realized that the webhook will get fired twice if you have 2 prefixes (eg the default "OctoPrint-" & "op-". Not sure if we want to add the key to the webhook url or somehow include the key in the payload so that this doesn't cause confusion

derekantrican avatar Oct 06 '21 04:10 derekantrican

@tjjfvi I have also tested this successfully. Let me know what you think

derekantrican avatar Oct 16 '21 03:10 derekantrican

I do have an interest in this functionality, but I'm not sure how I want to integrate it. A lot of the design was centered around what IFTTT does and does not support, so I'd want to reconsider some of the other aspects.

I don't have the bandwidth to look at this right now, but I'll try to look at it in the next few weeks.

Thanks for making these PRs!

tjjfvi avatar Oct 19 '21 16:10 tjjfvi

Yeah, I made this because there's already a very similar plugin (https://github.com/2blane/OctoPrint-Webhooks) but it doesn't have support for custom events. I submitted an issue there but it's been over a year. I'm also working on creating a PR there for the functionality but it requires more work & understanding.

derekantrican avatar Oct 19 '21 17:10 derekantrican

@tjjfvi been a while! I've also been busy, so I understand, but any chance this could be merged?

derekantrican avatar Dec 28 '22 03:12 derekantrican

"next few weeks", 14 months, same difference ;)

Yeah, this looks good to merge. Thanks for working on this, and sorry for being so very slow.

tjjfvi avatar Dec 28 '22 15:12 tjjfvi

@derekantrican Should be released in 1.4.1; let me know if I did that correctly :)

tjjfvi avatar Dec 28 '22 15:12 tjjfvi

@tjjfvi Thanks! The only things I can think of are the comments in the jinja file about translations. Should I have added those somewhere?

derekantrican avatar Dec 28 '22 16:12 derekantrican

I looked over it and I don't think there are currently any translations; the translations/ dir is empty but for a README.

tjjfvi avatar Dec 28 '22 16:12 tjjfvi

@derekantrican Should be released in 1.4.1; let me know if I did that correctly :)

I don't think I'm seeing a 1.4.1 release - still 1.4.0

derekantrican avatar Dec 30 '22 05:12 derekantrican

Oops, failed to click the big "new release" button. How about now?

tjjfvi avatar Dec 30 '22 13:12 tjjfvi

Yup, looks good :)

derekantrican avatar Dec 30 '22 16:12 derekantrican