I will stick to the second option, since it makes the task much easier, you wait for the real signal and then you start to act, everything is much simpler
Are you sure you can process the signal in time? You can't be tied to a computer 24 hours a day. and automation will not miss anything. I for the first option!