Disclosed is sprinkler system. The system comprises a gate valve. Further, a sprinkler frame is mounted on the gate valve. The sprinkler frame further consists of wires for connection. The system further comprises a generator. The generator is mechanically coupled with a rotor and a generator base. Further the system comprises of an electronic component. The system is housed in a sprinkler housing.