Skip to main content

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

Metadata

Release files for pcreporter 20240928

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pcreporter 20240928
File Size Uploaded
pcreporter-20240928.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pcreporter 20240928
File Interpreter ABI Platform
pcreporter-20240928-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / pcreporter-20240928.tar.gz

Download URL pcreporter-20240928.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
abe0bdd509028b8ffd1af96c9830cc67fe75d7928a186ce57f7be37fce5a7311
BLAKE2b-256 checksum
How to use checksums
8fd3e11da086af719564b2775b84bfe243894b95ff7a1e4fe6890c20bf0581ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / pcreporter-20240928-py3-none-any.whl

Download URL pcreporter-20240928-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d60795eeff5a45a856b5d7e908a9d4f4b3e81cfbdc9e9de3bea67b4b4f37a6a8
BLAKE2b-256 checksum
How to use checksums
00c406acc774d54a1a92ff0d644aba07023a64858293557ee0a12591c7f555db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release history Release notifications | RSS feed

This release

20240928 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page