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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pcreporter-20240927.3.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.3.tar.gz
Algorithm Hash digest
SHA256 e71795dee51eb35dae1301c8cc2076e625c9ee086e5d6e76a0092ac54d71580a
MD5 19d23b7cbde99291b912c3ebe47be888
BLAKE2b-256 58e8da35896fe7d9f18c1f107365d1db7c344e84ae3e0bcaa65ab38ff9724bea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pcreporter-20240927.3-py3-none-any.whl
Algorithm Hash digest
SHA256 22d688322a8931d9781fda5462b8b9cc58a1ec62c26f1e2ec2eb57d1a8ec7a70
MD5 5be557486baed52b0695f05db024c14e
BLAKE2b-256 797bbb79f3f40c81cf0ace5ae247e38463a4f11247956821c90eaaa8827a0906

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