Page 10 of 25
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 14:46
by waltervl
Code: Select all
- "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 14:58
by Dave47
Did not work. The same problem.
Must i install zwave-js-ui first?
Where can i place the file:
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 logs time 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/insert_stick_reference_here:/dev/zwave'
volumes:
- zwave-config:/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
And which directory i have to make?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 15:33
by thomasbaetge
First, from what I found so far, you can connect the USB device only to either domoticz OZW or ZWJS at a time.
For installation of zwave-js-ui with docker do as follows (other options may work too, but this is how I did it and it works)
Assuming you're on a Raspberry or other Linux device
Create a directory for Docker (in your users home dir, no need for root)
Within that, create a subdir for zwave-js-ui
within that folder, place your docker-compose.yaml
Within that directory, create another one for data storage
in the YAML under volumes, enter your created store path:
like I did, please adjust your path, unless your name is thomas
Code: Select all
volumes:
- /home/thomas/docker/zwjs/store:/usr/src/app/store
You also should adjust the TZ settings (unless you are in the US)
save it and fire it up with:
wait for it to finish (pull and build container), go to your browser and enter <IP of machine>:8091 and you should be presented with the UI.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 15:38
by thomasbaetge
waltervl wrote: Friday 17 March 2023 14:46
Code: Select all
- "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
or maybe
Code: Select all
'/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0'
Assuming that is the correct path for your device.
I am not sure, if " instead of ' will work propperly in a YAML file (but I may be wrong)
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 15:42
by MikeyMan
thomasbaetge wrote: Friday 17 March 2023 15:33
First, from what I found so far, you can connect the USB device only to either domoticz OZW or ZWJS at a time.
Correct. So disable plugin first.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:02
by Dave47
When i try in opt/domoticz
docker compuse up -d
The same output
I disabled ozw.
Is it maybe from paring devices secure on that stick?
Must i install zwave-js-ui first to try 3.3 dockers?
In dockers ik have to set the serial device byid and in zwave-js-ui the same?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:12
by waltervl
@Dave47, see the wiki (after you have installed Domoticz):
Follow the wiki:
https://www.domoticz.com/wiki/Zwave-JS-UI
Basic steps:
- Install a MQTT Broker eg Mosquitto (if not already present in your network or on Domoticz server), see wiki page MQTT for installation instructions.
- Install Zwave JS UI on your Domoticz server and plug in your Zwave stick. See instructions
https://zwave-js.github.io/zwave-js-ui/ ... uick-start
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:21
by Dave47
Ok i read that but docker gives every time the same problem
Dockers is the first step?
Or must i also install zwave-js-ui next to it?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:41
by thomasbaetge
Dave,
I am not sure how to actually help you. It seems to me, that it is all a little bit blurry to you.
So let's take one step back:
What system are you running? I assume Linux, are you using a Raspberry?
Second: do you have a working domoticz installation on that (including working OZW)?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:46
by Dave47
Yes. Raspberry pi 3b
Domoticz 2023.1
And ozw working.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:54
by thomasbaetge
Great, it's not all too bad then
So let's forget domoticz and OZW for now (no need to touch any of them for now).
let's check your docker installation:
ssh into your Raspberry and issue
result should be smth like:
/usr/bin/docker
/usr/bin/compose
if it is, that is out of the way too.
next step is to 'install' zwjs. it is not really an installation, all you require for that is a folder structure and a YAML file, as I described earlier.
or you follow the link that walter gave.
if you got that, please confirm, as I asked before, that your USB device ID actually exists in your system. Instructions how to do so, please see before.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:56
by JuanUil
JuanUil wrote: Saturday 24 December 2022 16:13
HI all,
I also have struggeld a lot with switching to ZWave-JS-UI.
But now all is working verry well and better then in OZW.
I have made a tutorial to complete install.
For the moment it is only in Dutch and maybe not complete.
Coming time I will translate and update.
you can download it from :
https://mega.nz/file/3JxQ3Y7R#LIFf5wcVo ... KTAX1e5dFA
good luck!
Jan
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 16:57
by thomasbaetge
Dave47 wrote: Friday 17 March 2023 14:38
Did not work. "dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
Is that with " or only ' and /dev or dev?
oops, just saw that.
Correctly it has to be:
Code: Select all
- '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
with the / in front of dev and in ' instead of ".
did you try that?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 17:09
by Dave47
Ok i have which docker compose
/usr/bin/docker
/usr/bin/compose
So i can forget that error from yaml file in opt/domoticz?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 17:13
by thomasbaetge
nope. that is still not good.
I give you my docker-compose.yaml with commented filepath for testing.
Place that somewhere in a subfolder under your user (not in /opt or elsewhere) and try to fire it up with
don't use the -d option, so you see what is going on there.
the file:
Code: Select all
version: '3.7'
services:
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: unless-stopped
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=mysupersecretkey
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want logs time and dates to match your timezone instead of UTC
# Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=Europe/Berlin
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:/dev/zwave'
volumes:
#- /home/thomas/docker/zwjs/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: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Friday 17 March 2023 20:17
by Dave47
- '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
Did not work in docker version 3.3
Tommorow i try your docker-compose.ym 3.7l in user
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Tuesday 21 March 2023 9:14
by Dave47
@ Thomasbeatge
I have put docker-compose.yml file in zwjs or schould i put it in dockers folder?
This is goin on
Code: Select all
pi@raspberrypi:~/docker/zwjs $ docker compose up
[+] Running 1/2
⠿ Network zwjs_zwave Created 0.2s
⠋ Container zwave-js-ui Creating 0.0s
Error response from daemon: Conflict. The container name "/zwave-js-ui" is already in use by container "2ff5a4ecc2339b259469fef1e9d8d3b8d04dbabcfd55ca553a8dc57b81a08b6b". You have to remove (or rename) that container to be able to reuse that name.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Tuesday 21 March 2023 10:22
by thomasbaetge
I would put it into zwjs but it doesn't really matter.
Just keep it a bit separated, especially the folder where you store your data.
I found it a good practice to create a 'docker' folder in my user and then a subfolder for every image I am running.
As for your error message, you are already running a container with the same name
try docker compose ls to check for running instances and terminate with docker compose down.
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Tuesday 21 March 2023 10:38
by Dave47
Ok. I See
pi@raspberrypi:~ $ docker compose ls
NAME STATUS CONFIG FILESdomoticz running(1) /opt/domoticz/docker-compose.yml
I dont understand. I have removed this morning docker-compose.yml from /opt/domoticz
I did sudo rm docker-compose.yml
But how can i stop this: docker compose down ? And container name?
It is running after i removed this morning. Wrong way to remove the file?
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
Posted: Tuesday 21 March 2023 11:02
by thomasbaetge
But that is your domoticz container, that is under a different name (I hope).
maybe you do some digging into the docker compose documentation:
https://docs.docker.com/compose/
If that doesn't help, it may be worth opening a separate thread for your issue because we're kinda 'hijacking' this thread already for your problem
