Designer Ben Light has made a brilliantly simple device that lets you pull off the book switch thing that we see in the movies. You’ll have to figure out how to move a whole bookshelf, but if all you need is a way to trigger an electronic device, the Secret Passageway Switch will do the trick.
I’m not sure exactly how the switch works, but Light does mention that it’s a modified pull chain switch. Place it in between a book, secure the string and then connect the plug of any electrical device into the switch’s own socket. When you pull the book outward, the string is pulled with it, toggling the switch.
The Secret Passageway Switch was sold at Vespoe for $50 (USD), but unfortunately it’s sold out as of this writing. Hopefully Light will make some more. Although I’m sure the tinkerers among you can cobble your own version without spending a penny.