Adding python code to get pegel and send it out