I like these gooseneck desk lamps a lot and I’ve had this one for more than 10 years.
For the past 2-3 it’s had a E27 socket to AC adapter powering a USB charger powering a bare ESP32cam dangling out of the head as a really lazy security camera rig. It ran esphome and piped to hassio.
I finally got a wild hare to make it less obviously lazy and popped in a raspberry pi zero W with a camera and a relay controlling the head light The raspi runs motioneyeos and pipes to hassio. The relay fires from the motioneyeos UI and I finally got it to fire from hassio by a shell command switch that uses ssh to run a gpio script on the pi.
I had to remove the base weight to get all the electronic in and that left it a little top-heavy, so I just hot-glued in a half-pound or so of bismuth pellets because I am a person who owns a startling quantity of bismuth for reasons that are probably explained elsewhere on this site.