Zwavejs wont finish booting with razberry2 hat on rpi4

It seems that BT could be blocking /dev/ttyAMA0 but I’ve given up trying to figure out how HAOS works.

How do I fix this? I have no access to any of the base OS stuff as the ha console is useless. There is no /mnt/boot/config.txt. How do I disable BT or otherwise troubleshoot this docker/stripped down OS mess?

[13:18:17] INFO: Successfully send discovery information to Home Assistant.
2022-10-12T19:18:21.039Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2022-10-12T19:18:21.047Z DRIVER   version 10.3.0
2022-10-12T19:18:21.048Z DRIVER   
2022-10-12T19:18:21.048Z DRIVER   starting driver...
2022-10-12T19:18:21.091Z DRIVER   opening serial port /dev/ttyAMA0
2022-10-12T19:18:21.158Z DRIVER   serial port opened
2022-10-12T19:18:21.160Z SERIAL » [NAK]                                                                   (0x15)
<--- Last few GCs --->
[183:0x7fb5b52390]  1012947 ms: Scavenge 1890.1 (1928.1) -> 1887.1 (1928.3) MB, 5.6 / 0.0 ms  (average mu = 0.214, current mu = 0.182) task 
[183:0x7fb5b52390]  1013026 ms: Scavenge 1890.3 (1928.3) -> 1887.3 (1928.3) MB, 6.2 / 0.0 ms  (average mu = 0.214, current mu = 0.182) task 
[183:0x7fb5b52390]  1013102 ms: Scavenge 1890.4 (1928.3) -> 1887.5 (1928.6) MB, 6.1 / 0.0 ms  (average mu = 0.214, current mu = 0.182) task 
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[19:35:20] INFO: Service restart after closing
[13:35:22] INFO: Successfully send discovery information to Home Assistant.
2022-10-12T19:35:25.272Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2022-10-12T19:35:25.280Z DRIVER   version 10.3.0
2022-10-12T19:35:25.281Z DRIVER   
2022-10-12T19:35:25.282Z DRIVER   starting driver...
2022-10-12T19:35:25.325Z DRIVER   opening serial port /dev/ttyAMA0
2022-10-12T19:35:25.371Z DRIVER   serial port opened
2022-10-12T19:35:25.374Z SERIAL » [NAK]                                                                   (0x15)

The controller setup instructions are in the Z-Wave docs: https://www.home-assistant.io/docs/z-wave/controllers/#razberry-board

For editing the config.txt file a search shows a few possible ways:

I am not sure what the best method is, maybe none are great, but it sounds possible.

You could always go the container route, then you can install the OS you want and have full access.

Yeah none of those actually work.

The only way to access /boot/config.txt is to take the microsd card out, put it in another machine and open there.

Beyond stupid.

I wiped it. Installed AlmaLinux 9 and compiled z-wavejs-ui there. Put Home Assistant in a VM on my main VM host and connected to z-wavejs over the network.

If anyone else stumbles across this and wants to go my route:

Works out of the box mostly, but do still need to change a couple things for the z-wave hat to work

Add to /boot/config.txt

dtoverlay=disable-bt
enable_uart=1

I also like to disable Wi-Fi since I don’t use it

dtoverlay=pi3-disable-wifi

And finally remove the following from /boot/cmdline.txt, by default Alma puts a serial tty console on ttyAMA0 which prevents the hat from working.

console=ttyAMA0, 115200

Then install z-wavejs-ui using a container or compile it and works great. z-wavejs has an option to enable the web socket for home assistant just like if they were both done in haos.