Unable to add a diyHue Switch to (Philips) Hue bridge

I’m trying to build a diyHue switch using an ESP. For some reason I can’t get the switch registered. It just doesn’t show up in the Hue app.
This is where I got my information
This is the code I use

Also in the CLIP API Debugger I get an error (Command response “Error 0”)

What am I doing wrong?
Can someone tell me the order I should follow in the app to get the accessory to show up?

If you need extra info, let me know which info you need.

Gaston

added: I can’t register the switch on the DiyHue-emulator either

We discuss this issue in private on Slack, there was a bug in the code that now is fixed.

Yes, issue is fixed. Thank you for your great work