Need help implementing a custom listener #1380
-
Hey there, I am trying to build a custom apprise listener and need some help with that. This is the code I am testing with: from apprise.decorators import notify
@notify(on="foobar://192.168.1.226:1234?notify_on_complete=0")
def my_handler(body, meta, title=None, notify_type=None, *args, **kwargs):
print(f"Received notification: {notify_type}: {title} - {body}") and apprise -vv -b "use defaults" "foobar://192.168.1.226:1234" --plugin-path source/test.py
2025-08-02 12:42:25,573 - INFO - Loaded custom notification: foobar://
2025-08-02 12:42:25,574 - WARNING - An exception occured sending a Custom - foobar notification. Essentially, I want to be able to add my custom URL to Mealie (where I cant add any plugins like I did in the cli) which then sends the notification to my application. I was unable to get this working using the docs. Can you help me with that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Adding more verbosity
I will admite, the error doesn't help the situation at first glance, so I did have to do a bit of digging. But it just turns out to be the order that you're passing in the data that is causing the problem. Place @notify(on="foobar://192.168.1.226:1234?notify_on_complete=0")
def my_handler(body, title=None, notify_type=None, meta=None, *args, **kwargs):
print(f"Meta: {meta}")
print("---")
print(f"Received notification: {notify_type}: {title} - {body}") |
Beta Was this translation helpful? Give feedback.
Mealie would have to have a PR done to where it initializes Aprise... see here.
They would just need to define a directory it's local instance of Apprise could reference for plugins (where you would provide just a python file with your
@notify(on=...)
in it. If Mealie was in a contrainer, this wouldn't be a problem, as you would just update your docker container to add a volume to the path you could drop your custom files into.