Skip to content

Onepush configuration [EN]

18870 edited this page Sep 9, 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*******************


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

Configuration

Configuration is in yaml format. Need push service name provider and their corresponding parameters.

Bark

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

provider: bark
key: Vg*******************

Let's add more parameter, such as sound

provider: bark
key: Vg*******************
sound: alert

Mail

don't forget ssl

provider: smtp
host: smtp.gmail.com   # smtp server address
user: [email protected]   # username, usually this is your mailbox address
password: Passw0rd!    # password to login, for some service provider you need to apply for an individual key to use smtp.
port: 587              # smtp server port, use ssl port(465, 587, etc.) for secure if possible.
ssl: true              # explicitly specifies to use ssl connection. When the port is 465, ssl will be used automatically.
provider: smtp
host: smtp.qq.com
user: [email protected]
password: Passw0rd!
port: 465
# ssl: true
Commom mail service

Discord Webhook

Document

provider: discord 
webhook: https://discord.com/api/webhooks/12345678912345678900/verylongstring_veryveryverylongrandomstring

Pushplus

Official website

provider: pushplus
token: ********************

Pushdeer

Official website

provider: pushdeer
pushkey: **********************

ServerChanTurbo

Official website

provider: serverchanturbo 
sctkey: SCT16*************************

Telegram Bot

Document

provider: telegram
token: 16xxxxxxx:xxxxxxxxxxx       # get from @BotFather
userid: 10000000                   # get from @userinfobot
api_url: api.telegram.org

Wechatwork application

Document

provider: wechatworkapp
corpid: xxxxxxxx
corpsecret: xxxxxxxx
agentid: 10001

Wechatwork bot

Document

provider: wechatworkbot
key: xxxxxxxx

dingtalk

Document

provider: dingtalk
token: xxxxxxxx

go-cqhttp

Document

provider: gocqhttp
endpoint": http://cqhttp.example.com:5700
access_token: YOUR_TOKEN
message_type: private
# user_id: 12345678
# group_id: 12345678

Custom webhook

provider: custom
url: https://your.web.hook/path   # your webhook
method: post                      # http method
data:                             # data dict
  your_arg: aaa
  your_arg2: bbb

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

Test pushing

Mails

Open mail page in game, find any task and clear its next run to add it to the waiting queue, then run alas. This will send a GamePageUnknownError few seconds later.

Clone this wiki locally