Browse Source

readme: document setup & usage

Fabian Peter Hammerle 3 years ago
parent
commit
560616091d
1 changed files with 25 additions and 0 deletions
  1. 25 0
      README.md

+ 25 - 0
README.md

@@ -14,3 +14,28 @@ Compatible with [Home Assistant](https://www.home-assistant.io/)'s
 * Linux machine with CC1101 connected to SPI port
   ([wiring instructions](https://github.com/fphammerle/python-cc1101#wiring-raspberry-pi)
   for raspberry pi)
+
+## Setup
+
+```sh
+$ pip3 install --user --upgrade git+https://git.hammerle.me/fphammerle/intertechno-cc1101-mqtt
+```
+
+On Raspbian / Raspberry Pi OS, dependencies can optionally be installed via:
+```sh
+$ sudo apt-get install --no-install-recommends python3-spidev python3-paho-mqtt
+```
+
+## Usage
+
+```sh
+$ intertechno-cc1101-mqtt --mqtt-host HOSTNAME_OR_IP_ADDRESS
+```
+
+Send `ON` or `OFF` to topic `intertechno-cc1101/[ADDRESS]/[BUTTON_INDEX]/set`.
+
+```sh
+$ mosquitto_pub -h MQTT_BROKER -t intertechno-cc1101/12345678/0/set -m ON
+```
+
+⚠️ Support for TLS is not implemented yet. Do not connect to brokers via unprotected networks (e.g., internet, wifi network).