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 the AUR or pypi.
  2. Create a bot on Telegram and get the token.
  3. 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.

If using the AUR package, the service file will be installed to the correct location.

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-20240927.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

pcreporter-20240927-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pcreporter-20240927.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-20240927.tar.gz
Algorithm Hash digest
SHA256 fc4b16469ab6636c6eed02cc8644dd6867f6866754dcd29e84b3ee2ac7f3edd3
MD5 3ca0ed05933088988cf0f49d2d00e9a8
BLAKE2b-256 972ddeb362dedb1a984aa1a13f6d15569999ea0799dd46e02e0079682b852f83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pcreporter-20240927-py3-none-any.whl
Algorithm Hash digest
SHA256 c42fab8638e33a097636b23843a3299296e4cf7877acd5c990523a524af01644
MD5 6ed01352f84409016a021c4e49cbe7d4
BLAKE2b-256 9537825176501f84224abd919640b762f66c6df2251233edefe38a1e98db3aa6

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