Patent Description:
The present invention relates to device discovery and address assignment for various devices on a network. More particularly, the present invention relates to a system and method for dynamic device discovery and address assignment for pool/spa equipment interconnected via a network.

Typically, discovery of devices on a half-duplex serial bus is accomplished by incrementing through a pre-defined address range, sending a response request to devices that are connected to a network, and recording the devices that respond. The Modbus communications protocol is one example of this approach.

In Modbus and other similar incremental addressing schemes, device enrollment can present some problematic conditions. For example, each device must be pre-addressed with a unique address to prevent multiple devices from having an identical address. This requirement makes setup and configuration of a network both a time consuming and error prone process.

Therefore, it would be desirable to provide a network device discovery protocol that does not require pre-assignment of device addresses, yet allows any number of like devices to be added to the network.

<CIT> concerns assigning network addresses for ventilators in a network.

<CIT> concerns a load control system to control the amount of power delivered to a plurality of electronic loads from an AC power source.

Aspects of the present invention are defined in the accompanying claims. According to a first aspect there is provided a system in accordance with claim <NUM>. According to a second aspect there is provided a system in accordance with claim <NUM>. According to a third aspect there is provided a method in accordance with claim <NUM>. Preferred optional features are defined in the dependent claims.

The present invention overcomes the disadvantages and shortcomings of the prior art by providing a system and method for dynamic device discovery and address assignment for a network. The system transmits a device discovery request from a master device on a network, such as a pool/spa system controller, and receives a discovery response from a slave device which includes a pre-configured identifier. The system determines a network address based on the slave device identifier, and transmits an enrollment instruction with the network address to be used by the slave device. The system could be used to discover and assign addresses to various types of devices on a pool/spa network, such as pumps, underwater lights, chlorinators, water feature controllers, remote controllers, and/or other types of devices.

A pool or spa system for a pool or spa is disclosed that includes components operatively coupled via a communications network supporting dynamic device discovery. The system can include slave devices and a master controller. Each slave device is configured to perform one or more operations with respect to the pool or spa. Each of the slave devices is initially un-configured and has a unique device identifier associated therewith. The master controller is operatively coupled to the slave devices to form a network. The master controller is programmed to assign each of the slave devices a network address based on the unique identifier of each of the slave devices and in response to bidirectional communication between the master controller and the slave devices to configure the slave devices and enable addressed communication between the controller and the slave devices. The slave devices could include a pump, a filter, a sensor, a heater, or other equipment.

The master controller can broadcast a device discovery request on the network requesting a response from the slave devices and can receive, in response to the device discovery request, a response from a first device of the slave devices including the unique identifier associated with the first device. The master controller can correlate the device identifier received from the first device with an available network address, assign the network address to the first device, and can transmit a message on the network that includes the device identifier and the network address. The first device can receive the message, compare the device identifier in the message to the device identifier of the first device, and store the network address as the network address of the first device based on a determination that the device identifier included in the message matches the device identifier of the first device. At least one slave device can be configured such that it does not retain the network address assigned by the master controller when the slave device is powered down. The master controller can be programmed to periodically determine whether the network includes a slave device requiring configuration and/or can be programmed to maintain at least one table correlating the unique device identifier of each of the slave devices with the network address assigned to each of the slave devices.

The pool or spa system can include a gateway device operatively coupled between at least one of the slave devices and the master controller. The gateway communicates with the master controller on behalf of the at least one of the slave devices to facilitate assignment of the network address to the at least one of the slave devices.

A system for dynamic discovery of networked devices in a pool or spa system is disclosed that includes a non-transitory computer-readable medium and a processing device (or master controller). The non-transitory computer-readable medium stores computer executable instructions for a process of dynamically discovering networked devices in a pool or spa system. The processing device is programmed to execute the computer executable instructions to transmit a broadcast message including a device discovery request to the networked devices in the pool or spa system, receive a response message from an un-configured pool or spa device in the pool or spa system that includes a unique device identifier associated with the un-configured device, correlate the unique device identifier with a network address, and transmit the network address to the un-configured pool or spa device to transform the un-configured pool or spa device to a configured pool or spa device.

