Purpose of a secondary controller

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Purpose of a secondary controller

Post by cesarvog »

Hi everyone,

I've been playing with a variety of z-wave controllers in the last 10+ years. Over the years I've played with most available software home automation solutions (Vera, HomeSeer, Indigo, HA, OpenHab and Hubitat come to mind...).

My main system has been based on Indigo running on a Mac, which talks via ser2net to a Razberry 2 (500 series) GPIO card, sitting on a Raspberry Pi 3B+, running on Raspbian (buster). It's solid. All my 65 z-wave devices work as intended around 98% of the time. I don't know why, but the 2% of fails **always** seem to happen when I'm away on a Holiday, leaving some of my outside lights off in the worst possible time...

Recently I've got myself a new Razberry 7 Pro, thinking it would allow me to cover the remaining 2% with it's supposed better range (after all, it has an external antenna AND supports Long Range)...

I first tried backing up from the Expert interface and restoring the backup into the new Razberry 7 Pro. It seemed to work, as I was able to control the vast majority of z-wave devices, immediately after the restore, shutting down the previous Raspberry Pi 3B+ and rebooting the new Raspberry Pi 4 providing support for the new Razberry 7 Pro.

Unfortunately, when I returned to Indigo, after replacing the previous Raspberry 3B+ with the new Raspberry Pi4 IP address, I immediately noticed a message on the log mentioning an unknown z-wave node 1... Everything still worked, but I thought that was odd, because the node ID 1 is the controller, and since I had restored the backup from the previous system into the new system, my understanding was that the new Razberry 7 Pro SHOULD have been set as node ID 1. I thought I could live with that, as long as I would still be able to add and remove new z-wave devices, which I had not yet tried and was planing on doing over the next couple of days.

Well, even before I could try adding and/or removing z-wave devices to the z-wave network, some two or three days later, I started noticing that some of my z-wave devices had intermittent connectivity, meaning the supposed better range of the Razberry 7 Pro with it's external antenna was not as good as thought it would be...

So, I decided to give it another try and put back the old Raspberry Pi 3B+ with it's Razberry 2, went into the z-way expert interface of the new system in the Raspberry Pi 4 with the Razberry 7 Pro and commanded a razberry 7 Pro factory reset.

After the factory reset, I included it as secondary controller into the z-wave network managed by z-way in the original system, and it got the z-wave node iD 136. I can control devices from the z-way interface on both systems, but of course, when I do something in the Raspberry Pi 3B+ with the Razberry 2, it does not get relected in the z-way interface running on the Raspberry Pi 4 with the Razberry 7 Pro, and vice-versa.

Sorry for the long story above, but now I have a few questions:
1) what is the purpose of the secondary controller in the above scenario?
2) is it possible to somehow promote the secondary to primary controller? (as I could not find any indication of a button on z-way expert interface to do so)...
3) In the previous attempt (the one based on backup on old system, restore on new system), did anything get somehow **incomplete**, as Indigo was still able to "see" the original z-wave node ID 1?

Best regards and Thanks in advance.
Cesar
seattleneil
Posts: 172
Joined: 02 Mar 2020 22:41

Re: Purpose of a secondary controller

Post by seattleneil »

My experience with secondary controllers has not been good. Problem 1: lifeline associations by several of my devices use Z-Wave nodeID=1 which means the secondary controller does not know about local state changes. Problem 2: control of S2-included devices is problematic (the control messages are sent via the primary controller).

With regards to your questions...

1. A secondary controller is able to send Z-Wave commands to non-S2-included devices. It can also route Z-Wave messages and include/exclude other Z-Way devices (not S2-included devices, and only if the primary controller is active). As Z-Wave has evolved to support network-wide inclusion, the use of secondary controllers has become less useful (it's mostly an active/redundant controller with limited functionality). On a tangent - the approach I take for reliability/redundancy is to maintain a second Pi with a Razberry that's a clone of my primary Pi/Razberry. The only "gotcha" to this approach is that the z-way-server process must not be active on both Pi's (since both Razberry's have nodeID=1, messages will be misrouted and the Z-Wave network will quickly become unstable).

