Difference between revisions of "MuonPi Telegram Bot"
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This article will explain how to set up a chat with our MuonPi Telegram Bot and how to register your chat with automatic detector and network-related updates. | This article will explain how to set up a chat with our MuonPi Telegram Bot and how to register your chat with automatic detector and network-related updates. | ||
− | DISCLAIMER: Tutorial written based on MuonPi Telegram Bot Version 1.0 | + | DISCLAIMER: Tutorial written based on MuonPi Telegram Bot Version 1.1.0 (27th of December 2021) |
__TOC__ | __TOC__ | ||
− | = Add MuonPi Bot to your chats = | + | = Add MuonPi-Bot to your chats = |
− | + | To verify your Telegram account with our Bot, please follow the steps below: | |
+ | * Make sure you accepted the usage of Telegram cookies with our website. To confirm this, go to the footer of the webpage and click cookie settings. | ||
+ | * Log in to your [https://muonpi.org/member-home.php member area] and click the "Log in with Telegram" widget. | ||
+ | * Enter your phone number to identify with your Telegram account. We do not save your phone number. | ||
+ | * Telegram will send you a verification message for authentification. Please click accept. | ||
+ | * Once accepted, the MuonPi-Bot will send you a welcome message and initializes a chat conversation. | ||
+ | * By typing '/help' or '/menu' you can start accessing the Bot's features. | ||
+ | * Optional: you can confirm your authentification with our website by checking the bottom left corner of the page when logged in to the member area. Your unique Telegram user ID should be displayed. | ||
<gallery mode="packed-hover"> | <gallery mode="packed-hover"> | ||
Line 16: | Line 23: | ||
Telegram Step 5.png|Step 5: Verify authentification | Telegram Step 5.png|Step 5: Verify authentification | ||
</gallery> | </gallery> | ||
+ | |||
+ | = Functionalities = | ||
+ | Most of the Bot's features can be accessed and controlled via a convenient menu with buttons. However, command-line controls are available, too. | ||
+ | == Account == | ||
+ | Manages accounts associated to the Telegram bot. Accounts are main LDAP user account with MuonPi (account to log in to the webpage) and MQTT accounts (accounts used for detectors to upload data). | ||
+ | * Telegram Account Information: Prints information about the authenticated Telegram account | ||
+ | * Remove Telegram Account: Removes Telegram account from the bot and deletes all database entries | ||
+ | * Add MQTT Account: Add MQTT account to add detectors that are managed through the MQTT account | ||
+ | * Remove MQTT Account: Removes chosen MQTT account | ||
+ | == Detectors == | ||
+ | * Update Detectors: Once you authenticate an MQTT account, all detectors managed through that account are connected to your Telegram bot. In case some MQTT account adds a detector, you can update the list of detectors here | ||
+ | * Remove Detector: Remove a certain detector from your list of detectors | ||
+ | * Show Settings: Shows current settings for all detectors | ||
+ | * Fetch data: Select a certain type of data for one of your detectors and get the mean value for the last 24 hours. | ||
+ | * Summary: Get a daily summary for all your detectors whenever you want | ||
+ | === Watchdog === | ||
+ | Surveil your detector by getting notified if something goes wrong. | ||
+ | * Change Settings: Chose level of triggers to be received for a certain detector. The status accompanying each trigger is described [https://wiki.muonpi.org/index.php?title=Detector_Status here]. Settings are: | ||
+ | ** allon: All triggers are sent | ||
+ | ** alloff: No triggers are sent | ||
+ | ** essentialon: Only detector online and offline triggers are sent | ||
+ | * All on / All off: Turn on/off all triggers for all detectors | ||
+ | === Daily Updates === | ||
+ | Daily updates for each detector can be sent using this function. | ||
+ | * Change Settings: turn daily updates on/off for a specific detector | ||
+ | * All on / All off: Turns on/off daily updates for all detectors | ||
+ | == MuonPi Network == | ||
+ | Here you can get information about the overall MuonPi detector network. | ||
+ | * Change settings | ||
+ | ** turn on/off daily updates for the detector network | ||
+ | ** Change settings for L1Event push notifications | ||
+ | *** Set the coincidence level with 'N=>x' where x is the number of detectors taking part in a L1Event. Only if more or equal than x detectors have seen an event coincidentally, send the push notification. | ||
+ | *** Set maximum coincidence time window: time in nanoseconds in which all detectors for the L1Event have had to see the event. Only send if all detector are within this time window. Standard value is 999,999,999ns | ||
+ | * Send summary: get the daily summary for the network whenever you want | ||
+ | * Show settings: shows current daily summary notification settings for Telegram account | ||
+ | |||
+ | = Troubleshooting = | ||
+ | It may be that you encounter some problems setting up the Bot. In case none of the following solutions solves your issue, please send a mail to support@muonpi.org and we will try to assist. | ||
+ | * I can't see the Telegram log in widget: | ||
+ | ** It may be you have not accepted the Telegram cookie, please check your settings and accept the Telegram cookie | ||
+ | ** In case you remove your account using the Bot and you decided to authenticate again, you might need to log out and log back in into the member area | ||
+ | * My daily updates are empty (showing only zeros) | ||
+ | ** Detector is offline and there is no data in the Influx database for the last 24 hours | ||
+ | |||
+ | = Changelog = | ||
+ | == Version 1.3.0 (10/01/2022) == | ||
+ | * Added option to receive push notifications for L1Events with coincidence levels of N=3 and greater. | ||
+ | * Re-formatted some of the automatically generated text messages and adjusted data display for some measurements for better readability. | ||
+ | == Version 1.2.0 (31/12/2021) == | ||
+ | * Reworked main menu: simplified menu where sub-menu 'Detectors' now comprises everything detector-related, such as watchdog and daily update settings | ||
+ | * Watchdog and daily update settings now configurable down to a single detector level | ||
+ | * Added option for additionally receiving daily updates from the wider MuonPi Detector Network, showing information about how many detectors are only, how many coincidences are measured, and more. | ||
+ | == Version 1.1.0 (27/12/2021) == | ||
+ | * User authentication reworked: once authenticated through the webpage, you can add and remove MQTT accounts to your Bot. This is especially useful if you share a detector with a group of administrators. | ||
+ | * Reimplemented watchdog triggers from the Detector Network Processor (DNP). You can now choose between different levels of triggers being sent to you. | ||
+ | * Detector summary, aka daily update, now shows more and slightly updated information | ||
+ | * Various bug fixes, e.g. spam protection not being reset, and more |
Latest revision as of 18:29, 10 January 2022
This article will explain how to set up a chat with our MuonPi Telegram Bot and how to register your chat with automatic detector and network-related updates.
DISCLAIMER: Tutorial written based on MuonPi Telegram Bot Version 1.1.0 (27th of December 2021)
Contents
Add MuonPi-Bot to your chats
To verify your Telegram account with our Bot, please follow the steps below:
- Make sure you accepted the usage of Telegram cookies with our website. To confirm this, go to the footer of the webpage and click cookie settings.
- Log in to your member area and click the "Log in with Telegram" widget.
- Enter your phone number to identify with your Telegram account. We do not save your phone number.
- Telegram will send you a verification message for authentification. Please click accept.
- Once accepted, the MuonPi-Bot will send you a welcome message and initializes a chat conversation.
- By typing '/help' or '/menu' you can start accessing the Bot's features.
- Optional: you can confirm your authentification with our website by checking the bottom left corner of the page when logged in to the member area. Your unique Telegram user ID should be displayed.
Functionalities
Most of the Bot's features can be accessed and controlled via a convenient menu with buttons. However, command-line controls are available, too.
Account
Manages accounts associated to the Telegram bot. Accounts are main LDAP user account with MuonPi (account to log in to the webpage) and MQTT accounts (accounts used for detectors to upload data).
- Telegram Account Information: Prints information about the authenticated Telegram account
- Remove Telegram Account: Removes Telegram account from the bot and deletes all database entries
- Add MQTT Account: Add MQTT account to add detectors that are managed through the MQTT account
- Remove MQTT Account: Removes chosen MQTT account
Detectors
- Update Detectors: Once you authenticate an MQTT account, all detectors managed through that account are connected to your Telegram bot. In case some MQTT account adds a detector, you can update the list of detectors here
- Remove Detector: Remove a certain detector from your list of detectors
- Show Settings: Shows current settings for all detectors
- Fetch data: Select a certain type of data for one of your detectors and get the mean value for the last 24 hours.
- Summary: Get a daily summary for all your detectors whenever you want
Watchdog
Surveil your detector by getting notified if something goes wrong.
- Change Settings: Chose level of triggers to be received for a certain detector. The status accompanying each trigger is described here. Settings are:
- allon: All triggers are sent
- alloff: No triggers are sent
- essentialon: Only detector online and offline triggers are sent
- All on / All off: Turn on/off all triggers for all detectors
Daily Updates
Daily updates for each detector can be sent using this function.
- Change Settings: turn daily updates on/off for a specific detector
- All on / All off: Turns on/off daily updates for all detectors
MuonPi Network
Here you can get information about the overall MuonPi detector network.
- Change settings
- turn on/off daily updates for the detector network
- Change settings for L1Event push notifications
- Set the coincidence level with 'N=>x' where x is the number of detectors taking part in a L1Event. Only if more or equal than x detectors have seen an event coincidentally, send the push notification.
- Set maximum coincidence time window: time in nanoseconds in which all detectors for the L1Event have had to see the event. Only send if all detector are within this time window. Standard value is 999,999,999ns
- Send summary: get the daily summary for the network whenever you want
- Show settings: shows current daily summary notification settings for Telegram account
Troubleshooting
It may be that you encounter some problems setting up the Bot. In case none of the following solutions solves your issue, please send a mail to support@muonpi.org and we will try to assist.
- I can't see the Telegram log in widget:
- It may be you have not accepted the Telegram cookie, please check your settings and accept the Telegram cookie
- In case you remove your account using the Bot and you decided to authenticate again, you might need to log out and log back in into the member area
- My daily updates are empty (showing only zeros)
- Detector is offline and there is no data in the Influx database for the last 24 hours
Changelog
Version 1.3.0 (10/01/2022)
- Added option to receive push notifications for L1Events with coincidence levels of N=3 and greater.
- Re-formatted some of the automatically generated text messages and adjusted data display for some measurements for better readability.
Version 1.2.0 (31/12/2021)
- Reworked main menu: simplified menu where sub-menu 'Detectors' now comprises everything detector-related, such as watchdog and daily update settings
- Watchdog and daily update settings now configurable down to a single detector level
- Added option for additionally receiving daily updates from the wider MuonPi Detector Network, showing information about how many detectors are only, how many coincidences are measured, and more.
Version 1.1.0 (27/12/2021)
- User authentication reworked: once authenticated through the webpage, you can add and remove MQTT accounts to your Bot. This is especially useful if you share a detector with a group of administrators.
- Reimplemented watchdog triggers from the Detector Network Processor (DNP). You can now choose between different levels of triggers being sent to you.
- Detector summary, aka daily update, now shows more and slightly updated information
- Various bug fixes, e.g. spam protection not being reset, and more