Skip to content

Onepush configuration [EN]

18870 edited this page Aug 19, 2022 · 3 revisions

Error notify configuration

Alas use Onepush for push message. Support multiple platforms like Bark, ServerChan, Discord, mail(SMTP) etc.

Complete support list here Onepush providers

Obtain params

Each platform requires different parameters.


Take Bark as example,

In Onepush repository,find _params in providers/bark.py

    _params = {
        'required': ['key'],

This shows that this provider requires key as parameters.

In Bark APP, we can find key here in the server list

Show Picture

image

In this example key is Vg*******************


Mail

Mail is sent via SMTP。You need to obtain the following parameters from your mail service provider (such as Gmail)

    _params = {
        "required": ["host", "user", "password"],
  • host: smtp server address.
  • user: username, usually this is your mailbox address.
  • password: password to login, for some service provider you need to apply for an individual key to use smtp.
  • port: smtp server port, use ssl port(465, 587, etc.) for secure if possible.
  • ssl: explicitly specifies to use ssl connection. When the port is 465, ssl will be used automatically.

Commom mail service:


For other platform, please refer to their document for more details.
Feel free to add more tutorials

Configuration

Configuration is in json format. Need two items: push service name provider and the corresponding parameter dictionary params.

In the case of Bark, the parameters key have been obtained above: Vg******************* So the final configuration is

{
    "provider": "bark",
    "params": {
        "key": "Vg*******************"
    }
}

Let's add more parameter, such as sound

{
    "provider": "bark",
    "params": {
        "key": "Vg*******************",
+        "sound": "alarm"
    }
}
More Examples
  • Mail
    don't forget ssl
{
    "provider": "smtp",
    "params": {
        "host": "smtp.gmail.com",
        "port": 587,
        "ssl": true,
        "user": "[email protected]",
        "password": "abcdefghijklmnopq"
    }
}
{
    "provider": "smtp",
    "params": {
        "host": "smtp.qq.com",
        "port": 465,
        "user": "[email protected]",
        "password": "abcdefghijklmnopq"
    }
}
  • discord
{
    "provider": "discord", 
    "params": {
        "webhook": "https://discord.com/api/webhooks/12345678912345678900/verylongstring_veryveryverylongstring"
    }
}

In case you mess up, you can verify you json format here

Finally, copy your json to Alas -> Debug Settings -> Error notify config.

Clone this wiki locally