Resetting TRÅDFRI light bulb

I’ve recently had to re-provision all my ZigBee devices. It was fun time! The most fun was with IKEA TRÅDFRI light bulb – despite many tries I could not trigger the reset, despite trying all of:

What I finally figured out is that my setup, where bulb comes online with off state (useful to not wake you up when there was power outage during night) was most likely causing the issue. So I’ve managed to do this to reset the bulb:

  1. First pair bulb with remote – I’ve used TRÅDFRI on-off switch for this. The pairing is simple – just put the remote very close to bulb (instruction says no more than 5cm) and hold pairing button on remote for 10 seconds. The bulb should double flash indicating that pairing was successful. Now you can turn the bulb on and off with remote. And when you toggle power it will light up – which is the most important bit.
  2. Execute regular reset procedure as in official instruction. From my tests the following sequence worked (I used remotely controlled power socket to get the perfect timings, but you should be able to reset it by hand):
    1. Turn bulb on, wait 5s (not sure if needed)
    2. Turn bulb off for 0.8s then on for 0.3s – do it 6 times total
    3. Wait for bulb to start flashing indicating the pairing mode – it should take less than 15s.
    4. Reset is now complete

Reset procedure as a code:

print('turning on for 5s...')
set_bulb_on()
sleep(5)

# toggle sequence
for i in range(6):
    set_bulb_off()
    sleep(0.8)

    set_bulb_on()
    sleep(0.3)

print('bulb should flash indicating successful reset')

I could not trigger the reset (tried many combination of on/off timings) and it only worked when bulb was first paired in remote, resulting in bulb turning on after power on.

Extra note: I could not pair the bulb with RODRET wireless dimmer – the bulb flashed few more times than expected, which I guess indicated an error.