The present invention relates to a device for intermittently obstructing a bodily opening, such as a gastric opening, and includes a proximal member connected to a distal member by a tether. The proximal member includes an apron member surrounding a first occluding member, which is formable from an elongated and narrower configuration to a contracted or expanded but wider configuration. When employed in the stomach, the device of the present invention is arranged transluminally, with the distal member disposed in the duodenum and the proximal member disposed against the pyloric valve, intermittently occluding the pyloric valve and preventing or delaying the flow of gastric contents through the pyloric valve. In certain embodiments, a reservoir may be included for releasing a substance of interest, for example for releasing insulin from a reservoir disposed in the distal member. Sensors, actuators, and data transmission devices may also be included.