From 6839161479caee9e261513e3ad6b8cc965dc7460 Mon Sep 17 00:00:00 2001 From: nakata5321 Date: Wed, 22 May 2024 12:17:01 +0300 Subject: [PATCH 1/3] fix mosquitto passwd bug --- README.md | 2 +- setup.sh | 41 +++++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 80cae18..13e32d1 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ After everything started, Home Assistant web interface will be on 8123 port and To stop everything use next command: ```commandline -docker compose down +docker compose --profile z2m down ``` After that you delete all config directories. **This will cause you to lose all settings. You will need root accesses** \ No newline at end of file diff --git a/setup.sh b/setup.sh index cbdf00e..6ab4e75 100644 --- a/setup.sh +++ b/setup.sh @@ -9,6 +9,22 @@ if [ -d /dev/serial/by-id/ ]; then # the directory exists if [ "$(ls -A /dev/serial/by-id/)" ]; then echo "the zigbee coordinator is installed" + # count how many devices connected + NUMB=$(ls -1q /dev/serial/by-id/ | wc -l) + + if (($NUMB > 1)); then + echo "You have more that 1 connected devices. Please choose one" + select f in /dev/serial/by-id/*; do + test -n "$f" && break + echo ">>> Invalid Selection" + done + echo "You select $f" + Z2MPATH=$f + else + Z2MPATH=$(ls /dev/serial/by-id/) + Z2MPATH="/dev/serial/by-id/"$Z2MPATH + fi + else echo "Cannot find zigbee coordinator location. Please insert it and run script again." echo "Do you want to continue without zigbee coordinator? It will not start Zigbee2MQTT container." @@ -23,6 +39,7 @@ if [ -d /dev/serial/by-id/ ]; then * ) echo invalid response;; esac done + Z2MPATH="." fi else echo "Cannot find zigbee coordinator location. Please insert it and run script again. The directory "/dev/serial/by-id/" does not exist" @@ -38,24 +55,8 @@ else * ) echo invalid response;; esac done + Z2MPATH="." fi - -# count how many devices connected -NUMB=$(ls -1q /dev/serial/by-id/ | wc -l) - -if (($NUMB > 1)); then - echo "You have more that 1 connected devices. Please choose one" - select f in /dev/serial/by-id/*; do - test -n "$f" && break - echo ">>> Invalid Selection" - done - echo "You select $f" - Z2MPATH=$f -else - Z2MPATH=$(ls /dev/serial/by-id/) - Z2MPATH="/dev/serial/by-id/"$Z2MPATH -fi - export Z2MPATH echo "Checking docker installation" @@ -119,12 +120,16 @@ fi if [[ -d ./mosquitto ]] then echo "mosquitto directory already exist" + MOSQUITTO_PASSWORD=`cat ./mosquitto/raw.txt` + export MOSQUITTO_PASSWORD else mkdir -p "mosquitto/config" mkdir -p "zigbee2mqtt/data" - # create password for mqtt. Then save it in home directory and provide this data to z2m configuration + # create password for mqtt. Then save it in mosquitto home directory and provide this data to z2m configuration MOSQUITTO_PASSWORD=$(openssl rand -hex 10) + echo "$MOSQUITTO_PASSWORD" > ./mosquitto/raw.txt + export MOSQUITTO_PASSWORD cp $CURRENT_PATH/scripts/mosquitto.conf ./mosquitto/config/mosquitto.conf From be00a00079b28873408a404de31fc3c22b8e1cfa Mon Sep 17 00:00:00 2001 From: nakata5321 Date: Wed, 22 May 2024 13:47:21 +0300 Subject: [PATCH 2/3] upadate url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13e32d1..3177452 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ sudo apt-get install wget unzip git First, download the repository and go to it: ```commandline -git clone https://github.com/nakata5321/home-assistant-web3-build.git +git clone https://github.com/PinoutLTD/home-assistant-web3-build.git cd home-assistant-web3-build/ ``` From fa9a1d9ce737bab723ee02a0bdad6526abde6cdd Mon Sep 17 00:00:00 2001 From: nakata5321 Date: Fri, 24 May 2024 14:02:58 +0300 Subject: [PATCH 3/3] add version for libp2p --- compose.yaml | 2 +- template.env | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compose.yaml b/compose.yaml index 7712790..e98ec6e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -51,7 +51,7 @@ services: libp2p: container_name: libp2p-proxy restart: unless-stopped - image: ghcr.io/pinoutltd/libp2p-ws-proxy:latest + image: ghcr.io/pinoutltd/libp2p-ws-proxy:v.${LIBP2P_VERSION} ports: - 127.0.0.1:8888:8888 - 127.0.0.1:9999:9999 diff --git a/template.env b/template.env index b09e837..76e1987 100644 --- a/template.env +++ b/template.env @@ -10,4 +10,5 @@ MOSQUITTO_VERSION=2.0.18 Z2M_VERSION=1.37.1 HA_VERSION=2024.5.4 ROBONOMICS_VERSION=1.8.3 -IPFS_VERSION=0.27.0 \ No newline at end of file +IPFS_VERSION=0.27.0 +LIBP2P_VERSION=1.0.1 \ No newline at end of file