I had heard of something relating to melacha on Shabbat from an (orthodox!) rabbi who mentioned something really interesting. At a certain level of removal, one can indirectly perform melacha. It was something to the effect of a rube goldberg action wherein one starts one reaction which isn't melacha which in turn starts another reaction which isn't melacha which starts another reaction which isn't melacha which, finally, starts a reaction that is melacha, and somehow this is kosher.
I suppose the premise is that at a certain level, it's not guaranteed that you're doing something and something in the multiple reactions could fail, so it removes you a certain distance which makes it extremely unlikely for you to break Shabbat or Yom Tov. I've also heard of this applying to kosher ovens which can be turned on during Shabbat or Yom Tov as well as wheelchairs and certain motion-sensing cameras. What is the actual halacha of this and does it really apply as above (by a certain level of removal from the prohibited act)?