diff --git a/k3s/files/etc/salt/minion.d/beacons.conf b/k3s/files/etc/salt/minion.d/beacons.conf index e88ab92..1605fe4 100644 --- a/k3s/files/etc/salt/minion.d/beacons.conf +++ b/k3s/files/etc/salt/minion.d/beacons.conf @@ -10,4 +10,6 @@ beacons: - /dev/serial - /dev/ttyUSB0 - /dev/ttyUSB1 + - /dev/ttyACM0 + - /dev/ttyACM1 - disable_during_state_run: True diff --git a/k3s/files/etc/udev/rules.d/90-zwave.rules b/k3s/files/etc/udev/rules.d/90-zwave.rules new file mode 100644 index 0000000..ab3b552 --- /dev/null +++ b/k3s/files/etc/udev/rules.d/90-zwave.rules @@ -0,0 +1,6 @@ +SUBSYSTEM=="tty", \ +ACTION=="add", \ +DRIVERS=="cdc_acm", \ +ATTRS{idProduct}=="0002", \ +ATTRS{idVendor}=="1d6b", \ +SYMLINK+="zwave" diff --git a/k3s/usb-devices.sls b/k3s/usb-devices.sls index 8913377..da1b106 100644 --- a/k3s/usb-devices.sls +++ b/k3s/usb-devices.sls @@ -19,6 +19,15 @@ Restart salt-minion: Add the rfxcom udev rule: file.managed: - name: /etc/udev/rules.d/90-RFXtrx433.rules + - source: salt://k3s/files/etc/udev/rules.d/90-RFXtrx433.rules + - user: root + - group: root + - mode: "0644" + +Add the zwave udev rule: + file.managed: + - name: /etc/udev/rules.d/90-zwave.rules + - source: salt://k3s/files/etc/udev/rules.d/90-zwave.rules - user: root - group: root - mode: "0644" @@ -28,3 +37,4 @@ reload udev rules: - name: udevadm control --reload - onchanges: - file: Add the rfxcom udev rule + - file: Add the zwave udev rule diff --git a/salt-master/files/srv/reactor/device_reactor.sls b/salt-master/files/srv/reactor/device_reactor.sls index bdc9e28..c724103 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'] -%} +{% if label in ['rfxtrx433', 'zwave'] -%} {% if data['change'] == 'IN_CREATE' -%} {% set label = label + '=true' -%} {% else %}