Page 1 of 2

Zwave JS- UI install how. Help please!

Posted: Wednesday 01 March 2023 12:18
by Dave47
Hi.

Do i need all these commands to install docker on raspberry pi

Code: Select all

# Using volumes as persistence
docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/serial/by-id/insert_stick_reference_here:/dev/zwave \
--mount source=zwave-js-ui,target=/usr/src/app/store zwavejs/zwave-js-ui:latest

# Using a local folder as persistence
mkdir store
docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/serial/by-id/insert_stick_reference_here:/dev/zwave \
-v $(pwd)/store:/usr/src/app/store zwavejs/zwave-js-ui:latest

# As a service
wget https://raw.githubusercontent.com/zwave-js/zwave-js-ui/master/docker/docker-compose.yml
docker-compose up

Also this:

Code: Select all

    dev/serial/by-id/insert_stick_reference_here   
I have open zwave at the moment. In open zwave it works fine accept one Qubino module.
i'm a little nervous about installing this.
Can i go back if its going wrong.

What is the first step. We have MQTT. Which install code.
Do i need all i write in the beginning?

Re: Zwave JS- UI install how. Help please!

Posted: Friday 03 March 2023 14:11
by gizmocuz
No and please use docker-compose

Re: Zwave JS- UI install how. Help please!

Posted: Friday 03 March 2023 14:11
by gizmocuz
sudo apt-get update && sudo apt-get upgrade

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo systemctl enable docker
sudo reboot

Re: Zwave JS- UI install how. Help please!

Posted: Wednesday 15 March 2023 10:38
by Dave47
I dont understand.

Can i use this: wget https://raw.githubusercontent.com/zwave ... ompose.yml
docker-compose up

Or how can i do/typ?

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo systemctl enable docker
sudo reboot

Can i use it how you write it here?

Re: Zwave JS- UI install how. Help please!

Posted: Wednesday 15 March 2023 10:51
by Dave47
I read domoticz wiki how yo install docker. Which command is the best to use and run docker.
I typ in ssh only
curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo systemctl enable docker
sudo reboot

In wiki is different explenation.

Re: Zwave JS- UI install how. Help please!

Posted: Wednesday 15 March 2023 14:16
by waltervl
Dave47 wrote: Wednesday 15 March 2023 10:51 I read domoticz wiki how yo install docker. Which command is the best to use and run docker.
I typ in ssh only
curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo systemctl enable docker
sudo reboot

In wiki is different explenation.
This is an instruction to install docker. After that you have to configure the [edit] zwavejsui docker with docker compose.

Re: Zwave JS- UI install how. Help please!

Posted: Wednesday 15 March 2023 15:55
by Dave47
with http://localip:8091/control-panel can we see the interface but no devices from zwave?
We did the setup as

Code: Select all

version: "3.7"
services:
  zwave-js-ui:
    container_name: zwave-js-ui
    image: zwavejs/zwave-js-ui:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=mysupersecretkey
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
      # Uncomment if you want log times and dates to match your timezone instead of UTC
      # Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      #- TZ=America/New_York
    networks:
      - zwave
    devices:
      # Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
      # Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
  - "/dev/serial/by-id/usb-0658_0200-if00
    volumes:
      - zwave-config:/usr/src/app/store
   # Or by using local folder
   # - ./store:/usr/src/app/store
    ports:
      - "8091:8091" # port for web interface
      - "3000:3000" # port for Z-Wave JS websocket server
networks:
  zwave:
volumes:
  zwave-config:
    name: zwave-config

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 11:41
by thomasbaetge
so...please go to the directory, where you have the docker-compose.yaml for Z-vase JS Ui and run
docker compose down there

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 12:37
by Dave47
Ok. I did this in docker/zwjs

pi@raspberrypi:~/docker/zwjs $ docker
compose down
[+] Running 1/1
⠿ Network zwjs_zwave Removed 0.8s

docker compose ls
Gives

pi@raspberrypi:~/docker/zwjs $ docker
compose ls
NAME STATUS
CONFIG FILES
domoticz running(1)
/opt/domoticz/docker-compose.yml

But there is no file anymore

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 12:52
by thomasbaetge
domoticz is a different container.
What do you mean by 'no file anymore'?

anyway, you should now be able to start your new ZWJS container

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:00
by Dave47
In the beginning i install docker like this:
sudo apt-get update && sudo apt-get upgrade

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh

sudo usermod -aG docker ${USER}

sudo systemctl enable docker

sudo reboot

And then:mkdir /opt/domoticz
cd /opt/domoticz

In that folder i create docker-compose.yml with;
version: '3.3'

services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log


I removed this docker-compose.yml file out of domoticz folder.



anyway, you should now be able to start your new ZWJS container

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:01
by Dave47
In the beginning i install docker like this:
sudo apt-get update && sudo apt-get upgrade

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh

sudo usermod -aG docker ${USER}

sudo systemctl enable docker

sudo reboot

And then:mkdir /opt/domoticz
cd /opt/domoticz

In that folder i create docker-compose.yml with;
version: '3.3'

services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
I removed this docker-compose.yml file out of domoticz folder.


anyway, you should now be able to start your new ZWJS container
what is the best way to do that?
This is the same container as we did with docker compose down

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:26
by Dave47
The problem is comming from opt/domoticz/docker-compose.yml

But i cant remove zwavejs there?

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:32
by thomasbaetge
why did you remove your docker-compose.yaml for domoticz?

that was running already, so no need to touch it.
the docker-compose.yaml for ZWJS needs to go into a different folder and has to be started from there

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:36
by Dave47
Because the file did not work:
version: '3.3'

services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
devices:
- "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log

I have a problem i think. Can i remove docker and start from the beginning?
How can i do that?

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:41
by Dave47
I make a clean install from Rasberry first en then istall zwave-js-ui first?
Or install dockers with the file docker-compose.yml in
Opt/domoticz?
But /dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0
did not work.

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:44
by thomasbaetge
I don't think you need to remove docker.
there is an error in your file above:

Code: Select all

- "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
Should probably read:

Code: Select all

- "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
I think we had that before, Walter pointed this out in the other thread.

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 13:52
by thomasbaetge
there is no need for a fresh install and I assume, your docker installation is fine.

Please see my folder structure vor the various docker containers that I am running below. It's not a Raspberry, but a NUC, but the process is the same.

there is always one folder for each image, inside is the respective docker-compose.yaml and required subfolders for persistant data storage.
This is REALLY simple.
Bildschirmfoto vom 2023-03-21 13-47-14.png
Bildschirmfoto vom 2023-03-21 13-47-14.png (25.64 KiB) Viewed 3629 times

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 14:05
by Dave47
there is no need for a fresh install and I assume, your docker installation is fine.
ok but these docker-compose.yml file version 3.3 is not there.


Ok but /zwjs docker compose up Is not possible because its running another zwave with that name.
Its not possible for me i think so.

Re: Zwave JS- UI install how. Help please!

Posted: Tuesday 21 March 2023 14:09
by thomasbaetge
I don't understand.
if you have a zwjs container up and running, what is the problem then?