In this paper, we propose a new framework for ubiquitous computing by rule-based, event-driven I/O (input/output) control devices. Our approach is flexible and autonomous because it employs a behavior-description language based on ECA (Event, Condition, Action) rules with simple I/O control functions. We have implemented a prototype ubiquitous device with connectors and several sensors to show the effectiveness of our approach.