This guy has some very good info on why it is so difficult to get the razberry to work on a Pi3 and Pi4: https://www.circuits.dk/setup-raspberry-pi-3-gpio-uart/
It is important to note that according to the author, everything below here is only needed if you both have a razberry
z-wave board installed in a raspberry pi 3
. Have a Pi2 or Pi1? Stop reading. Have a different z-wave usb stick or other z-wave adapter? Stop reading, this is not for you. Even though I haven't been able to verify this myself, I think the Pi4 also has bluetooth by default enabled, just like the Pi3, so I think it also does
need below steps if you have a razberry z-wave adapter installed. Anyway, here are the instructions to get razberry working in a Pi3 and most likely also a Pi4.
I had to do a fresh reinstall to get Buster and latest Domoticz 2020.1. After installing Buster I installed Domoticz, all according instructions. And no problems occurred until I restored my backed up domoticz.db. That very same pi3 with the same razberry that worked well for over 2 years, didn't work at all any more: Domoticz became unstable, my z-wave devices list remained empty, and worst of all I couldn't edit my hardware settings, not even to disable the z-wave hardware. After a long search the above page helped me regain control over Domoticz and my razberry. I went for the "Swapping the Serial Ports on Raspberry Pi 3" option in the bottom leaving bt enabled but on the miniuart, whereas the UART is now once again assigned to the GPIO pins and thus available to razberry.
In short, not only do you need to disable or move(re-wire?) bt to free the UART, you also need to re-assign the UART to the GPIO pins and
you need to disable the serial console. The details are in the page linked to above, here are the steps I have executed to get my razberry working in my Pi 3.
Log in via SSH.
and press <Enter>.
Check for a line saying
, if it doesn't exist, add it to the bottom of the file.
Also check for a line saying
. If neither exists, add one of the both to the end of the file. pi3-miniuart-bt leaves bluetooth enabled but connected to the less capable miniuart, pi3-disable-bt disables bluetooth altogether.
Now press <ctrl->-O (that an o, not a zero),
press <Enter> to accept the original name.
Press <ctrl>-X to exit nano.
Now we I disabled the Serial Console by executing the following commands:
Code: Select all
sudo systemctl stop serial-getty@ttyS0.service
sudo systemctl disable serial-getty@ttyS0.service
This file has 1 long line in it and it is important that this remains exactly 1 line. Don't change anything in it other than described below. Read this carefully: don't even add a space or a linefeed anywhere in this file. The line consists of multiple pieces formatted as <keyword>=<value(s)>, spearated by a single space. Look for any pieces that start with "console=". Only one such piece should remain: console=tty1, any other piece that starts with "console=" you delete from the line, including any value(s) behind it, up to the next space.
So if the file contains for example:
Code: Select all
console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
You remove the piece
, as that starts with "console=" and you need to remove everything up until the next space. So in this exampe the line would look now like this:
Code: Select all
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
Once this is done, press <ctrl-O>
And finally reboot by typing
Fpr me it was set to this port already, but in case you've just installed, the serial port to set on the OpenZWave USB hardware in Domoticz is "/dev/ttyAMA0".
And after this my z-wave list got filled automatically with all my devices. I still had to re-include almost all battery powered devices to get the Manufacturer, ID and Type to get read from the devices, but as long as you don't exclude the devices, if you include a device, it will be assigned the same Id it had before, So apart from that it takes a lot of time, this is not a problem.