User Tools

Site Tools



en:websonix:bot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:websonix:bot [2021/01/26 13:31] – created blen:websonix:bot [2023/09/21 22:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== users notifying script about the measurement status ======+====== Script for users notification about the measurement status ======
  
 The **Bot** sends notifications about measurement errors by **e-mail** and/or **telegram** channel. Information about errors is extracted from the measurement protocol. Moreover, users can send any messages from measurement scripts using the following code: The **Bot** sends notifications about measurement errors by **e-mail** and/or **telegram** channel. Information about errors is extracted from the measurement protocol. Moreover, users can send any messages from measurement scripts using the following code:
Line 14: Line 14:
 The package consists form the following modules: The package consists form the following modules:
  
-  * **protocol_reader** - модуль для чтения протоколов измерения+  * **protocol_reader** - a module for reading measurement protocol
-  * **messangers** - список функций для рассылки, содержит классы для рассылки по почте и telegram, а так же функции send_message, которая отправляет сообщение по всем указанным адресам+  * **messangers** - a module with classes for send messages by e-mail and telegram and function **send_message**which sends message by all registered addresses
-  * **logwatch** - sonix-подобное устройство, которое сканирует рабочий протокол и в случае нахождения ошибок отправляет сообщение функцией send_message.+  * **logwatch** - sonix device to scan protocol and send error messages to users.
  
 ==== Configuration file ==== ==== Configuration file ====
  
-Конфигурационный файл записывается в формате json, и отвечает за следующие параметры+configuration file in json format:
  
   - **mail** - e-mail configuration:   - **mail** - e-mail configuration:
     - **user** - user for e-mail authentication;     - **user** - user for e-mail authentication;
     - **password** - password for e-mail authentication;     - **password** - password for e-mail authentication;
-    - **port** - порт почтового сервера, через который будут отправляться почтовые сообщения+    - **port** - e-mail server port
-    - **server** - dns имя сервера, через который будет осуществляться почтовая рассылка+    - **server** - e-mail server ip or domain name
-    - **recipients** - список получателей для отправляемого письма.+    - **recipients** - e-mail recipients list.
   - **telegram** - telegram configuration:   - **telegram** - telegram configuration:
-    - **bot-id** - id бота для рассылки сообщений+    - **bot-id** - the id of the bot sending messages
-    - **channel-id** - id канала, на который стоит отправлять сообщения.+    - **channel-id** - the id of the channel for sending messages.
  
 Configuration file example: Configuration file example:
Line 54: Line 54:
 ===== Bot installation on instrument ===== ===== Bot installation on instrument =====
  
-Для подключения Bot на спектрометре необходимо установить соответствующий пакет, заполнить параметры в конфигурационном файле для отправки сообщений и настроить загрузку модуля logwatch.py в настройках Sonix+.+Bot installation on instruments consists of the following steps: 
 +  * Package installation; 
 +  * Configuring parameters for messages sending; 
 +  * Configuring loading module logwatch.py as Sonix+ module.
  
  
  
en/websonix/bot.1611657066.txt.gz · Last modified: (external edit)