From c13673dc8bc59e544a93a08531b685768e2ab7a2 Mon Sep 17 00:00:00 2001 From: Ryan Sandridge Date: Thu, 2 Nov 2017 03:32:25 -0400 Subject: [PATCH] Provide a script for macOS to generate the secure key (#3867) Without including the LC_CTYPE=C environment variable on macOS, tr returns a "Illegal byte sequence" error. --- source/_docs/z-wave/adding.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_docs/z-wave/adding.markdown b/source/_docs/z-wave/adding.markdown index d9e8d5be1a8..8c2e52017be 100644 --- a/source/_docs/z-wave/adding.markdown +++ b/source/_docs/z-wave/adding.markdown @@ -28,6 +28,11 @@ An easy script to generate a random key: cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//' ``` +On macOS, this script will generate a random key: +```bash +cat /dev/urandom | LC_CTYPE=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//' +``` +

Ensure you keep a backup of this key. If you have to rebuild your system and don't have a backup of this key, you won't be able to reconnect to any security devices. This may mean you have to do a factory reset on those devices, and your controller, before rebuilding your Z-Wave network.