The gif that shows what I want to do was done manually, on each frame before being made into an action. Basically, I rotate the hinge, and the wire is meant to follow the bottom of that part of the lamp. Everything is on one mesh, with weight painting and auto IK.
The reason for this question is that I want to do this without using moving the wire manually every frame. Most of the methods I've tried simply stretch out without dealing with the loop. Is there a way to do this that's better than just going frame by frame and adjusting the wire as the lamp rotates?