Also provided is a method of dynamically discovering networked devices in a pool or spa system. The method includes the steps of transmitting a broadcast message including a device discovery request to the networked devices in the pool or spa system, receiving a response message from an un-configured pool or spa device in the pool or spa system that includes a unique device identifier associated with the un-configured device, correlating the unique device identifier with a network address, and transmitting the network address to the un-configured pool or spa device to transform the un-configured pool or spa device to a configured pool or spa device.

The foregoing features of the invention will be apparent from the following Detailed Description of the Invention, taken in connection with the accompanying drawings, in which:.

The present invention relates to a system and method for dynamic device discovery and address assignment for a network, as discussed in detail below in connection with <FIG>.

<FIG> is a diagram of a pool or spa system <NUM> with a plurality of networked pool or spa devices <NUM>-<NUM> connected to a controller <NUM>. The controller <NUM> could be a central pool/spa system controller, such as the PRO LOGIC line of pool/spa systems controllers manufactured by Hayward Industries, Inc. In a typical pool or spa system <NUM>, pump <NUM> is fluidly connected via pipes <NUM> to pool/spa <NUM>. Pump <NUM> provides a positive water pressure to drive water through filter <NUM> to remove debris from pool/spa <NUM>. Optionally, heater <NUM> can be fluidly connected to pump <NUM> to provide water heating of pool/spa <NUM> as desired. Sensors <NUM>, <NUM> are strategically placed along the pool/spa system <NUM> to provide water measurements, for example, water pressure, temperature, salinity, etc. Sensors <NUM>, <NUM> report measurements back to controller <NUM>. The system <NUM> can include other devices commonly utilized in a pool/spa system, such as underwater lights, chlorinators, water feature controllers, remote controllers, and/or other suitable types of pool or spa devices. Controller <NUM> provides a central control of the pool/spa system <NUM> to include, for example, timing of pump <NUM> operation, heater operation for temperature control, etc. As discussed in detail below, the controller <NUM> and the devices <NUM>, <NUM>, <NUM> can be operatively coupled (as shown by line <NUM>) to form a network of devices that communicate in accordance with the present invention to facilitate dynamic discovery of devices on the network and to assign addresses thereto. One or more of the devices <NUM>-<NUM> can be operatively coupled to the controller <NUM> via wires, cables, or buses, and/or can be in wireless communication with each other.

<FIG> is a diagram of a network system with a common data bus <NUM> (e.g. RS-<NUM> half-duplex serial bus) connecting the plurality of network devices <NUM>-<NUM> to the controller <NUM>. During installation of pool/spa system <NUM>, networked devices are connected via data bus <NUM>. Controller <NUM> provides operational control of pool/spa system <NUM>. Instead of pre-coding each device <NUM>-<NUM> with a unique network address, controller <NUM> (e.g., a master unit) connected to the pool/spa network dynamically discovers devices operatively coupled to bus <NUM> and assigns each device a unique address at the time of discovery, as described herein. This removes the requirement that all devices <NUM>-<NUM> be pre-addressed, and advantageously allows any number of like devices <NUM>'-<NUM>' (not shown) to co-exist with pre-existing devices <NUM>-<NUM>. This method greatly reduces setup and configuration time as well as configuration errors by removing the manual process of pre-coding network addresses.

<FIG> is a diagram showing gateway <NUM> connecting networked devices <NUM>, <NUM> to the controller <NUM>. In this embodiment, the gateway <NUM> allows the network to be segmented. In one exemplary embodiment, the gateway <NUM> is itself a smart component with the added responsibility of distributing data/information as messages (e.g., in the form of packets) to/from the local RS-<NUM> bus <NUM>. Further, each gateway <NUM> can be responsible for initiating the discovery process on its local bus. Gateway <NUM> creates a table of unique addresses (e.g., device identifiers) that are sent to controller <NUM> for network address assignment.

