Skip to main content

Python daemon that gets information from psutil to an mqtt broker for integration with Home Assistant.

Project description

PyPI version

ps2mqtt

Python daemon that gets information from psutil to an mqtt broker for integration with Home Assistant.

Install

You can install ps2mqtt from pypi:

$ pip install ps2mqtt

If you wish to run ps2mqtt through systemd, download the ps2mqtt.service file from this repository and edit according to your system.

Then just copy to systemd path and enable the service before starting:

$ sudo cp ps2mqtt.service /etc/systemd/system/

$ sudo systemctl enable ps2mqtt.service 

$ systemctl start ps2mqtt.service 

Options

ps2mqtt has several command line options you should use when customizing ps2mqtt.service:

  -h, --help                                  show this help message and exit
  --config CONFIG                             configuration file, will be created if non existing
  --period PERIOD                             updates period in seconds
  --mqtt-server MQTT_SERVER                   MQTT server
  --mqtt-port MQTT_PORT                       MQTT port
  --mqtt-username MQTT_USERNAME               MQTT username
  --mqtt-password MQTT_PASSWORD               MQTT password
  --mqtt-base-topic MQTT_BASE_TOPIC           MQTT base topic
  --ha-discover-prefix HA_DISCOVER_PREFIX     HA discover mqtt prefix
  --ha-status-topic HA_STATUS_TOPIC           HA status mqtt topic

You can also store all the options in a file, just run all your options plus the --config /etc/ps2mqtt.yaml to store all your parameters in a config file. Next time you run, just use --config /etc/ps2mqtt.yaml.

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

ps2mqtt-0.0.5.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file ps2mqtt-0.0.5.tar.gz.

File metadata

  • Download URL: ps2mqtt-0.0.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ps2mqtt-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0eb158eda288f892d0a1d753681b0b6b40c1fafa72a70b8912748865579759e2
MD5 f997052d5c530e38fad96a74ce2233c9
BLAKE2b-256 63f605dca6fc5fd47d66701d8cbbeceb31d5cb31869536c8c9420b0e75ddb9f0

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