Skip to main content

Telegram BOT as a personal computer reporting service.

Project description

pcreporter

Telegram BOT as a personal computer reporting service.

Features:

  • system overview reporting
  • temperature reporting
  • USB reporting and monitoring
  • defensive and observative modes
  • remote shutdown and screen lock
  • single chat user allowed to interact with the bot

Setup:

  1. Install the package from PyPi.
pipx install pcreporter
  1. Create a bot on Telegram and get the token.
  2. Create config file in the following format:
CHAT_ID=<chat_id>
IS_DEFENSIVE=false
CMD_LOCKSCRN=swaylock -f -c 000000 <replace with custom command if needed>
TOKEN=<telegram bot token>

To get the CHAT_ID value, run the bot with CHAT_ID of 0 and send a message to it. The CHAT_ID will be reported in the terminal and messaged back to the user on Telegram.

The config file could be placed in the following locations:

  • /etc/pcreporter.conf
  • ~/.config/pcreporter.conf
  • ~/.pcreporter.conf
  • (current working directory)/pcreporter.conf
  1. Run the bot.

Warning Do not run the bot as root. The bot will refuse to run if run as root (intentional design). For poweroff functionality, ensure you can run the command 'poweroff' as the non-root user.

Setup Tip: Using SystemD User Services

To run the bot as a user service, copy the file pcreporter.service form this repository to ~/.config/systemd/user/pcreporter.service and enable it with systemctl --user enable --now pcreporter.service.

Maintainers:

Used Python Packages:

  • python-telegram-bot
  • psutil
  • requests
  • uptime
  • usb-monitor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pcreporter-20240928.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

pcreporter-20240928-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file pcreporter-20240928.tar.gz.

File metadata

  • Download URL: pcreporter-20240928.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pcreporter-20240928.tar.gz
Algorithm Hash digest
SHA256 abe0bdd509028b8ffd1af96c9830cc67fe75d7928a186ce57f7be37fce5a7311
MD5 01c972853792368a216700fe0eeef2ca
BLAKE2b-256 8fd3e11da086af719564b2775b84bfe243894b95ff7a1e4fe6890c20bf0581ad

See more details on using hashes here.

File details

Details for the file pcreporter-20240928-py3-none-any.whl.

File metadata

File hashes

Hashes for pcreporter-20240928-py3-none-any.whl
Algorithm Hash digest
SHA256 d60795eeff5a45a856b5d7e908a9d4f4b3e81cfbdc9e9de3bea67b4b4f37a6a8
MD5 94df9768b94d57d057c0dca4350bf925
BLAKE2b-256 00c406acc774d54a1a92ff0d644aba07023a64858293557ee0a12591c7f555db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page