Skip to content

Commit c13673d

Browse files
dissolvedfabaff
authored andcommitted
Provide a script for macOS to generate the secure key (home-assistant#3867)
Without including the LC_CTYPE=C environment variable on macOS, tr returns a "Illegal byte sequence" error.
1 parent 6881f35 commit c13673d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/_docs/z-wave/adding.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ An easy script to generate a random key:
2828
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
2929
```
3030

31+
On macOS, this script will generate a random key:
32+
```bash
33+
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/, $//'
34+
```
35+
3136
<p class='note warning'>
3237
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.
3338
</p>

0 commit comments

Comments
 (0)