<FIG> is a flowchart illustrating processing steps carried out by the system (e.g., the controller <NUM> and/or gateway <NUM>) for dynamic device discovery and address assignment over a network. The system allows a controlling device (e.g., a master pool/spa controller) to discover all subordinate/slave devices (e.g., pumps, lights, filters, heaters, sanitization equipment, gateways, etc.) present on a network (e.g. a half-duplex RS-<NUM> serial bus). This protocol provides the master with the ability to find all devices at initial power up, as well as find any devices that are added to the network at points in time after the initial discovery has completed. To facilitate device discovery, controller <NUM> transmits or broadcasts a message in the form of a device discovery request on the network at step <NUM>. Every un-configured slave network device <NUM>-<NUM> (e.g., a device without an assigned network address) responds to the device discovery request. The responses transmitted by the un-configured devices <NUM>-<NUM> are messages that can include device identifiers. At step <NUM>, controller <NUM> receives a device response including a device identifier from each of the un-configured devices <NUM>-<NUM>. The controller can maintain one or more tables to store network address information and device identifier information in non-transitory computer-readable media (e.g., device memory). At step <NUM>, controller <NUM> updates two tables, including a device mapping table (DMT) and a device descriptor table, in device memory to correlate a network address (described below) with the device identifier for each un-configured device <NUM>-<NUM> from which the controller receives a response. Then, in step <NUM>, controller <NUM> transmits the device network address assignment in a message to each of the responding devices (e.g., based on the correlation performed in step <NUM>). This transforms the particular un-configured devices that responded to the device discovery request to configured devices. After a device is configured with a network address, the device will thereafter no longer respond to a device discovery request issued by the controller. This configuration/enrollment process continues until all un-configured devices <NUM>-<NUM> that respond to the device discovery request receive a network address. Controller <NUM> can maintain the device mapping table that maps device identifiers to network addresses in non-volatile RAM (NVRAM). Storing the device mapping in NVRAM allows faster startup times as the mapping only needs verification as opposed to initial creation. In one embodiment, slave devices <NUM>-<NUM> do not save the network address in NVRAM to allow for reconfigured and reassigned network addresses on every power up, system reset, or local device reset.

The dynamic discovery process <NUM> allows slave smart components (SC), e.g. devices <NUM>-<NUM>, to be assigned a Network Address (NA) within a network (e.g., a pool/spa network). Discovery requests are addressed to the broadcast address, e.g. 0xFF, and responses are directed to the bus master address, e.g. 0x00. Each SC leaves the factory with a Unique Address (UA), e.g. device identifier, which is analogous to a MAC address, but is not reflective of a network address to be assigned by a controller in a network. In an exemplary embodiment, each device <NUM>-<NUM> (master and slave) on the bus <NUM> has a pre-programmed Unique Address (UA). For example, the UA is the device's serial number which is built into the device through a manufacturing process. One of the fields of the UA is a product code that defines the product type, and the other fields uniquely identify that particular device (e.g., a string of characters that can be used to distinguish the particular device from other devices of the same product type).

<FIG> shows an exemplary device packet <NUM> format. When a discovery request transmission is received by a device <NUM>-<NUM>, if un-configured (i.e. no network address assigned) a packet <NUM> is sent from the device <NUM>-<NUM> back to controller <NUM> that includes the unique address in discovery data <NUM> in a data portion <NUM> of the packet <NUM>. The Command/Response portion <NUM> of the packet <NUM> includes a header that provides further information as to what is included in the data portion <NUM> of the packet <NUM>.

<FIG> shows an exemplary discovery command table <NUM>. Depending on a value associated with the Command/Response portion <NUM> of the packet <NUM>, the packet <NUM> is defined based on from where it is being transmitted (i.e., from controller <NUM> for a request, or from a responding slave device <NUM>-<NUM>). <FIG> illustrate exemplary packets that can be transmitted in accordance with embodiments of the present disclosure that can include the commands shown in the table <NUM>.

