From ac5d9927f28d788443963e89a19c788bc9d26609 Mon Sep 17 00:00:00 2001 From: hjelev Date: Sun, 20 Mar 2022 22:40:46 +0200 Subject: [PATCH] update --- README.md | 10 ++++++---- install.sh | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 147e0d7..3ab1cb0 100644 --- a/README.md +++ b/README.md @@ -36,16 +36,18 @@ I have created an automated bash installation, its working but not extensively t bash <(curl -s https://raw.githubusercontent.com/hjelev/rpi-mqtt-monitor/master/remote_install.sh) ``` +If you don't like the automated installation here are manuall installation instructions: - -If you don't have pip installed: +Install pip if you don't have it: ```bash $ sudo apt install python-pip ``` Then install this module needed for the script: ```bash $ pip install paho-mqtt - +``` +Clone the repository: +```bash $ git clone https://github.com/hjelev/rpi-mqtt-monitor.git ``` Copy ```/src/rpi-cpu2mqtt.py``` and ```/src/config.py.example``` to a folder of your choice (I am using ```/home/pi/scripts/``` ) and rename ```config.py.example``` to ```config.py``` @@ -97,7 +99,7 @@ Create a cron entry like this (you might need to update the path in the cron ent Once you installed the script on your raspberry you need to create some sensors in home assistant. -If you are using ```discovery_messages```, then this step is not required as the sensors are auto discovered by Home Assistant and added. +If you are using ```discovery_messages```, then this step is not required as the sensors are auto discovered by Home Assistant and all you need to do is display them in the UI. This is the sensors configuration if ```group_messages = True``` assuming your sensors are separated in ```sensors.yaml``` file. ```yaml diff --git a/install.sh b/install.sh index c7d3b4a..cc668e9 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ welcome(){ } find_python(){ - if $(python --version); then + if [[ $(python --version) ]]; then python=$(which python) pip="python-pip" else