2. A secondary controller can become a primary controller, but that will not change the nodeID of the secondary controller. For the problem you're trying to solve - how to replace a 500-series Razberry with a 700-series Razberry, you don't want to add the 700-series as a secondary controller and then promote it to be a primary controller. You want the devices on your Z-Wave network to be unaware that there's a new controller (i.e., you want your 700-series Razberry to be assigned nodeID=1). To do this, create 2 backups of your old controller via the expert UI and the smarthome UI. Next, stop the z-way-server process on the 500-series Razberry (you don't want 2 Z-Wave nodes having nodeID=1). Then, restore the 2 backups to the 700-series Razberry (expert first, then full smarthome with restore Z-Wave option checked). At this point, your 700-series Razberry should be a clone of your 500-series Razberry and your Z-Wave network should be working again. I suggest do a network reorganization (via the expert UI) since the RF coverage of your 700-series Razberry is different (hopefully better) than your 500-series Razberry. Hang onto your 500-series Razberry setup as a cold-standby/backup controller).

3. Yes, you needed to do 2 backups (expert and smarthome, and then restore the 2 backups).
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Re: Purpose of a secondary controller

Post by cesarvog »

seattleneil wrote:
17 Aug 2022 02:32
For the problem you're trying to solve - how to replace a 500-series Razberry with a 700-series Razberry, you don't want to add the 700-series as a secondary controller and then promote it to be a primary controller. You want the devices on your Z-Wave network to be unaware that there's a new controller (i.e., you want your 700-series Razberry to be assigned nodeID=1). To do this, create 2 backups of your old controller via the expert UI and the smarthome UI. Next, stop the z-way-server process on the 500-series Razberry (you don't want 2 Z-Wave nodes having nodeID=1). Then, restore the 2 backups to the 700-series Razberry (expert first, then full smarthome with restore Z-Wave option checked). At this point, your 700-series Razberry should be a clone of your 500-series Razberry and your Z-Wave network should be working again. I suggest do a network reorganization (via the expert UI) since the RF coverage of your 700-series Razberry is different (hopefully better) than your 500-series Razberry. Hang onto your 500-series Razberry setup as a cold-standby/backup controller).

3. Yes, you needed to do 2 backups (expert and smarthome, and then restore the 2 backups).
Many thanks, @ seattleneil
I will try again as you suggest and come back with the results.
Cesar
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Re: Purpose of a secondary controller

Post by cesarvog »

Quick update:

I did a factory reset on my 700 series razberry on my Raspberry Pi 4 and restored both the advanced UI backup and the smartphone UI backup to it, all while the previous system from the original 500 series razberry on a Raspberry Pi 3B+ was off. I then rebooted the Raspberry Pi 4 and got back into the z-way expert UI and started a Reorganization. It took a while, but everything seems to be ok.

Indigo connected to the new system via rfc2217/ser2net still sees some remnant of the original node ID 1, but I was able to use it's GUI to include a new z-wave node with no problem. It's also possible to run device interviews from it and to request network optimization on a device-by-device basis, so I believe everything is seem to be good.

I intend to keep an eye on eventual z-wave devices disconnections. For now I will keep my fingers crossed, but it seems the replacement was successful.
Last edited by cesarvog on 20 Aug 2022 22:07, edited 1 time in total.
Cesar
seattleneil
Posts: 172
Joined: 02 Mar 2020 22:41

Re: Purpose of a secondary controller

Post by seattleneil »

Happy to hear your Z-Wave network is up and running with the 700-series controller.

A couple of things to keep in mind...

1. Although the 700-series chip supports long range, very few devices support long range. In other words, the primary benefit of the Razberry 7 Pro will be the improved RF performance using the external antenna.

2. The expert web UI for Z-Way has excellent diagnostic tools for troubleshooting why your system only works 98% of the time. If you have the time to learn how to use the tools, you'll be able to improve Z-Wave reliability (or at least, you won't have to guess why the network is unreliable). I suggest starting with Analytics->Background Noise. If you see high background noise, then Z-Wave message delivery will be problematic. Assuming you don't have significant RF interference, Analytics->Packets will show you the signal strength, delivery success route and routing issues. You can fix routing problems by creating manual routes (Analytics->Route map). Under Analytics->Zniffer History, you can see signal strength from a different perspective and if packets were routed directly (this is ideal) or via another Z-Wave node. You should try to configure your network to avoid routing via multiple hops. The next tool I suggest looking at is Network-Timing Info. This tool will show you if there's excessive latency (likely caused by interference or bad routing). Although it may seem like there's an overwhelming number of diagnostic tools, the tools tend to provide similar information, but in different ways. For example, if your Z-Wave network has good routing and the RF interference is low, then timing will be fast and delivery success will be 100%. If you see any explorer frames in Analytics->Packets, then you're going to see slow packet timings and packets taking lots of hops. This will happen if you have a bad Z-Wave device or you've accidentally powered off a Z-Wave device that was being used to route Z-Wave packets. Lastly, the z-way-log file is very helpful for understanding how Z-Wave packets are processed.

