First I used the sample code (ReciveDump) from the IRLibrary to get raw data from the IR Sensor
and then I used the analyze tool (auto_analyse_raw_data.py) from a github repo --> GitHub - crankyoldgit/IRremoteESP8266: Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/