Lirc IR Remote problem

  • Hi there,
    I'm new in here and newbe into Libreelec.
    So my problem is, i have installed an IR reciver on my Pi3, and I want to Use my Samsung TV remote to Control Kodi.

    First of all I have an IR Blaster on my TV with to Controll other devices. Lirc can't recognize the IR Codes so i think the IR Blaster is Bronken.

    So i have sync the Original Remote, this works fine. Now the problem is, when i want to use my TV normal, without kodi, the Pi still recive the IR signals and controls Kodi.

    Is there any possibility to write an script where i can deaktivate and activate lirc when i press an specific button on my Remote.

    Thanks.

    P.S. sorry for bad English.