-
Notifications
You must be signed in to change notification settings - Fork 11
Using a USB Z Wave or Zigbee controller
ℹ️ The TrueNAS CORE Community Plugin includes the devfs_ruleset
in plugin manifest.
- USB device are passed through automagically, when using the community plugin 🧙
- This will use a script to create the custom devfs_ruleset on your FreeNAS
- The name of this script is trivial. In this example I use
zwave-ruleset.sh
☢️ There is a know issue that iocage deletes the devfs_ruleset
when the jail is stopped ( and restarted ) - Typically, there is no need for frequently stopping or restarting the jail so this is usually not an issue, however, if your Z-Wave or Zigbee devices have suddenly stopped working after a plugin update or jail restart, this is the most likely cause. You'll need to stop the jail, re-run the zwave-ruleset.sh
script on your FreeNAS to re-create this devfs_ruleset
, and finally start jail.
- The script will create
devfs_ruleset 99
on your FreeNAS - I use
99
because it seems unlikely this would otherwise be used - To use a different ruleset number, change
RULE_NUM=99
I used the FreeNAS console to create the script in my user's home directory
ee zwave-ruleset.sh
Add the following contents
#!/bin/sh
## Create custom devfs_ruleset RULE_NUM
RULE_NUM=99
/sbin/devfs rule -s ${RULE_NUM} add include 1
/sbin/devfs rule -s ${RULE_NUM} add include 2
/sbin/devfs rule -s ${RULE_NUM} add include 3
/sbin/devfs rule -s ${RULE_NUM} add path zfs unhide
/sbin/devfs rule -s ${RULE_NUM} add path 'bpf*' unhide
/sbin/devfs rule -s ${RULE_NUM} add path 'cua*' unhide
- To Save and Exit, press ESC then press ENTER twice
Make the script executable
chmod +x zwave-ruleset.sh
- Keep this script handy for the issue mentioned above
sh zwave-ruleset.sh
Check that your custom ruleset has been successfully created
devfs rule -s 99
- You should see similar output
$ sudo devfs rule -s 99 show
100 include 1
200 include 2
300 include 3
400 path zfs unhide
500 path bpf* unhide
600 path cua* unhide
- You can do this from the FreeNAS console or use the webui
- I find using the FreeNAS console quickest
For example, if your jail is named homeassistant
iocage set devfs_ruleset=99 homeassistant
iocage restart homeassistant
- Set
zwave-ruleset.sh
to run at startup using the FreeNAS webui
This is required for FreeNAS to automatically (re)create the custom ruleset during (re)boot.