A New York school district has begun installing vape detectors in middle school bathrooms.

The FlySense FS300 vape detectors at Lindenhurst Middle School on Long Island can pick up nicotine and THC, as well as sound to notify officials of fights or bullying.

Two vape detectors have been installed in each of the bathrooms at the middle school. The Town of Babylon paid for the devices using funds from the American Rescue Plan.

"The device not only picks up nicotine in the air, it also picks up on THC and also picks up on aggressive behavior, so students looking to bully and fight in the bathrooms," Derek Peterson of Soter Technologies, which developed the detectors, told CBS New York.

US SCHOOLS INVEST MILLIONS IN SURVEILLANCE TECHNOLOGY TO COMBAT TEEN VAPING EPIDEMIC

vaping close-up shot

A New York school district has started installing vape detectors in middle school bathrooms. (iStock)

The detectors can sense air quality and shifts in sound. Peterson said the devices use artificial intelligence algorithms that can differentiate between a door and toilet lid slam from "when somebody is roughhousing in the bathroom."

But, Peterson said, there are no microphones in the devices.

When anomalies are detected, an email is immediately sent to Principal Frank Naccarato. The students caught vaping will then be connected to professional intervention services.

"There's still a consequence, but now we've added that education piece ... They also have to do a component of research based on vapes, how it hurts you," Naccarato told CBS New York.

FDA WARNS THAT NICOTINE-LIKE CHEMICALS IN VAPES MAY BE MORE POTENT THAN NICOTINE

Vaping

The FlySense FS300 vape detectors at Lindenhurst Middle School on Long Island can pick up nicotine and THC. (Getty Images)

Two students have already been caught and connected to professional services since the detectors were installed two weeks ago.

The district considered the idea of adding the detectors to the bathrooms at the suggestion of student Vanessa Probst, 15, who learned from speaking with friends that her classmates were so addicted they would head to the bathroom to vape.

CLICK HERE TO GET THE FOX NEWS APP

"I was doing research on it, and I saw the side effects and how you can get popcorn lung, all the severe cancer you can get," she told CBS New York.

The detectors are expected to soon be installed at Lindenhurst High School, as well as other districts, including Copiague and Wyandanch.