From 7507965814aa4c7ac79a1203acb7d3fed64b49fe Mon Sep 17 00:00:00 2001 From: Stanislav Demydiuk Date: Sun, 24 Dec 2023 19:24:53 +0200 Subject: [PATCH] v 1.0.6 --- README.md | 36 ++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e847a5..6be0c86 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,42 @@ docker run -it \ demydiuk/ewpe-smart-mqtt:latest ``` +## Installation (systemd service) + +1. Clone or download the repository +``` +cd /opt/ +git clone https://github.com/stas-demydiuk/ewpe-smart-mqtt +``` + +2. Create service file +`sudo nano /etc/systemd/system/ewpe-smart-mqtt.service` + +``` +[Unit] +Description=ewpe-smart-mqtt +After=mosquitto.target + +[Service] +ExecStart=/usr/bin/node /opt/ewpe-smart-mqtt/index.js --NETWORK="192.168.1.255" --MQTT_SERVER="mqtt://127.0.0.1" --MQTT_PORT="1883" --MQTT_USERNAME="" --MQTT_PASSWORD="" --MQTT_BASE_TOPIC="ewpe-smart" --DEVICE_POLL_INTERVAL="5000" +# Required on some systems +WorkingDirectory=/opt/ewpe-smart-mqtt +StandardOutput=inherit +StandardError=inherit +Restart=always +RestartSec=10 +User=pi +Group=pi + +[Install] +WantedBy=multi-user.target +``` + +3. Run the servive + +- Enable service with `sudo systemctl enable ewpe-smart-mqtt.service` +- Start/stop service with `sudo systemctl start|stop ewpe-smart-mqtt.service` + ## Communicating with the bridge - Publish to `ewpe-smart/devices/list` to receive list of registered devices diff --git a/package.json b/package.json index 294158f..a981621 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ewpe-smart-mqtt", - "version": "1.0.5", + "version": "1.0.6", "description": "MQTT Bridge for EWPE Smart powered air conditioners", "license": "MIT", "author": "Stanislav Demydiuk",