formating
This commit is contained in:
12
README.md
12
README.md
@@ -11,9 +11,9 @@ Example message topic:
|
|||||||
```
|
```
|
||||||
masoko/rpi4/cpuload
|
masoko/rpi4/cpuload
|
||||||
```
|
```
|
||||||
- first part (masoko) is the main topic configurable via the congig.py file
|
- first part (masoko) is the main topic configurable via the ```config.py``` file.
|
||||||
- second part (pi4) is the host name of the raspberry which is automatically pulled by the script, so you don't have to configure it for each installation (in case you have many raspberries like me)
|
- second part (pi4) is the host name of the raspberry which is automatically pulled by the script, so you don't have to configure it for each installation (in case you have many raspberries like me).
|
||||||
- third part (cpuload) is the name of the value (these are all values published via MQTT - cpuload, cputemp, diskusage, voltage, sys_clock_speed)
|
- third part (cpuload) is the name of the value (these are all values published via MQTT - cpuload, cputemp, diskusage, voltage, sys_clock_speed).
|
||||||
|
|
||||||
# Installation:
|
# Installation:
|
||||||
|
|
||||||
@@ -26,14 +26,14 @@ Then install this module needed for the script:
|
|||||||
$ pip install paho-mqtt
|
$ pip install paho-mqtt
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy ```rpi-cpu2mqtt.py``` and ```config.py.example``` to a folder of your choise (I am using ```/home/pi/scripts/``` ).
|
Copy ```rpi-cpu2mqtt.py``` and ```config.py.example``` to a folder of your choise (I am using ```/home/pi/scripts/``` ) and rename ```config.py.example``` to ```config.py```
|
||||||
Rename ```config.py.example``` to ```config.py```
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
Populate the variables for MQTT host, user, password and main topic in config.py.
|
Populate the variables for MQTT host, user, password and main topic in ```config.py```.
|
||||||
|
|
||||||
You can also choose what messages are send and what is the delay between them.
|
You can also choose what messages are send and what is the delay between them.
|
||||||
|
|
||||||
This is the default configuration:
|
This is the default configuration:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user