I'm using the "onDeviceUnplug" and "onEnumeration" events to publish an MQTT message when a device disappears or reappears.
In my use case, I want to keep track of expensive software licensing keys and I want to know if one is ever removed. Then send an SMS or e-mail.
It would be a lot easier and more intuitive to use a name / serial number or a nickname vs having to resolve the 4 available parameters
"$DEVPATH$" "$ADDRESS" "$VENDOR_ID$" "$PRODUCT_ID$"
I've tried to capture the events in syslog as a workaround but that seems to be going about it the long way around and it gets complicated when log files get archived and new files are started.
I'd like to know if it is possible to access the actual device "Name" or "Serial number" or even the "Nickname" and pass it as a parameter?
For instance in the example dmesg below, I'd like to be able to pass the "Product: DT HyperX 3.0" or "iLok and serial number" to the config.ini event line below.
Or, is it possible to pass the Nickname of the device as a parameter to these two events? It seems that $NICKNAME$" is only valid with the rename event.
Example dmesg snippets
[ 6670.699285] usb 1-22.214.171.124: Product: DT HyperX 3.0
[ 6670.699301] usb 1-126.96.36.199: Manufacturer: Kingston
[ 6670.699316] usb 1-188.8.131.52: SerialNumber: 20CF302E2606BF80D1FF32F5
[ 8616.430239] usb 1-184.108.40.206: Product: iLok
[ 8616.430254] usb 1-220.127.116.11: Manufacturer: iLok
[ 8616.430269] usb 1-18.104.22.168: SerialNumber: 12345678_12345678
onDeviceUnplug=/home/pi/onDeviceUnplug.sh "$DEVPATH$" "$ADDRESS" "$VENDOR_ID$" "$PRODUCT_ID$"