Skip to content

Install

richibrics edited this page Dec 17, 2021 · 3 revisions

Install Python

PyMonitorMQTT needs Python3.7 to run. You can install it here.

Install PIP

To install required packages you need pip

Dependencies

To install dependencies all together, you only have to type in your terminal

python3 -m pip install -r requirements.txt

In addition, to get CPU temperature from Windows you need:

  • wmi (module from pip): python3 -m pip install wmi
  • Open Hardware Monitor (external software). Download it

Run as a systemd daemon on linux

You can run this program in the background automatically on startup this way.

  1. Edit PyMonitorMQTT.service
  • Change path on ExecStart line to point to main.py

  • Change user and group

  1. Copy the unit file, than enable and start the daemon
sudo cp PyMonitorMQTT.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable PyMonitorMQTT.service
sudo systemctl start PyMonitorMQTT.service
  1. Check if it's running correctly:
systemctl status PyMonitorMQTT.service

To check the logs:

sudo journalctl -u PyMonitorMQTT.service

Clone this wiki locally