Running digital ground at AC line potential (not neutral)
My primary question is what advantage is there to choosing L rather than N to make the digital ground?








simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. The circuit is referenced to L to allow direct triggering of the triac without need for opto-triac or gate pulse transformer.

The wall box has live-in, switched live-out and neutral. Since the neutral return from the lamp may not be available that's not an option and switching the live is a little bit safer when changing the light bulb. (I say a little because a triac would not be considered a safety isolation device.)


  Second question, any guess as to what sort circuit they use to generate their 3.3 V DC supply while connected to the mains?


Probably a capacitive voltage dropper power supply. A web search should provide plenty of examples - many very dodgy ones.