config.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. return {
  2. -- 角色类型 MASTER: 主机,可主动联网; SLAVE: 从机,不可主动联网,通过串口发送数据
  3. -- ROLE = {"MASTER","SLAVE"}
  4. ROLE = "MASTER",
  5. --
  6. -- 通知类型, 支持配置多个
  7. -- NOTIFY_TYPE = {"custom_post", "telegram", "pushdeer", "bark", "dingtalk", "feishu", "wecom", "pushover", "inotify", "next-smtp-proxy", "gotify", "serial"},
  8. NOTIFY_TYPE = "serial",
  9. --
  10. -- custom_post 通知配置, 自定义 POST 请求, CUSTOM_POST_BODY_TABLE 中的 {msg} 会被替换为通知内容
  11. CUSTOM_POST_URL = "https://sctapi.ftqq.com/<SENDKEY>.send",
  12. CUSTOM_POST_CONTENT_TYPE = "application/json",
  13. CUSTOM_POST_BODY_TABLE = {["title"] = "这里是标题", ["desp"] = "这里是内容, 会被替换掉:\n{msg}\n{msg}"},
  14. --
  15. -- telegram 通知配置, https://github.com/0wQ/telegram-notify 或者自行反代
  16. TELEGRAM_API = "https://api.telegram.org/bot{token}/sendMessage",
  17. TELEGRAM_CHAT_ID = "",
  18. --
  19. -- pushdeer 通知配置, https://www.pushdeer.com/
  20. PUSHDEER_API = "https://api2.pushdeer.com/message/push",
  21. PUSHDEER_KEY = "",
  22. --
  23. -- bark 通知配置, https://github.com/Finb/Bark
  24. BARK_API = "https://api.day.app",
  25. BARK_KEY = "",
  26. --
  27. -- dingtalk 通知配置, https://open.dingtalk.com/document/robots/custom-robot-access
  28. DINGTALK_WEBHOOK = "",
  29. --
  30. -- feishu 通知配置, https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN
  31. FEISHU_WEBHOOK = "",
  32. --
  33. -- wecom 通知配置, https://developer.work.weixin.qq.com/document/path/91770
  34. WECOM_WEBHOOK = "",
  35. --
  36. -- pushover 通知配置, https://pushover.net/api
  37. PUSHOVER_API_TOKEN = "",
  38. PUSHOVER_USER_KEY = "",
  39. --
  40. -- inotify 通知配置, https://github.com/xpnas/Inotify 或者使用合宙提供的 https://push.luatos.org
  41. INOTIFY_API = "https://push.luatos.org/XXXXXX.send",
  42. --
  43. -- next-smtp-proxy 通知配置, https://github.com/0wQ/next-smtp-proxy
  44. NEXT_SMTP_PROXY_API = "",
  45. NEXT_SMTP_PROXY_USER = "",
  46. NEXT_SMTP_PROXY_PASSWORD = "",
  47. NEXT_SMTP_PROXY_HOST = "smtp-mail.outlook.com",
  48. NEXT_SMTP_PROXY_PORT = 587,
  49. NEXT_SMTP_PROXY_FORM_NAME = "Air780E",
  50. NEXT_SMTP_PROXY_TO_EMAIL = "",
  51. NEXT_SMTP_PROXY_SUBJECT = "来自 Air780E 的通知",
  52. --
  53. -- gotify 通知配置, https://gotify.net/
  54. GOTIFY_API = "",
  55. GOTIFY_TITLE = "Air780E",
  56. GOTIFY_PRIORITY = 8,
  57. GOTIFY_TOKEN = "",
  58. --
  59. -- 定时查询流量间隔, 单位毫秒, 设置为 0 关闭 (建议检查 util_mobile.lua 文件中运营商号码和查询代码是否正确, 以免发错短信导致扣费, 收到查询结果短信发送通知会消耗流量)
  60. QUERY_TRAFFIC_INTERVAL = 0,
  61. --
  62. -- 定时基站定位间隔, 单位毫秒, 设置为 0 关闭 (定位成功后会追加到通知内容后面, 基站定位本身会消耗流量, 通知内容增加也会导致流量消耗增加)
  63. LOCATION_INTERVAL = 0,
  64. --
  65. -- 开机通知 (会消耗流量)
  66. BOOT_NOTIFY = true,
  67. --
  68. -- 通知内容追加更多信息 (通知内容增加会导致流量消耗增加)
  69. NOTIFY_APPEND_MORE_INFO = true,
  70. --
  71. -- 通知最大重发次数
  72. NOTIFY_RETRY_MAX = 20,
  73. --
  74. -- 开启低功耗模式, USB 断开连接无法查看日志, RNDIS 网卡会断开
  75. LOW_POWER_MODE = false,
  76. }