|
|||||||||||||
REDMOND, December 1, 1999 The Home API Working Group today announced that it has merged its efforts with those of the Universal Plug and Play (UPnP) Forum to ensure a unified specification for development of home control software and products.Press ReleaseFor more details or About Home API
Introduction This document describes Home API, a set of software services and programming interfaces that enable applications to discover and control home devices such as televisions, VCRs, cable boxes, security systems, lights and climate control systems. The primary goal of Home API is to simplify and reduce the cost of developing software applications that enhance users' entertainment, security, comfort and convenience through the intelligent use of controllable home devices. Home API interfaces are protocol-independent. Applications using Home API are shielded from differences in the underlying networks and protocols used to communicate with home devices. Background and Environment
The deployment of home networks and smart controllable home devices will enable the development of compelling new home applications that move us closer to the vision of the "intelligent home" that enhances consumers' comfort, convenience, peace of mind and entertainment. However, one problem in developing such applications is that there are numerous competing home networking protocols and no standard application programming interfaces (APIs) for accessing home devices. Because of these development difficulties, the members of the Home API Working Group have joined efforts to define and develop APIs and other software infrastructures to encourage the creation of compelling applications that "discover" and interact with home devices. The final result, the Home API Specification and Software Development Kit (SDK), is targeted at independent software and hardware vendors that develop software or hardware for home PCs and controllable home devices. By enabling applications that connect to home devices, all parties (the PC, home networking and home device industries) can benefit through software sales, new device sales and market segment expansion. APIs vs. Protocols To understand the scope of Home API, and to put different home networking initiatives in perspective, it is important to understand the difference between a networking protocol and an application programming interface. Protocols
APIs
An important distinction between an API and a protocol is that protocols specify inter-device communication and APIs specify local software services within a single device. For example, it is quite common for two completely different APIs on two machines to allow applications to communicate using a common underlying protocol. There is no need to reconcile differences between APIs on two machines because APIs are not externally visible. However, protocols are externally visible and must be supported by both sides to enable communication. APIs and protocols are sometimes confused because APIs are often layered on top of protocols (e.g., the kind of API allows applications to communicate using protocols). The association between a protocol and an API layered on top of it is often so strong that the distinction between them becomes blurred. However, it is also possible for a protocol-independent API to be layered on top of one or more underlying protocols. Home API adopts this approach. Relationship to Other Home Networking Initiatives One of the most commonly asked questions about Home API is how it relates to other home networking initiatives. Virtually all of the other existing and emerging home networking initiatives (HAVi, Universal Plug and Play, Jini, Echonet, VESA Home Network, CEBus, X-10, LonTalk, Home Plug-and-Play, etc.) are primarily concerned with enabling peer-to-peer device interoperability across home networks. To do this, they specify one or more protocols by which home devices communicate. Unfortunately, the inherent diversity of devices and networking requirements is likely to frustrate efforts to establish a set of common protocols for seamless peer-to-peer interoperability across all home devices. For example, home network bandwidths range from a few bits per second for X-10 to 400 Mbps and higher for IEEE 1394. Simple devices with low bandwidth requirements cannot afford the expense of connecting to a high-speed network such as 1394. Furthermore, many protocols suitable for use on high-speed networks are entirely inappropriate for low-speed networks. To expose the complete set of underlying device and protocol features to applications, many home networking initiatives also define an API that corresponds closely to their protocols. Since home networks are likely to remain heterogeneous, with multiple incompatible protocols used to discover and control different types of devices, application writers are faced with the prospect of using multiple protocol-specific APIs with no common underlying programming model. Home API differs from these other initiatives in that it does not define a protocol. Instead, it defines a protocol-neutral API and a common programming model for all home devices. Home API also defines an extensible service provider architecture that enables device and network vendors to make their hardware accessible to Home API applications. Home API does not attempt to solve the problem of peer-to-peer device interoperability. Instead, it simply exposes the functionality of home devices to client applications running on a Home API platform. These applications can use Home API to query and control devices that use incompatible protocols without dealing with any protocol-specific issues. Since Home API is protocol-neutral, it is largely complementary to and synergistic with other home networking initiatives. The Working Group embraces these other initiatives because they should ultimately increase the number of intelligent and communicating devices accessible to Home API applications. Conversely, Home API can also provide benefits to other home networking initiatives. First, Home API's extensible service provider architecture makes it easy for these other initiatives to expose their services and devices to Home API applications. Second, Home API can provide protocol-specific initiatives with a way to discover and expose devices on other networks that support other protocols. Although enabling this type of protocol bridging is not an explicit goal of Home API, it is a legitimate and plausible use of Home API. Home API Features and Benefits Home API supports multiple home networks and is designed to allow application programmers to access home devices in a protocol-independent manner. The advantage to the developer is that the way the application accesses a home device is the same, regardless of the underlying protocol that is used to talk to the device. By shielding applications from the underlying heterogeneity of home networks and providing standard APIs for controlling home devices, Home API will help get applications that use home devices developed quickly and easily. Home API allows applications to control and query the status of home devices. For example, an application could use Home API to query the current temperature of an outside thermometer or change the channel on a television. Home API does not support data streaming such as sending a video stream from a PC to a digital VCR. Other APIs would be used in conjunction with Home API for that purpose. Figure 4 illustrates the Home API architecture from a client application's perspective. Although devices in this figure may reside on separate physical home networks, Home API hides this detail and provides clients with a uniform view of all home devices. Applications control home devices by setting or getting properties of objects corresponding to those devices. Applications can also subscribe to property change events to receive notification of device state changes. Service providers for underlying devices and networks translate the high-level operations on Home API object properties into corresponding commands sent to devices across networks.
Key Technical Features of Home API Benefits of Home API for Applications Developers The following steps are typically required to find and control a device: The following steps are required to find and control a device using Home API: The following Home API example shows how a single line of Visual Basic code can obtain an object corresponding to a VCR device and start its tape playing. GetObject("home:Living Room/My VCR").Transport.Mode = "play" Note that this code has no protocol dependencies in it. The actual VCR device might be controlled via an IR command or via an AV/C or HAVi command. The application is shielded from this underlying complexity. Benefits of Home API for Service Providers and Hardware Vendors With Home API, hardware developers merely need to write a single Home API-compliant driver for their device that exposes the device and its controllable attributes through Home API. When the user installs this driver, the device will become controllable. This is a major benefit that will greatly speed the acceptance and sales of new controllable devices and control networks into the home. Home API will enable consumers to buy a greater selection of applications at lower prices. As Home API speeds the software development process, it will reduce time to market, making better home control applications available sooner. These applications will expand the comfort, security and entertainment features of users' homes at a price substantially below the custom-installed solutions currently found in "high-end" homes. For example, Home API makes it easier to create entertainment applications that automatically control all of the devices in a home theater system to simplify its configuration and use. Another example is an application that defines "house modes" that allow users to specify a set of actions to be performed as a result of entering a specific mode. The "asleep" mode might cause the security system to arm, the thermostat to be lowered, a nighttime lighting pattern to be set and an alarm clock to be set according to the occupant's schedule. A smart CallerID screener would also adjust its mode to immediately direct certain calls to an answering machine rather than allowing the phone to disturb the occupants. Furthermore, Home API will speed the support of new home networks and devices. Homeowners won't have to wait for a new release of an application program when installing new controllable devices or home networks. New home devices and networks will ship drivers compatible with Home API and service providers that will readily install into an existing Home API system. Home API Architecture This section provides a more technical discussion of the Home API architecture and features. Figure 5 depicts a slightly more detailed view of the Home API architecture than Figure 4. Container objects, property routes and event subscriptions are described in the sections that follow. Property-Based OLE Automation Object Model More complex devices, such as televisions and VCRs, are modeled as a set of subobject properties, such as Tuner, Audio and Display, corresponding to functional subcomponents of the devices. Each of these subobject properties is an object that is composed of a set of properties. For example, Tuner subobjects have a property called Channel. Given a TV Home API object, a client written in Visual Basic would write the following code to tune to Channel 4: "tv.Tuner.Channel=4" In addition to controlling devices via properties, clients can also subscribe callback objects to receive asynchronous notification when properties of Home API objects change. These event subscriptions can also include a filter specification to further constrain the events to be generated. For example, a client can request notification when the light's Brightness value changes. Service Providers Service providers are also responsible for discovering devices using an underlying network or bus enumeration mechanism and creating corresponding Home API objects for them. Service providers for networks, such as X-10, that have no enumeration capabilities will likely require the user to notify them of the installation of a new device through a user interface. The Home API architecture defers all such implementation issues to service providers. Extensible Home Device Models Home API Run Time Supports Autonomous Operation Container Objects Object Discovery Set tv = GetObject("home:Living Room/TV") Furthermore, clients can enumerate containers to retrieve child objects of a given type. (This is useful when initially discovering what devices are present.) Each Home API object has a unique, persistent ID in addition to a user-readable name, and the ID can be used to obtain the object irrespective of the container it belongs to. ######### Microsoft, Visual Basic and ActiveX are registered trademarks or trademarks of Microsoft Corp. in the United States and/or other countries. |
Home | About Home API | FAQs | Companies | In the News | Members Only
|