How To Change Code Z Wave Device
OK I think I finally have this figured out. At least in the sense of a desired end result anyways. Thanks again @wintered and @tim.bishop who have both hinted at a better approach than devfs_ruleset=3
.
What may be unclear to a novice user such as myself is the fact that it'southward the devfs.rules on the FreeNAS host information technology's cocky that need to be modified (Not rulesets within the jail). In other words we create a custom devfs_ruleset on the FreeNAS host which allows us to expose our z-wave (or zigbee) USB sticks. Then set up simply set the jail to use our new custom ruleset. Exactly how to exercise this (while seems simple now) was not so obvious at first.
Just to epitomize, on FreeNAS 11.2-RELEASE iocage jails, by default, accept only a express number of devices exposed in /dev
Our zwave and zigbee devices are non in this list.
Lawmaking:
sudo iocage exec homeassistant ls /dev bpf bpf0 crypto fd null ptmx pts random stderr stdin stdout urandom nil zfs
Setting devfs_rulset=iii
is a quick fix but exposes more of /dev
then may be desired. (Bottom Post #2 shows list)
For zwave and zigbee USB devices to piece of work we but simply need to expose/dev/cua*
. To achieve this nosotros can use a custom devfs_ruleset. Since my OP I have switch to the GoControl HUSBZB-1 which is both a zwave and zigbee radio. The zwave radio remains /dev/cuaU0 and the zigbee radio is /dev/cuaU1. This seems a more desired upshot. Beneath is /dev
tree using custom devfs_ruleset
Lawmaking:
sudo iocage exec homeassistant ls /dev bpf cuaU0 cuaU1 fd ptmx stderr urandom bpf0 cuaU0.init cuaU1.init log pts stdin zero crypto cuaU0.lock cuaU1.lock null random stdout zfs
A few quick notes before create our custom devfs_ruleset.
- Actually nosotros are creating a script that will create the custom devfs_ruleset for the states
- The name of this script trivial. In this instance I chosen mine zwave-ruleset.sh
- This volition create devfs_ruleset 99
on FreeNAS.
- I'm using 99
because it seems unlikely this would other wise be used by the host.
- Only rulesets 1-four
are defined in /etc/defaults/devfs.rules
simply I accept no thought what voodoo the middle-ware is performing
First create a simple script zwave-ruleset.sh
on your FreeNAS. This as mentioned is what will really create the custom ruleset. I but used the console and created this file in my home directory with the following contents - Note: change 99
in ruleNum=99
if you desire a different ruleset number:
ee zwave-ruleset.sh
Code:
#!/bin/sh # Create custom devfs_ruleset with this NUMBER ruleNum=99 /sbin/devfs rule -s ${ruleNum} add include ane /sbin/devfs rule -due south ${ruleNum} add include ii /sbin/devfs rule -southward ${ruleNum} add include 3 /sbin/devfs rule -s ${ruleNum} add together path zfs unhide /sbin/devfs rule -s ${ruleNum} add path 'bpf*' unhide /sbin/devfs rule -s ${ruleNum} add path 'cua*' unhide
Be certain to make the script executable
chmod +x zwave-ruleset.sh
Simply running this script from the console works but these changes will exist lost after reboot. (We'll fix that at the end) That's ok for now. We can nevertheless apply this to create our ruleset and test everything works before adding it as a kickoff-upwardly script in the FreeNAS GUI.
sudo sh zwave-ruleset.sh
You can view the ruleset has been created correctly. sudo devfs rule -southward 99 show
should render the following:
Code:
sudo devfs dominion -southward 99 show Password: 100 include i 200 include two 300 include 3 400 path zfs unhide 500 path bpf* unhide 600 path cua* unhide
I will mention here, when creating a new jail, it is possible to fix the devfs_ruleset during cosmos as well. Simply to clear though, you must create the custom ruleset before this volition piece of work! Example to create a new jail for Home Assistant using devfs_ruleset=99
we take simply created higher up.
sudo iocage create -r xi.two-RELEASE boot=on dhcp=on bpf=yes vnet=on devfs_ruleset=99 -n homeassistant
If you're jail is already installed y'all just need to ready the jail to apply new ruleset. You tin do this from the GUI every bit shown in the 2d post (enter 99 instead of 3) or from the console. You'll need to restart the jail before it will apply the new ruleset.
Here I find the panel quicker. In this case the jail name is `homeassistant`.
sudo iocage set devfs_ruleset=99 homeassistant
sudo iocage restart homeassistant
If everything is working as expected, finally add together zwave-ruleset.sh
as a startup script in the FreeNAS GUI.
This terminal step is how we get FreeNAS to automatically recreate our custom ruleset during every (re)boot.
How To Change Code Z Wave Device,
Source: https://www.truenas.com/community/threads/usb-z-wave-device-no-longer-shows-up-in-iocage-jail-on-freenas-11-2.71301/
Posted by: liddellpacconte.blogspot.com
0 Response to "How To Change Code Z Wave Device"
Post a Comment