S2 Timeout with RaZberry 7 Pro

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
MrRusch
Posts: 40
Joined: 23 Jul 2019 09:11

S2 Timeout with RaZberry 7 Pro

Post by MrRusch »

I am unable to include devices securely with my new RaZberry 7 Pro.
In this example I am trying to include an Aeotec Doorbell 6.

Controller info:
ControllerInfo.png
ControllerInfo.png (7.24 KiB) Viewed 24356 times
Full log:
z-way-server.rar
(290.07 KiB) Downloaded 821 times
Exclusion starts at:

Code: Select all

[2023-10-15 12:21:02.411] [I] [zway] Job 0x4b (Remove node from network): Ready to remove - push button on the device to be removed
Inclusion starts at:

Code: Select all

[2023-10-15 12:21:18.971] [I] [zway] Job 0x4a (Add/re-include node to network): Ready to add - push button on the device to be added
Expert UI shows device being added, popup saying to wait for S2 key, and then "S2 Timeout" is shown. Never prompted for any actual input.

S2 logging related to main device:

Code: Select all

[2023-10-15 12:21:42.615] [I] [zway] Node 121:0 supports CC SecurityS2
[2023-10-15 12:21:42.620] [D] [zway] S2 context allocated for device 121
[2023-10-15 12:21:42.621] [I] [zway] Controller was not granted S2 keys - skipping device interview
[2023-10-15 12:21:42.624] [I] [zway] Adding job: SecurityS2 Version Get to node 121
[2023-10-15 12:21:45.459] [I] [zway] Job 0x13 (SecurityS2 Version Get to node 121): Delivered
[2023-10-15 12:21:45.460] [D] [zway] Job 0x13 (SecurityS2 Version Get to node 121): success
[2023-10-15 12:21:45.460] [I] [zway] Waiting for job reply: SecurityS2 Version Get from node 121
[2023-10-15 12:21:45.469] [D] [zway] Received reply on job (SecurityS2 Version Get to node 121)
[2023-10-15 12:21:45.469] [I] [zway] Node 121:0 CC Version: SecurityS2 is v1
[2023-10-15 12:21:47.799] [W] [zway] Node 121:0 CC SecurityS2: secure channel not established by primary controller - skipping security
[2023-10-15 12:21:48.316] [I] [zway] Node 121:0 CC SecurityS2 Interview done
[2023-10-15 12:21:48.316] [I] [zway] Node 121:0 CC Security Interview done
Example of S2 logging related to sub-devices:

Code: Select all

[2023-10-15 12:21:47.133] [I] [zway] Node 121:1 supports CC SecurityS2
[2023-10-15 12:21:48.565] [I] [zway] Node 121:1 CC SecurityS2 Interview started
[2023-10-15 12:21:48.566] [E] [zway] Node 121:1 CC SecurityS2: secure channel not established on root device - can not interview inside channel
[2023-10-15 12:21:48.566] [E] [zway] Error returned from (command->cc->interview_handler)(zway, command): Function class not supported by the hardware (-4)
Device interview gets stuck as probably expected:
DeviceConfiguration.png
DeviceConfiguration.png (43.67 KiB) Viewed 24356 times
I have tried this exclude+include process many many times now. Power cycled, completely removed power for a while.. The end result is always the same. And it is not just this device. Same issue with ID Lock 150.

Any ideas on what might be going on here?
seattleneil
Posts: 202
Joined: 02 Mar 2020 22:41

Re: S2 Timeout with RaZberry 7 Pro

Post by seattleneil »

Based on your RaZberry 7 Pro having node ID=99 (and not node ID=1), I'm guessing you've added your RaZberry 7 Pro controller by doing a controller change. Based on the log file showing spurious messages from node ID=1, I'm guessing your "old" Z-Wave controller is still active, perhaps on a second Pi. If these guesses are correct, there's a good chance you've accidentally made a mess of your Z-Wave network. To add to the confusion, the screenshot for device 121 shows you've added a mains powered device (i.e., plugged into an AC outlet, not battery-operated) that's a satellite receiver, when you're adding a doorbell. When I've accidentally messed up my Z-Wave network, I found the best solution was to revert to a clean installation and start over.

Although it's too late, the proper procedure for replacing an old RaZberry controller with a new RaZberry 7 controller is discussed in this forum post: https://forum.z-wave.me/viewtopic.php?f=3422&t=35053. The procedure involves backing up your Z-Way configuration with the old RaZberry controller installed, powering down your Pi, replacing the the old RaZberry controller with the new RaZberry 7 Pro controller and restoring the configuration from the backup you created with the old RaZberry controller. Using this "backup/replace RaZberry/restore" procedure, the new RaZberry 7 controller should have node ID=1, and all of your Z-Wave devices would be unaware that there's a new controller. Unfortunately, what's done is done, so just know for the future that there's a relatively easy procedure for replacing a RaZberry controller.

I also see your RaZberry 7 Pro is running firmware 7.36 which should be upgraded to 7.38.

My advice for sorting out your Z-Wave network is to first upgrade your RaZberry 7 firmware to 7.38, do a clean Z-Way installation and then start over.

Once you've upgraded the firmware, follow this procedure to re-build your Z-Way configuration from scratch:

1. Do a full backup of your Z-Way configuration - both an expert UI backup and a smarthome UI backup [this allows you to revert back to your old broken configuration]
2. Use the expert UI and do a "Controller Factory Default" to reset the Home ID of your RaZberry 7 Pro controller
3. Stop the z-way-server process
4. Move /opt/z-way-server to /opt/z-way-server-OLD [this preserves the files from your old broken configuration]
5. Re-install a clean version of Z-Way: wget -qO - https://storage.z-wave.me/RaspbianInstall | sudo bash
6. Exclude and re-include your Aeotec Doorbell 6
7. Exclude and re-include all of your other devices
8. Use the expert UI to do a network reorganization

Perhaps someone else on this forum can give you advice that's less draconian.

Good luck.
User avatar
PoltoS
Posts: 7624
Joined: 26 Jan 2011 19:36

Re: S2 Timeout with RaZberry 7 Pro

Post by PoltoS »

Your issue is hidden here:

Code: Select all

[2023-10-15 12:21:42.621] [I] [zway] Controller was not granted S2 keys - skipping device interview
Looks (and supported by the fact that your controller has node Id = 99) that you included Z-Way in another network and then made it SIS. So Z-Way has not got keys from the old Primary.

You need to do:

Code: Select all

zway.devices[99].data.secureControllerId=99
This should solve the problem
MrRusch
Posts: 40
Joined: 23 Jul 2019 09:11

Re: S2 Timeout with RaZberry 7 Pro

Post by MrRusch »

It seems that, too often, the answer to my z-wave problems have been to start over. This is very time-consuming for me as I have many devices inside walls etc. So oh boy am I glad I waited to see if any other answers would come in before starting rebuild my network.

I am very happy to report that PoltoS proposed solution did in fact resolve my problems. I ran the command throught the ZWave API -
http://IP:8083/ZWaveAPI/Run/zway.device ... ollerId=99
..and can now include devices securely again without problem. Thank you!

And yes, I did use the "Start Controller Change" button in Expert UI. Based on what I read in the docs, I gathered this was the way to do it.. I swapped both RaZberry and Raspberry in the process.
Post Reply