Page 5 of 24

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 9:28
by mgugu
Image

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 9:34
by Egregius
Thanks!

And also for MQTT and Gateway?

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 9:45
by waltervl
I have already updated the Wiki with help of your comments.
https://www.domoticz.com/wiki/Zwave-JS- ... n_Domoticz

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 9:48
by mgugu
2022-12-23 09_45_49-Z-Wave JS UI.png
2022-12-23 09_45_49-Z-Wave JS UI.png (37.82 KiB) Viewed 11261 times
2022-12-23 09_44_16-Z-Wave JS UI.png
2022-12-23 09_44_16-Z-Wave JS UI.png (28.8 KiB) Viewed 11261 times

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 9:54
by mgugu
waltervl wrote: Friday 23 December 2022 9:45 I have already updated the Wiki with help of your comments.
https://www.domoticz.com/wiki/Zwave-JS- ... n_Domoticz
Excellent. No more possible confusion now.
And this is valid also for zigbee2mqtt.

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 10:04
by Egregius
Thanks!
What's the reason to have a different prefix in MQTT and Homeassistant?

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 10:09
by mgugu
Prefix in HA is used for config messages and MQTT prefix used for update messages. This allows to have 2 different topics, improving readability in MQTT explorer and also to avoid possible MQTT loop.

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 10:12
by mgugu
And after a successfull integration, NEVER CHANGE the prefixes !

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 11:40
by Egregius
OK, and which one is set in domoticz then? The MQTT one or the HA one?

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Friday 23 December 2022 11:57
by mgugu
Egregius wrote: Friday 23 December 2022 11:40 OK, and which one is set in domoticz then? The MQTT one or the HA one?
Only HA prefix is set in domoticz UI. MQTT prefix, used for updates, is sent automatically to domoticz through config messages
2022-12-23 11_45_54-Domoticz.png
2022-12-23 11_45_54-Domoticz.png (250.14 KiB) Viewed 11228 times

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Saturday 24 December 2022 16:13
by JuanUil
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: Saturday 24 December 2022 16:24
by madpatrick
Good Job !!

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Saturday 24 December 2022 17:28
by HansF
Thanks Jan, for putting this together!

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Sunday 25 December 2022 13:05
by gizmocuz
Instead of directly installing these applications/servers on your machine, why not use docker-compose?
I recommend this much more above a direct install

You will have all configuration/data files in each docker-compose folder, and it is very easy to backup/migrate/test/update

Everything is also available in docker-compose

It also does not take any additional system resources

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Sunday 25 December 2022 15:32
by JuanUil
The englisch version of the manual can now be found on:
https://mega.nz/file/jQInXCJI#j-uMcnlrX ... YzUippScHs

Enjoy!
Jan

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Tuesday 27 December 2022 20:44
by madpatrick
@gizmocuz

Is it possible to have a notice up front when OZW will be disabled from Domoticz?
This gives me time to build a latest release from source and to switch to ZWave-JS-UI

Thanks !
Keep up the good work

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Monday 02 January 2023 10:57
by MikeyMan
mgugu wrote: Friday 23 December 2022 8:59 From my experience, contrary to what is suggested in wiki configuration screenshot, retain flag MUST be set to ON.
This allows the broker to keep in memory the config messages which are necessary each time domoticz is restarted.
If you need to remove definitely devices from domoticz (for example in case you remove a zwave node), you have to remove the corresponding config messages, simply by publishing "" at the config message topic (with MQTT explorer for example).
Hmm... I restarted domoticz several times, but that i didn't notice.
What behaviour did you see that makes you think this? Can check again.

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Monday 02 January 2023 13:10
by mgugu
MikeyMan wrote: Monday 02 January 2023 10:57 Hmm... I restarted domoticz several times, but that i didn't notice.
What behaviour did you see that makes you think this? Can check again.
Domoticz does not store mqtt config messages, so if these messages are not retained neither by the broker, after a restart yo will still see the devices in domoticz but they are not responding. You then need to make a manual refresh in the mqtt gateway to make them working again.

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Monday 02 January 2023 19:24
by elzorrovega
Hello All,

I take this opportunity to wish you All Happy New Year!

We hesitate to sail unto uncharted waters but then again sometimes we have no choice. After closely following your discussions, I understood that Open Z-Wave development is stopped and the only option is to use Zwave-JS-UI in the very near future.

To this effect Domoticz needs to use MQTT gateways, MQTT Broker like Mosquitto and an application such as Zwave-JS-UI to communicate to field devices. Web pages below have been very helpful - Thanks a lot JuanUil - to allow me to almost succeed this exercise but I still have some snags!

