diff --git a/k3s/files/etc/udev/rules.d/90-zigbee.rules b/k3s/files/etc/udev/rules.d/90-zigbee.rules new file mode 100644 index 0000000..e904a5b --- /dev/null +++ b/k3s/files/etc/udev/rules.d/90-zigbee.rules @@ -0,0 +1,5 @@ +SUBSYSTEM=="usb", \ +ACTION=="add", \ +ATTRS{manufacturer}=="Texas Instruments", \ +ATTRS{product}=="TI CC2531 USB CDC", \ +SYMLINK+="zigbee" diff --git a/k3s/usb-devices.sls b/k3s/usb-devices.sls index da1b106..2457f4d 100644 --- a/k3s/usb-devices.sls +++ b/k3s/usb-devices.sls @@ -32,9 +32,18 @@ Add the zwave udev rule: - group: root - mode: "0644" +Add the zigbee udev rule: + file.managed: + - name: /etc/udev/rules.d/90-zigbee.rules + - source: salt://k3s/files/etc/udev/rules.d/90-zigbee.rules + - user: root + - group: root + - mode: "0644" + reload udev rules: cmd.run: - name: udevadm control --reload - onchanges: - file: Add the rfxcom udev rule - file: Add the zwave udev rule + - file: Add the zigbee udev rule diff --git a/salt-master/files/srv/reactor/device_reactor.sls b/salt-master/files/srv/reactor/device_reactor.sls index c724103..c450abc 100644 --- a/salt-master/files/srv/reactor/device_reactor.sls +++ b/salt-master/files/srv/reactor/device_reactor.sls @@ -1,5 +1,5 @@ {% set label = data['path'].split('/')[-1] -%} -{% if label in ['rfxtrx433', 'zwave'] -%} +{% if label in ['rfxtrx433', 'zwave', 'zigbee'] -%} {% if data['change'] == 'IN_CREATE' -%} {% set label = label + '=true' -%} {% else %}