Referring now to <FIG>, when the discovery request packet is sent from the controller <NUM>, the packet can include a command ("AUR Cmd") in the Command/Response portion <NUM> of a header <NUM> defined by, e.g., a value of 0x01, which corresponds to a time out command transmitted by the controller <NUM>. A time out value <NUM> is used to adjust the length of time that controller <NUM> will wait for responses before timing out. This byte is a value in tens of milliseconds, e.g., <NUM>-<NUM>. When a slave device <NUM>-<NUM> responds, the packet format would be as shown in <FIG> with header <NUM> (e.g., including a command value 0x011 corresponding to a response from a slave device) and discovery data <NUM> (e.g., including a UA of the device). UA bytes <NUM>-<NUM> in the discovery data <NUM> would then be used by the controller <NUM> to define the network address of the responding slave device <NUM>-<NUM>. Once controller <NUM> has sent a discovery response request, it will not respond during the time out period. It will only receive the discovery responses from devices <NUM>-<NUM> and store them in a list until timeout is reached. After the timeout period expires the controller <NUM> then proceeds to assign a network address to each of the un-configured devices discovered.

Alternatively, controller <NUM> can send a family-specific device discovery request using a command value of, e.g., 0x02, in the header of the packet, (e.g. temperature sensors only, heater only, pool lighting only, etc.) and by setting the UA product code byte <NUM> accordingly, as shown in <FIG>. The UA product code byte <NUM> describes the type of the device, e.g., temperature sensor, heater, pool/spa light, etc. All connected devices <NUM>-<NUM> compare this code to their own product code within the UA and respond to the controller <NUM> if there is a match. A packet transmitted by a device in response to a family-specific device discovery request is shown in <FIG>. If gateway <NUM> is installed, the gateway <NUM> will send its own local device discovery request to determine whether devices <NUM>, <NUM> are connected to its local ports. Further, gateway <NUM> will be the last device to be discovered with a directed discovery (family-specific) to allow time for gateway <NUM> to discover all devices that are connected locally on the downstream bus <NUM>. Each time gateway <NUM> is polled by controller <NUM>, a UA of one un-configured device will be returned. Controller <NUM> will continue to poll each gateway <NUM> installed in the network until no response is returned, signifying completion of device discovery by the gateway <NUM>.

Referring now to <FIG>, once controller <NUM> receives a response from a device <NUM>-<NUM>, the command assigning a network address to the responding device <NUM>-<NUM> is sent (e.g., given by a value of 0x03 in the header). DST UA Bytes <NUM>-<NUM> (<NUM>) address the assignment command to the desired device, and the NA byte <NUM> is assigned to the desired device via the packet shown in <FIG>. Additionally, <FIG> shows a response (AHNA), which returns (describes) the capabilities of the newly discovered device.

<FIG> shows a discovery communication process <NUM> conducted in accordance with the present invention between controller <NUM> (MSP), a gateway <NUM>, and two or more slave devices (indicated as SC1 and SC2 in <FIG>). Network addresses are assigned to devices connected to the gateway <NUM> last to allow each gateway <NUM> more time to gather locally-discovered devices. When a gateway <NUM> responds to a directed AUR/AUF request, it responds with the first device in its list. This response also contains a flag "more to send" to indicate to controller <NUM> that there are more devices to assign network addresses. Controller <NUM> continues to send directed requests to gateway <NUM> until the "more to send" flag is disabled.

<FIG> shows a dataflow <NUM> of a startup of an existing network system (i.e., after power interruption). Controller <NUM> ("MSP") already contains a saved structure of mapping in non-volatile memory, and it steps through the saved mapped network to poll existing network devices and listens for responses from each connected device. The first devices configured are gateways <NUM> to allow time for gateway polling of connected devices (e.g., "SC1" and "SC2"). If a previously connected device is not heard from, a directed command can be sent. A mapping table maintained by the master device is updated with any non-responsive devices as not connected to the network and a device discovery request is then sent to find any newly connected devices to the network.