https://www.domoticz.com/wiki/MQTT - MQTT Broker Mosquitto

https://www.domoticz.com/wiki/Zwave-JS-UI

https://mega.nz/file/jQInXCJI#j-uMcnlrX ... YzUippScHs

DOMOTICZ CONFIGURATION

Code: Select all

Domoticz version 2022.1 release runs in the following environment
Update Raspberry Pi 3 Model B+
Hardware	: BCM2835
Revision	: a020d3
Serial		: 00000000cc7e2232
Model		: Raspberry Pi 3 Model B Plus Rev 1.3
Linux raspberrypi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux - Bullseye -64 bit OS

Z-Wave Node
idVendor           0x0658 Sigma Designs, Inc.
idProduct          0x0200 Aeotec Z-Stick Gen5 (ZW090) - UZB
MIGRATION STATUS

Mosquitto Broker is installed and configured as recommended for Raspbian environment

https://randomnerdtutorials.com/how-to- ... pberry-pi/

Docker is installed and running. Below is the ps ouput

Code: Select all

pi@raspberrypi:~ $ pstruc.sh | grep erd
root	668	0.1	5.5	1354332	50072	?	Ssl	17:19	0:04	/usr/bin/dockerd
root	521	0.0	3.4	1335144	31576	?	Ssl	17:19	0:02	/usr/bin/containerd
I am new to Docker but to my understanding, one runs an image of an application in localised environment (locally/cloud).

According to https://zwave-js.github.io/zwave-js-ui/ ... tallation
There are three way to install Zwave-JS-UI image
1- Run using volumes
2- Run using local folder
3- Run as a service

I understood, that in all cases we are to download an Zwave-JS-UI image. I chose the second option and data is placed in store directory. I was able to access the Zwave-JS-UI image after running the following in LCI

Code: Select all

sudo docker run --rm -it -p 8091:8091 -p 3000:3000 -e TZ=Europe/Paris --device=/dev/serial/by-id/usb-0658_0200-if00 \
-v $(pwd)/store:/usr/src/app/store zwavejs/zwave-js-ui:latest
Terminal shows activity and web interface allows configuration. However, after restarting the Raspberry Pi, the Zwave-JS-UI is not accessible.

Running docker command again brings back the web interface.

QUESTIONS

JuanUil in his walk-through points to dev/serial/by-id/usb-0658_0200-if00:/dev/zwave' .
I used /dev/serial/by-id/usb-0658_0200-if00.

Is :/dev/zwave a must to communication via Z-Wave node?

Docker documentation recommends to add parameter --restart unless-stopped to docker command line and prefers not to use process managers like upstart, systemd or supervisor.

What is the best way to Start Docker Containers Automatically After a Reboot?

Thanks in advance for your help.

El Zorro. :)

Re: Easiest way to migrate Openzwave to ZWave-JS-UI

Posted: Tuesday 03 January 2023 12:01
by sincze
Did a first trial run.

Before I started (on a Pi):
Spoiler: show

Code: Select all

	sudo nano /etc/udev/rules.d/99-usb-serial.rules [ or use the vi editor ]

	SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyUSB-ZStick-5G"
  • Created an overview of all my Domoticz ZWAVE nodeID's in excel so I would be able to identify them later.
  • Followed the wiki :D (thanks!)
  • Disabled the ZWAVE Stick in Domoticz (Production)
  • Started the Z-Wave JS UI Docker
  • Added Network Security Keys [Settings -> Z-Wave -> Security Keys (S0 Legacy, S2 Unauthenticated, S2 Authenticated, and S2 Access Control))
  • After that Control Panel started building up the Network Inventory.
  • Unfortunately the Device Names and Locations that I defined in OZW were not transferred into Z-Wave JS.
  • Manufacturer name of some Fibaro Power Switching Nodes were and others were not detected (Fibargroup vs Unknown manufacturer 0xXXXX).
Due to time shortage I was unable to test the Battery Powered Nodes. Probably need to open them and press a button or so to speed up detection.

Additionally
  • Installed a Domoticz (TEST) docker
  • Added the Autodiscovery Hardware
  • Enabled MQTT Dicovery in Z-Wave JS UI. + Retained Discovery
zwave2mqtt.JPG
zwave2mqtt.JPG (81.72 KiB) Viewed 10988 times
Result:
The nodes were created ;-) in Domoticz, still only based on their NodeID but that seems logical as the names did not come through from OZW.