Start action when a usb stick is connected

I am creating some puzzles with node-red.
One puzzle is with some data on a usb stick.
The player needs to plug the usb stick in and then a flow should start

I am trying to do this with lsusb but then the whole time i should trigger this script to check for changes
Is this a good idea? Or is there a better solution with an auto detect something?


I wonder if you could use a Watch node watching the mount point. Don't know if that would work though.

O cool, i try that

Rather to my surprise it seems to work. I am using Ubuntu and USB sticks get mounted under /media/myusername. A Watch on that directory shows the stick partitions when you plug it in.

o jee cool! got it running :wink:

Thanks for your help!!

Ok, Roger what devious set of puzzles are you setting up?

I dont know if it is devious :wink:
It is some kind of escape room in a box