When a system is powered-up which utilizes the dynamic discovery protocol described herein, the controlling master device (e.g., controller <NUM>) sends a discovery request packet to the broadcast address. All operational devices on the bus will receive this packet. Every unconfigured slave device (e.g., no assigned NA) will respond to the discovery request with its UA. In one embodiment, each slave uses a random backoff timer to reduce the number of collisions during the discovery period. As the master device receives a response, it assigns and transmits a NA configuration command to the UA of the responding (unconfigured) slave device. Only the slave device with the matching UA will accept the NA assignment. This slave is now considered configured and will no longer respond to discovery requests. As more slave devices enter the configured state, the number of collisions subsides. The discovery process continues until no more devices respond. At this time the network has settled and normal operation of the network will continue. In an exemplary embodiment, the master device is programmed to send a device discovery request upon startup, and at regular or periodic intervals as desired. In exemplary embodiments, the gateway cannot push newly discovered devices back to the master device without a discovery request from the master device.

<FIG> is a diagram showing hardware and software components of a controller system <NUM> capable of performing the processes discussed above. The system <NUM> includes a processing server, e.g., a computer, and the like, which can include a storage device <NUM>, a network interface <NUM>, a communications bus <NUM>, a central processing unit (CPU) <NUM>, e.g., a microprocessor, and the like, a random access memory (RAM) <NUM>, and one or more input devices <NUM>, e.g., a keyboard, a mouse, and the like. The processing server can also include a display, e.g., a liquid crystal display (LCD), a cathode ray tube (CRT), and the like. The storage device <NUM> can include any suitable, non-transitory computer-readable storage medium, e.g., a disk, non-volatile memory, read-only memory (ROM), erasable programmable ROM (EPROM), electrically-erasable programmable ROM (EEPROM), flash memory, field-programmable gate array (FPGA), and the like. The processing server can be, e.g., a networked computer system, a personal computer, a smart phone, a tablet, and the like.

The present invention can be embodied as a dynamic device discovery and address assignment software module and/or engine <NUM>, which can be embodied as computer-readable program code stored on the storage device <NUM> and executed by the CPU <NUM> using any suitable, high or low level computing language, such as, e.g., Java, C, C++, C#,. NET, and the like. The network interface <NUM> can include, e.g., an Ethernet network interface device, a wireless network interface device, any other suitable device which permits the processing server to communicate via the network, and the like. The CPU <NUM> can include any suitable single- or multiple-core microprocessor of any suitable architecture that is capable of implementing and/or running the dynamic device discovery and address assignment software <NUM>, e.g., an Intel processor, and the like. The random access memory <NUM> can include any suitable, high-speed, random access memory typical of most modern computers, such as, e.g., dynamic RAM (DRAM), and the like. A mapping table <NUM> can be stored in the storage device <NUM>.

Claim 1:
A pool or spa system (<NUM>) including a plurality of components operatively coupled via a communications network supporting dynamic device discovery, the system comprising
a pool or spa;
a plurality of pool or spa slave devices (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>), each of the plurality of pool or spa slave devices being configured to perform one or more operations with respect to the pool or spa, each of the plurality of pool or spa slave devices being un-configured and having a unique device identifier; and
a master controller operatively coupled to the plurality of pool or spa slave devices to form a network, the master controller being programmed to assign each of the pool or spa slave devices a network address based on the unique device identifier of each of the plurality of pool or spa slave devices and in response to bidirectional communication between the master controller and the plurality of pool or spa slave devices to configure the plurality of pool or spa slave devices and enable addressed communication between the master controller and the plurality of pool or spa slave devices;
wherein the system is configured such that, in response to a device discovery request transmitted from the master controller to the plurality of pool or spa slave devices, a responding pool or spa slave device transmits a response packet to the master controller describing at least one pool or spa device capability of the responding pool or spa slave device, and
wherein the unique device identifier is configured to be transmitted from the responding pool or spa slave device to the master controller as a plurality of data fields within the response packet, said plurality of data fields comprising a first data field and a second data field, said first data field being a pool or spa device type identifier which identifies a type of the responding pool or spa slave device, and said second data field distinguishing the responding pool or spa slave device from other pool or spa slave devices of the same type.