added node label for zwave

This commit is contained in:
= 2020-12-25 17:05:06 +01:00
parent 643e1ccc64
commit c4e163f66e
4 changed files with 19 additions and 1 deletions

View File

@ -10,4 +10,6 @@ beacons:
- /dev/serial
- /dev/ttyUSB0
- /dev/ttyUSB1
- /dev/ttyACM0
- /dev/ttyACM1
- disable_during_state_run: True

View File

@ -0,0 +1,6 @@
SUBSYSTEM=="tty", \
ACTION=="add", \
DRIVERS=="cdc_acm", \
ATTRS{idProduct}=="0002", \
ATTRS{idVendor}=="1d6b", \
SYMLINK+="zwave"

View File

@ -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

View File

@ -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 %}