A smart protection valve can be very helpful in protecting from fire and dangerous gas leakage by automatically cutting the supply from valve, in such a situation.
I haven't received MOSFET provided by company so I make making this project on assumption with Arduino code. You might refer to other project for how to use MOSFET to control things.
connect the things according to schematics
Note:- for connection with Mosfet refer to other tutorials because I have not receive Mosfet so I have have just show raw schematic .
You can also add temperature for better safety system.