Remote control and home automation terms are becoming very important nowadays. Sensors are everywhere: HVAC (Heating, Ventilation and Air Conditioning) systems, fridges, security cameras, hard disks inside servers, voltages, temperatures and fan speeds in modern computers are widespread. Access to these sensors, both physical and virtual (e.g. data retrieved from an operating system), is possible thanks to third party tools and applications. This work outlines a framework called OBRECAD (Object Based REmote Control And Domotics). OBRECAD allows the communication between sensors, generic devices and actuators. It is powerful enough to support current and future sensor implementations and usages thanks to the realized hardware abstraction, yet easy enough to use. It can be easily implemented even on a micro-controller. The command oriented messaging framework allow an ubiquitous access in a very easy way using even text only email, or any SMS capable device. Complex architectures can also be managed in an hierarchical way thanks to the gateway component. Finally, a Java prototype was developed, but any programming language can be used. The prototype is configured using XML files that describe the connections between devices.