Different name?But that is your domoticz container, that is under a different name (I hope).
I have another thread:
viewtopic.php?t=40022
Can you help me please. I'm struggeling with this.
Moderator: leecollings
Different name?But that is your domoticz container, that is under a different name (I hope).
Yup it's set to True.thomasbaetge wrote: ↑Thursday 13 April 2023 14:19 Did you set the 'prevent loop' setting in the MQTT Gateway settings in Domoticz to 'true'?
If it is on 'false' that may cause the issue.
Yes, i have multiple, for multiple devices. But that doesn't seem to be the issue. When i turn off the default it's 0 messages.thomasbaetge wrote: ↑Thursday 13 April 2023 14:42 That is strange.
I am using a lot of MQTT and I never had domoticz sending duplicate messages.
Do you have 2 Gateway configured in Domoticz?
(really just guessing here)
Yes, i have multiple, for multiple devices. But that doesn't seem to be the issue. When i turn off the default it's 0 messages.thomasbaetge wrote: ↑Thursday 13 April 2023 14:42 That is strange.
I am using a lot of MQTT and I never had domoticz sending duplicate messages.
Do you have 2 Gateway configured in Domoticz?
(really just guessing here)
With openZwave more often than not i didnt have any MQTT out messagesthomasbaetge wrote: ↑Thursday 13 April 2023 15:03 Not yet.
I have everything prepared and installed for it, but I will need some time for migration and replacing old devices with new.
I have no room for errors, because I have crucial infrastructure like heating control and doorlock running on z-wave.
Code: Select all
Error: WebServer:8080 thread seems to have ended unexpectedly (last update 62.000000 seconds ago)
Code: Select all
This device is buggy and sends large negative Meter Reports from time to time.
I follow your step by step tutorial to migrate from OZW to ZWave-JS-UI, everything goes well until the configuration of serial port. When i launch the commandandrehj wrote: ↑Sunday 15 January 2023 12:30Today I successfully finished my upgrade. Pi is now running Domoticz 2022.2 with ZWave-JS-UI (via SNAP) and Bullseye OS.
Since there is no complete guide for this upgrade process, I decided to make my own.
The basics steps I made were:
1. Backup Z-Wave data
2. Install Mosquitto
3. Install Snap
4. Install Z-Wave JS UI
5. Disable OpenZwave gateway
6. Configure Z-Wave JS UI
7. Install MQTT Auto Discover Client gateway in Domoticz
8. Replace old Z-Wave devices
9. Delete old Z-wave controller
10. Upgrade Domoticz to 2022.2
11. Upgrade Pi from Buster to Bullseye
According viewtopic.php?p=296307#p296307 the upgrade to bullseye should be done after the Domoticz upgrade to 2022.2, but in step 11 I ran into some minor conflicts which made me have to redo two of the installation steps of Mosquitto (2.5) and Snap (3.3b). Maybe it is better to upgrade your Pi to Bullseye as step 1 instead of 11.
In detail, there were many, many more steps:I hope this guide is useful for anyone who still has to do the same upgrade. If you like it, please let me know.Code: Select all
1. Backup Z-Wave data from Domoticz Most imporant data is: 1. Security Network Key 2. List of NodeID's and node names 3. The USB address of your Z-Wave usb stick. 2. Install Mosquitto according https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/ (en https://www.domoticz.com/wiki/MQTT) 1. Update and upgrade system of Pi: sudo apt update && sudo apt upgrade 2. Install Mosquitto: sudo apt install -y mosquitto mosquitto-clients 3. Make Mosquitto auto start when the Raspberry Pi boots sudo systemctl enable mosquitto.service 4. Start-up and version check: mosquitto -v (Gives version 1.5.7, version 2.xx will be installed with Bullseye) 5. Enable remote access without authentication: sudo nano /etc/mosquitto/mosquitto.conf Add these lines at the end: listener 1883 allow_anonymous true Use CTRL-X to exit and save. 6. Restart Mosquitto: sudo systemctl restart mosquitto 7. Test status of Mosquitto: sudo systemctl status mosquitto 8. Check version: mosquitto -h | grep version (again version 1.5.7) 3. Install Snap according https://snapcraft.io/docs/installing-snap-on-raspbian en https://community.home-assistant.io/t/install-and-setup-zwave-js-ui-with-snap-on-a-raspberry-pi/486484 1. Update system: sudo apt update 2. Install snap sudo apt install snapd 3. Work around a bug which seems to exist only on Raspberry Pi OS 32-bit system: https://stackoverflow.com/questions/42443273/raspberry-pi-libarmmem-so-cannot-open-shared-object-file-error/50958615#50958615 en https://github.com/zwave-js/zwave-js-ui/discussions/1216 3a sudo nano /etc/ld.so.preload Comment out this line: (Change /usr/lib/arm-linux-gnueabihf/libarmmem.so to #/usr/lib/arm-linux-gnueabihf/libarmmem.so) 3b sudo visudo add :/snap/bin to the end of the secure_path, BUT before the closing quote ". Note the :-separator! 4. Reboot Pi sudo reboot 5. After this, install the core snap in order to get the latest snapd. sudo snap install --channel=stable core 6. Enable hotplug support and restart: sudo snap set system experimental.hotplug=true sudo systemctl restart snapd 7. To test your system, install the hello-world snap and make sure it runs correctly: sudo snap install hello-world hello-world 4. Install Z-Wave JS UI according https://www.domoticz.com/wiki/Zwave-JS-UI en https://zwave-js.github.io/zwave-js-ui/#/getting-started/other-methods and https://community.home-assistant.io/t/install-and-setup-zwave-js-ui-with-snap-on-a-raspberry-pi/486484 1. Install zwave-js-ui sudo snap install --channel=stable zwave-js-ui 2. Give the package access to use USB devices and observe hardware: sudo snap connect zwave-js-ui:raw-usb 3. Needed for the program to list available devices in the UI: sudo snap connect zwave-js-ui:hardware-observe 4. Open help to see some info about commands: zwave-js-ui.help 5. To access the UI from outside your Pi: sudo snap set zwave-js-ui server.host=0.0.0.0 6. Then we need to connect the serial-port to the plug zwave-js-ui. First list available serial slots: sudo snap interface serial-port 7. Then use this command to connect the correct serial slot to zwave-js-ui (use correct core: from list you got in previous step): sudo snap connect zwave-js-ui:serial-port core:aeotecz-stickgen5zw0 8.Turn service on: sudo zwave-js-ui.enable 5. Disable (not delete!) OpenZwave gateway (USB stick) in Domoticz (menu Setup - hardware) Idea is that the old devices are not deleted. Sadly this did not work. All my old devices disappeared. Maybe I should have upgraded Domoticz from 2022.1 to 2022.2 first. See also https://www.domoticz.com/forum/viewtopic.php?p=297183&sid=8601aab4dc1990f1d0199e8caced281b#p297183 6. Configure Z-Wave JS UI (from https://www.domoticz.com/wiki/Zwave-JS-UI) 1. Browse to http://192.168.178.41:8091 2. Menu settings → MQTT: Retain on 3. Menu settings → Gateway: Use nodes names on Ignore location on Include Node info on 4. Menu settings → Home Assistant: MQTT Discovery on Retained discovery on (not mentioned in text, but that's according picture) 5. Menu settings → Z-Wave Get the key from Domoticz (mine was just "0102030405060708090A0B0C0D0E0F10") and enter as S2 Unauthenticated. Enter the right Serial Port address. In my case: /dev/ttyUSB-ZwaveStick I also had to enter something at S0 legacy to get rid of an error message regarding the security status of a Qubino ZMNHDD. I just pressed the button to generate a random key. Result was 643294277C1E50FAEA0C497F116F9897. 6. Menu settings Save settings (Press "save" at the bottom) 7. Menu Control Panel: Give all nodes a useful name based on their Node ID and the info you saved in step 1 7. Install MQTT Auto Discover Client gateway in Domoticz (see https://www.domoticz.com/wiki/MQTT#Add_hardware_.22MQTT_Auto_Discovery_Client_Gateway.22) 1. Domoticz → Menu Setup → Hardware Name = MQTT Auto Discovery Type = MQTT Auto Discover Client Gateway with LAN interface Data Timeout: Disabled Remote Address: localhost Username: Leave empty when mqtt broker has no user accounts setup else give mqtt broker account name Password: Leave empty when mqtt broker has no user accounts setup else give mqtt broker account password Auto Discovery Prefix: homeassistant 2. Make sure it is enabled and press "add". 3. New devices are created in Domoticz by MQTT AutoDiscover (After renaming the devices in Z-Wave JS UI I should have gotten nice names, but sadly that didn't work...) 4. Domoticz → Menu Setup → Devices Manually rename all new devices to something usefull 8. Replace old Z-Wave devices with new ones If you want to keep the history logging of the old devices then you need to replace the old device with the new one if identical devices are created. Use the replace function in Edit device, see wiki https://www.domoticz.com/wiki/Managing_Devices#Replace_device Devices that were replaced will get the old name and old IDX, no need to change scripts. 9. Delete old Z-wave controller in Domoticz. 1. Domoticz → Menu Setup → Hardware Select old Z-wave controller (Aeotec USB stick) and press Delete. 2. Reboot pi sudo reboot 10. Upgrade Domoticz to 2022.2 according https://www.domoticz.com/forum/viewtopic.php?t=39291 1. Backup version 2022.1 sudo service domoticz stop sudo cp -R /home/pi/domoticz /home/pi/domoticz_2022.1 (may take while...) sudo service domoticz start 2. Make sure you're on the Stable Release Channel Menu Setup → Settings → Software Updates → Release Channel → Stable 3. Update to 2022.2 (called #14606 in dialogue box...) Menu Setup → Check for updates → OK 11. Upgrade Pi to Bullseye according https://pimylifeup.com/upgrade-raspberry-pi-os-bullseye/ and https://linuxhint.com/upgrade-raspberry-pi-os-buster-to-bullseye/ 1. Backup your Pi. 1. Check your current version: lsb_release -a 2. Update Raspberry Pi Repositories List sudo apt update 3. Upgrade Packages on Raspberry Pi sudo apt dist-upgrade -y 4. Upgrade Firmware sudo rpi-update sudo reboot 5. Edit Raspberry Pi Source Lists In /etc/apt/sources.list replace all instances of "buster" by "bullseye". sudo nano /etc/apt/sources.list or use WinSCP Do the same for any other sources lists in the /etc/apt/sources.list.d directory: sudo nano /etc/apt/sources.list.d/raspi.list sudo nano /etc/apt/sources.list.d/vscode.list 6. Update package lists sudo apt update 7. Install missing packages: sudo apt install -y libgcc-8-dev gcc-8-base (enter yes if asked if services have to be automatically restarted) 8. Upgrade to Bullseye sudo apt full-upgrade Ran into Error: E: Failed to fetch http://mirror.serverius.net/raspbian/raspbian/pool/main/p/protobuf-c/libprotobuf-c1_1.3.3-1+b2_armh f.deb Undetermined Error [IP: 5.255.95.70 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Decided to rerun command, second time it worked OK. Installer reported change conflict in 3 files. Backed up all three and let installler use new versions. /etc/default/useradd /etc/sudoers /etc/mosquitto/mosquitto.conf Decided not to do anything about useradd Fixed /etc/sudoers with command sudo visudo (see snap configuration above) Fixed conflict in /etc/mosquitto/mosquitto.conf by adding the two missing lines (see mosquitto configuration above) 9. Fix error in /etc/systemd/system/dhcpcd.service.d/wait.conf Check if file exists: sudo stat /etc/systemd/system/dhcpcd.service.d/wait.conf Edit the file sudo nano /etc/systemd/system/dhcpcd.service.d/wait.conf Replace ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w by ExecStart=/usr/sbin/dhcpcd -q -w Exit and save. 10. Modify Boot config sudo nano /boot/config.txt In section [pi4] comment out dtoverlay=vc4-fkms-v3d (put a # in front of the line) In section [all] add the line dtoverlay=vc4-kms-v3d Exit and save. 11. Reboot Pi. sudo reboot 12. Check version to see if upgrade was successful: lsb_release -a 13. Cleanup (if everything works) sudo apt autoclean 14. Reinstall dev version of Python plugin to get plugins working sudo apt install python3-dev 15. Restart Domoticz sudo service domoticz restart
Code: Select all
sudo snap interface serial-port
Code: Select all
name: serial-port
summary: allows accessing a specific serial port
plugs:
- zwave-js-ui
slots:
- core:rfxtrx433
- core
I've try disable OZW in Domoticz devices and stop domoticz service from terminal, the result is the same stick is not visible from commandthomasbaetge wrote: ↑Thursday 01 June 2023 12:54 Your stick can connect to one instance at a time only.
So while OZW is running, zwJS can not access it (and vice versa)
Code: Select all
sudo snap interface serial-port
Users browsing this forum: No registered users and 1 guest