TITLE
Method and Apparatus for Device Control CROSS REFERENCE TO RELATED APPLICATIONS Not Applicable
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH
OR DEVELOPMENT
Not Applicable BACKGROUND The present invention relates to the control and modification of the operation of electronic devices or appliances and more particularly, to a method and apparatus for receiving program code over an A/C power line for use by an electronic controller in processing commands, instructions or data received over the A/C power line.
Due to the presence of power lines in almost all homes, it has been recognized that power lines may be useful for communicating commands to electronic devices attached to such lines. Accordingly, existing electronic devices have been designed to receive commands from the power lines to which they are attached. Such existing devices, however, have typically had no ability to dynamically change their fundamental operation and/or capabilities. As a result, the set of commands which these devices have processed has been limited and fixed at the time they are manufactured. For example, the operation of many such existing devices is defined by hard wired logic or program code stored in a read-only memory (ROM) . Changing the operation of such a device is not possible without removal of the device from service.
Specifically, in order to effect any change in the operation of such a device, the device must be taken out of service, and the ROM must be replaced with a new ROM containing new operating code. Often these devices would be disposed of and replaced by an entirely new system
including a ROM loaded with the new operating code. Such processes are costly in terms of down time for the device, labor to remove and modify the device, and materials used in the form of replacement components. Additional shortcomings of existing electronic control apparatus or appliances having control functionality include their inability to intercommunicate, and their further inability to modify the operations performed by other electronic controllers. These commands are then executed based on a current functionality of the device. Accordingly, complex operations involving actions performed by multiple devices require a centralized controller or computer to send commands to each device which must perform an action. Such restrictions prevent a system of multiple devices from interacting to provide a desired set of actions or behaviors in response to a single command.
Accordingly, it would be desirable to be able to modify the functional capabilities and/or behavior of a device coupled to an A/C power line without removing the device from service and without the need to physically replace the device or hardware components of the device.
In addition, it would be desirable for such devices to be able to inter-operate to support complex actions involving multiple devices.
SUMMARY
In accordance with the present invention, a system is disclosed for controlling one or more electric or electronic devices such as light bulbs, fans, HVAC systems, entertainment devices including audio and video components, climate control systems or components including heaters, furnaces, HVAC systems, or fans, security systems or components such as cameras or other sensors and alarms, or any other device which requires dynamic control of its operations. The disclosed system enables the operations and commands by which a device may be controlled to be dynamically modified. The disclosed system further permits the set of events which trigger changes in the operation of the device to be dynamically modified.
Specifically, the disclosed method provides for receiving program code over an A/C power line and monitoring the A/C power line for one or more subsequent commands or data which are processed at least in part through execution of the received program code. Additionally, the received program code may send program code, commands, or data which result in modification of the functionality or behavior of other devices attached to an A/C power line.
In one embodiment, the program code is received and executed by an electronic controller coupled to the device being controlled. The subsequent commands received over the A/C power line for example include one or more instructions in an interpreted programming language which are executed in part using the previously received program code. The electronic controller stores the received program code in a memory such as a random access memory (RAM) , and/or within a non-volatile store (NVRAM) . The electronic controller then executes the
received program code as needed to process commands or data received over the A/C power line. Further, the electronic controller transmits commands, data, and/or instructions over the A/C power line to other electronic controllers or devices. The commands or instructions transmitted to other electronic controllers may include portions of program code for storage and execution by the other electronic controllers or devices. The received program code may also operate to generate and transmit one or more status messages on the A/C power line, where the status messages optionally include data provided by and/or reflecting the status of the controller or the controlled device. The controller may be fabricated so as to be commonly housed with the device or alternatively may be remote from the controller and in electrical communication therewith.
In an illustrative embodiment, the electronic controller includes a microprocessor and a memory. The memory includes a real time operating system (RTOS) as well as a virtual machine (VM) , which are executed on the microprocessor. In one embodiment, the virtual machine is a Java(TM) virtual machine, which executes Java byte codes. In such an embodiment, the received byte codes include one or more Java class files. The code operative to form the virtual machine itself may be downloaded onto the electronic controller as part of the received program code. In such an embodiment, subsequent commands received over the A/C power line include sets of instructions, for example class definitions, which are processed by the virtual machine. The program code may for example be received from a remote server or electronic controller. The transmitted status messages may similarly be transmitted to another electronic controller or program server. Thus a system is provided for modifying the functional capabilities of a controller or controlled
device coupled directly or indirectly to an A/C power line which does not require removing the controller and/or device from service and/or physically replacing the controller and/or the device. The disclosed system further provides the capability for commands, data or program code to be exchanged among multiple electronic controllers over an A/C power line.
BRIEF DESCRIPTION OF THE DRAWINGS
The invention will be more fully understood by reference to the following Detailed Description of the Preferred Embodiments in conjunction with the following drawings, of which: Figure 1 shows an exemplary configuration of controlled devices and associated controllers coupled to an A/C power line consistent with the present invention;
Figure 2 shows an electronic controller as shown in Figure 1; Figure 3 shows an example of elements included within a memory of the electronic controller of Figure 2;
Figure 4 shows an example of steps performed consistent with the disclosed embodiments; and
Figure 5 shows an example of steps performed in response to receiving program code over an A/C power line, consistent with the disclosed embodiments.
DETAILED DESCRIPTION OF THE PREFERRED
EMBODIMENTS Figure 1 is a block diagram showing a configuration consistent with the present invention including devices lOa-lOf coupled respectively to controllers 12a-12f. The controllers 12a-12f are coupled to an A/C power line 14, which in turn is coupled to a server system 16. A controller 12g is further shown coupled to the A/C power line 14, without being coupled to a specific device. The
devices lOa-lOf are, for example, electric or electronic devices or appliances such as light bulbs, fans, HVAC systems, entertainment devices including audio and video components, climate control systems or components including heaters, furnaces, HVAC systems, or fans, security systems or components such as cameras, sensors or alarms or any other device whose operation is desired to be controlled via signalling messages conveyed over an A/C power line. Such messages may comprise packets or any other suitable message format. One or more of the devices lOa-lOf may further consist of electro-mechanical devices, such as electrically operated water valves or other devices which are actuated by the respective controllers 12a-12f. The controllers 12a-12f are illustratively coupled to a common A/C power line 14, and further coupled with each respective one of the devices lOa-lOf. During operation of the elements shown in Figure 1, any one of the devices lOa-lOf may be controlled by the respective one of the controllers 12a-12f. The controllers 12a-12f are operable to receive program code over the A/C power line 14. The received program code is then executed by the receiving controller to enable the controller to process messages that are subsequently received over the A/C power line. Such subsequent messages may include, for example, commands, program code, status messages and/or data transmitted by the server system 16 or another one of the controllers 12a-f. Processing of such received messages also for example results in the controller controlling the operation or behavior of the device to which it is coupled. Execution of the received program code may further cause one or more messages to be transmitted onto the A/C power line for receipt by the server system 16 or another one or more of the controllers 12a-12f.
The disclosed system supports complex operations involving message exchange between various ones of the controllers 12a-f. For example, where the device 10a is a light, a portion of program code may be transmitted over the A/C power line 14 from the server system 16 to a receiving, such as the controller 12a. The receiving controller 12a would load the received program code into an internal memory for execution. The controller 12a would then monitor the A/C power line 14 for messages. By way of example, execution of the received program code by the controller 12a would cause the controller 12a to dim the light of the device 10a to a 50% brightness for ten minutes, and then dim the light of the device 10a to 4% brightness over a period of 20 seconds unless temperature data received over the A/C power line 14 specifies that an outside temperature is above 32 degrees. In such a configuration, the device lOd, for example, is a device for monitoring an outside temperature (such as a thermometer) . The controller 12d would also receive program code which periodically transmitted or broadcast messages on the A/C power line 14 including data indicating an outside temperature detected by the device lOd. Such messages would accordingly be received by the controller 12a, which would control the light 10a in response to the received temperature values and execution of the received program code.
The program code loaded over the A/C power line 14 into controller 12a could further operate to send messages to other ones of the controllers 12b-12f in response to the received temperature information. For example where one or more of the devices lOb-lOc and lOe- lOf are exhaust fans, the controller 12a could send commands indicating that the exhaust fans should be operated for some specific period of time in response to temperature data received from the controller 12d
indicating a temperature above a specific threshold. Similarly, the controller 12a may send commands to other ones of the controllers 12b-12f also coupled to devices including lights. Such commands would for example provide specific operation of the lights coupled to the respective controllers in response to specific temperature information.
Figure 2 shows an illustrative block diagram of an electronic controller 12, such as electronic controllers 12a-12f in Figure 1. The electronic controller 12 is shown including an A/C power line interface 20 coupled to A/C power line 14. The A/C power line interface 20 is further shown coupled with a microprocessor 22, read only memory (ROM) 24, random access memory (RAM) 26, and device interface 28. The A/C power line interface blocks the A/C high voltage (e.g. 117 VAC) components while allowing signalling to be decoded and processed, for example using the known X-10 interface. The ROM 24 is for example any kind of non-volatile memory appropriate for storing program code executable by the microprocessor 22. Such non-volatile store could for example be electronically erasable programmable ROM (EEPROM) , flash RAM, or any other components providing similar functionality. The device interface 28 is operable to be coupled to a device that is controlled by the electronic controller 12. The device interface 28 may include a variety of connections to the controlled device, including A/C power, analog and/or digital signals. For example, where the device is primarily responsive to control of its power supply, the device interface 28 would enable program code executed by the controller 12 to control the A/C power sent to the device. In such an embodiment the intensity of a light in the controlled device could thus be controlled. Alternatively, the device interface 22 could provide digital signals to the controlled device. These digital signals would represent
one or more commands which the device would process and as a result perform certain associated actions. Accordingly, the device interface 28 would include an interface enabling program code executed by the controller 12 to control which commands would be sent to the controlled device, and the timing of such commands. The communication from the controller to the controlled device being controlled may be unidirectional for power or digital signalling information. Additionally, the communication from the controlled device to the controller may be unidirectional for status or other information. Alternatively, communication between the controller and the controlled device may be fully bidirectional. The device interface 28 could for example be implemented as part of one or more application specific integrated circuits (ASICs) , and/or some number of discrete logic components.
During operation of the elements shown in Figure 2, program code is received by the electronic controller 12 over the A/C power line 14 through the A/C power line interface 20. The received program code is then stored within the RAM 26 and/or the ROM 24. The received program code may then be executed using the microprocessor 22. Such execution for example may be provided in conjunction with a virtual machine program such a Java(TM) virtual machine, executing on the microprocessor 22, where the virtual machine provides a run-time execution environment for the received program code. In such an embodiment, the received program code would include one or more Java (TM) class files including Java byte codes.
Program code is executed by the controller 12 and monitors the A/C power line 14 for commands or data. When a message including a specific command or data is detected on the A/C power line 14, the controller 28 executes associated program code to process the command
or data, and controls the device coupled to the controller through the device interface 28 responsive to the executed program code and the contents of the received command or data. The executing program code may further cause messages including commands, data, or program code to be transmitted to other controllers or a server system through the A/C power line 14 in response to specific commands or data in received messages, or in response to the status of the device to which it is coupled, or some other predetermined event.
Figure 3 shows an example of elements included within a memory of an electronic controller. More specifically, Figure 3 shows a real time operating system
(RTOS) 32, a virtual machine software program 34, and a number of class files 36. The real time operating system 32 provides a set of software functions or routines which serve as an interface between the other software executing in the controller and the controllers ' s hardware components. For example, the real time operating system 32 provides a set of software functions or routines which interface other code in the controller to hardware components of the controller within the A/C power line interface 20 and the device interface 28 as shown in Figure 2. The real time operating system 32 may further be provided with program code which manages hardware resources such as a scheduler for allocating the microprocessor 22 shown in Figure 2 to various execution threads .
The virtual machine 34 of the disclosed embodiment provides a run time environment for executing byte codes included in the class files 36. An example run time environment would be a run time environment for processing Java byte codes. Such an environment includes an execution engine for processing byte codes. Further, the virtual machine 34 includes code for linking the class files 36 into a run time representation that can be
executed using the virtual machine 34, and for further preparing the class files 36 for execution including any necessary initializations and validation checks. While the virtual machine 34 is shown embodied in program code executing on a microprocessor in Figure 3, the disclosed system may also be provided using a hardware implementation of some or all of the functions performed by the virtual machine 34, or a combination of hardware and software. Each of the class files 36 include all of the information needed by the virtual machine 34 to define a single class. This information includes the declarations and the byte code for methods defined by the class. In one embodiment, each of the class files 36 include a set of nested tables in a predetermined format, including tables having information relating to the constants, interfaces, and methods defined by the respective class.
Figure 4 shows an example of steps performed by the presently disclosed system in a controller such as one of the electronic controllers 12 depicted in Figure 1. At step 40, the controller receives a message over the attached A/C power line which contains program code. The message is received by the real time operating system 32 as shown in Figure 3. At step 42, the real time operating system continues to monitor the A/C power line for messages. When at step 44 a message is detected which includes a command associated with the program code received at step 40, the command is processed at step 46 at least in part through execution of the program code received at step 40. The program code received at step 40 is for example executed in conjunction with the virtual machine 34 shown in Figure 4.
As a result of processing of the received command at step 46, the controller performs certain operations which result in controlling the behavior of the device at step 48. Such operations are for example performed using
functions or routines within the real time operating system in connection with the device interface 28 shown in Figure 2.
Figure 5 shows an example of steps performed in response to receiving program code over an A/C power line, such as performed in connection with step 40 as shown in Figure 4. At step 50, the real time operating system determines whether a message received over an attached A/C power line includes program code, for example as stored in a class file. If the message does not include a class file, then step 50 is followed by step 52. At step 52 the controller processes the contents of the received message, using program code previously received over the A/C power line. If the received message includes a class file, then step 50 is followed by step 54.
At step 54, the real time operating system checks the value of a signature field within the received message. The signature field value reflects the identity of a server system or another controller which transmitted the message. At step 56 the real time operating system determines whether or not the value of the signature field indicates a source of the message that is authorized to provide program code for execution on the receiving controller. If the source of the message is not authorized, then step 56 is followed by step 58, in which the message is discarded. If the source of the message is authorized, then step 56 is followed by step 60. At step 60, the real time operating system decodes the message further to extract the class file it includes, for example by stripping off any header information from the message. The real time operating system then loads the class file at step 62 such that the virtual machine can access the file by storing it beginning at a certain memory location and informing the
virtual machine of that location. The virtual machine then can dynamically link any byte code within the class file for execution. At step 64, the real time operating system transmits any requested acknowledgement to the transmitter of the received message. The acknowledgement indicates that the class file was successfully loaded, and byte codes it contained can now be executed as needed. While several embodiments of a system and method for controlling devices over an A/C power line have been disclosed, it will be understood by those of ordinary skill in the art that modifications to and variations of the disclosed embodiments may be made without departing from the inventive concepts herein disclosed. Accordingly, the invention should not be viewed as limited except as by the scope and spirit of the appended claims.