3. I've stopped using non-Z-Wave Plus devices. They are technically inferior to Z-Wave Plus (no network wide inclusion, slower speed, less range).

Good luck.
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Re: Purpose of a secondary controller

Post by cesarvog »

seattleneil wrote:
20 Aug 2022 00:55
The expert web UI for Z-Way has excellent diagnostic tools for troubleshooting why your system only works 98% of the time. If you have the time to learn how to use the tools, you'll be able to improve Z-Wave reliability (or at least, you won't have to guess why the network is unreliable).
I want to thank you very much for taking the time to steer me in the right direction on using z-way diagnostic tools. Your post is much appreciated.
Historically, I have mostly ignored those, as I lack the background to understand exactly what I'm looking at...
My poor understanding of RF basics is such that I struggle to understand the readings as they are presented. I mean, I don't quite know if -90 is better or worse than -80... I suppose having noise as much near as -100 is good and having signal as far from -100 is good, but I always get confused by those.
Also, I don't quite understand the two channels and their purpose. Even thought I've been playing with z-wave for quite a while, since I lack the engineering background needed, I'm afraid I'm still quite the newbie in using those tools for troubleshooting my network.
seattleneil wrote:
20 Aug 2022 00:55
3. I've stopped using non-Z-Wave Plus devices
Me too, over the years I was able to replace all of my initial non-Z-Wave Plus devices with newer versions that adhere to the newer spec.
Have a nice weekend.
Cesar
seattleneil
Posts: 172
Joined: 02 Mar 2020 22:41

Re: Purpose of a secondary controller

Post by seattleneil »

Good questions.

Z-Wave uses two channels (frequencies) in the US: 908.4MHz for 9.6 and 40kbps and 916MHz for 100kbps. Note that Z-Wave Long Range (ZWLR) also has two channels but uses spread-spectrum encoding which spreads the signal out across a band of frequencies centered at 912MHz and 920MHz. Unless you know you have LR-capable devices, you can ignore the LR channels (which is convenient since I don't know if the Z-Way UI will report LR channel noise).

In an ideal Z-Wave network, all communication would use channel 2 (i.e., the fast 100 kbps channel) and the noise level would be small (a bigger negative number) when compared to the RSSI (the received signal strength). The bigger the difference between the noise and signal strength values, the better. If you've heard the term "signal-to-noise ratio", now you have a general idea of what it means.

Enjoy the weekend.
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Re: Purpose of a secondary controller

Post by cesarvog »

Excellent explanation.

The information you've so kindly given definitively helped me to understand a little better the intricacies of my z-wave network.

I was able to reduce background noise from around -72 to -99 in both channels. All I had to do was relocate another Raspberry Pi 4 running from a USB3 to SATA converter, that was sitting right next to the new Raspberry Pi4 with the Razberry 7 Pro. I simply moved it to another shelf in the same cupboard.
Fun fact: I originally thought I would add the new Razberry 7 Pro to this very same RPi4 w/ USB3 to SATA converter... Then I noticed it would not be able to accommodate the new GPIO card + antenna connector. I'm so glad I ended up waiting for the second RPI4 to arrive! :D

On a side note, I may be mistaken, but the z-wave network seems to be a little faster... I mean, the interview process in Indigo (called "Define and Sync" there) appears to end sooner than when it was based on the original Raspberry Pi 3B+ and the Razberry 2 GPIO interface.... IDK, maybe it's just me being all too excited with the new toys...

So, once again, thank you!
Cesar
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Purpose of a secondary controller

Post by PoltoS »

Maye sure to upgrade your RaZberry 7 to 7.28 SDK.

I believe it works faster because RaZberry 7 Pro has an external antenna and uses less routing and you use RPi4, which is waaaay faster than 3B+.
cesarvog
Posts: 21
Joined: 26 Jan 2022 16:52

Re: Purpose of a secondary controller

Post by cesarvog »

PoltoS wrote:
21 Aug 2022 13:16
Maye sure to upgrade your RaZberry 7 to 7.28 SDK.

I believe it works faster because RaZberry 7 Pro has an external antenna and uses less routing and you use RPi4, which is waaaay faster than 3B+.
Thanks, PoltoS. Your help is much appreciated.
Cesar
Post Reply