Having a problem using TRIAC in my project:
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Slightly tidied-up schematic to clarify the TRIAC switching arrangement.


  When R6 is 100k, the LEDs glows at the moment of switching, then turns off. If I use 10k or 470ohm resistor as R6, the LED glows continuously, but very soon R2 burns out and LED goes off.


This doesn't make any sense. R2 is, effectively, on a separate circuit to the triac. The two circuits are connected at the mains (as though you had plugged them into separate wall sockets) and the PIR signal is opto-isolated from the triac so there is no reason for high currents in R2.

A photo of your setup may help us to diagnose further.