ASSIGNMENT OF ROUTING DEVICES IN A MESH NETWORK
Patent Information
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- LUTRON TECHNOLOGY COMPANY LLC
- Filing Date
- 2022-11-07
- Publication Date
- 2026-05-19
AI Technical Summary
Existing network formation in mesh networks for load control systems in user environments, such as residential or office buildings, experiences delays and inefficiencies due to network partitions and message collisions during device connection, leading to suboptimal communication and control of electrical loads.
A system that identifies backup leader devices based on network communication quality and implements a routing optimization mode to dynamically adjust device roles and connections, using a system controller to process optimization data and assign optimal routing devices to minimize network disruptions and improve communication efficiency.
The solution enhances network stability and reduces installation delays by ensuring seamless communication between control devices, optimizing network connections, and maintaining network integrity even in the absence of primary leader devices.
Smart Images

Figure MX433888B0
Abstract
Description
This application claims priority over U.S. patent application no. 263 / 022,169, filed on May 8, 2020, and U.S. provisional patent application no. 263 / 117,759, filed on November 24, 2020. BACKGROUND A user environment, such as a residence or office building, can be configured to utilize various types of load control systems. A lighting control system can be used to manage the lighting loads that provide artificial light in the user environment. A control system for motorized window treatments can be used to manage the natural light entering the user environment. A heating, ventilation, and air conditioning (HVAC) system can be used to manage the temperature in the user environment. Each load control system may include various control devices, including input devices and load control devices. Control devices may receive messages, which may include load control instructions, to control an electrical load from one or more input devices. Control devices may be capable of directly controlling an electrical load. Input devices may be capable of indirectly controlling the electrical load through the load control device. Examples of load control devices may include lighting control devices (e.g., a dimmer, an electronic switch, a ballast, or a light-emitting diode (LED) driver), motorized window treatments, temperature control devices (e.g., a thermostat), plug-in load control devices, and / or similar devices.Examples of input devices may include remote control devices, occupancy sensors, sunlight sensors, brightness sensors, color temperature sensors, temperature sensors, and / or similar devices. Remote control devices may receive information from the user to perform load control. COMPENDIUM A load control system may include control devices configured to communicate over a network. The network may include routing devices (for example, a leader device and other routing devices) to enable message communication across the network. A control device may function as a routing device within the network. The control device may receive advertising messages from the leader device. Based on the reception of these advertising messages from the leader device, the control device can determine the network status. During network formation, the network may comprise one or more network partitions. Each network partition in the load control system may include a single leading device capable of coordinating certain network functions. A single control device can assume the role of leading device in a network partition. When the leading device fails to communicate advertising messages to other control devices functioning as routing devices in the network within a predefined time period, the routing devices may disconnect from the network partition and initiate network reformation. To avoid delays that can be associated with network reconfiguration, one or more routing devices can be designated as backup leader devices to assume operation as the leader device in a network partition if the current leader device fails. These backup leader devices can be designated based on criteria specific to the backup leader. For example, a routing device might identify itself as a backup leader based on the link quality of a network communication link between the routing device and the current leader device, and / or its routing identifier or other unique identifier. A routing device that identifies itself as a backup leader device in the network can decide to begin operating as the network leader device when it does not receive an advertising message from the leader device after a first threshold period. This first threshold period can be a timeframe within which the routing device is expected to receive one or more advertising messages. This first threshold period can be shorter than a second threshold period after which other control devices in the network may begin to disconnect. The backup leader device's ability to detect that the leader device is not transmitting advertising messages and begin operating as the network leader device before the other devices disconnect can preserve the network. The quality of a control device's network communication links with other devices can be considered when assigning a function to the control device. For example, networks can enter a routing optimization mode to optimize the placement of routing devices within the network (for example, to adjust the control devices assigned the role of a routing device). A user can initiate a routing optimization mode through an application running on a network device. Alternatively, the router's optimization mode can be activated periodically or by one of the control devices on the network that detects a change in the quality of network communications. During a router optimization mode, the control devices that communicate with MA / t / ZUZÓ / UUΊ fóó across the network can transmit (for example, via unicast, multicast, and / or broadcast) one or more optimization messages. Control devices receiving these optimization messages can measure and store a communication quality metric for the optimization message along with an indication of the device that transmitted the optimization message (for example, optimization data). This optimization data can identify the number and quality of network communication links that a control device has established on the network. Each control device can then transmit its respective optimization data to another device (for example, a system controller) that processes the optimization data. The system controller, or another control device on the network, can process and analyze optimization data to generate optimized network data. This optimized network data might include a list of routers, which could, for example, indicate one or more control devices to be assigned the routing device role on the network. For instance, the optimized network data can be used to determine the optimal role for a control device (e.g., to determine the optimal locations for routing devices on the network). The system controller can also process and analyze optimization data to determine the number of connections each control device has above a defined quality threshold (e.g., connections with a communication quality metric above a defined threshold).Control devices that have a higher number of connections above the defined quality threshold can be assigned as routing devices in the network. To generate optimized network data, the system controller can create a preferred connection list for each control device communicating across the network. This preferred connection list might include, for example, connections for each control device that have a communication quality metric above a preferred target quality threshold. These connections could represent potential link points between a given control device and other control devices communicating across the network. Based on this preferred connection list, the system controller can then select one or more control devices to include in the router list. The system controller can identify that the preferred connection list for a first control device has the largest number of devices among the preferred connection lists for the plurality of control devices. The system controller can then select the first control device to be included in the router list and assigned the routing role, for example, based on the first control device having the largest preferred connection list. Alternatively, the system controller can select a lead device from among the control devices to include in the router list. For example, the control device might be selected as the lead device because it has the largest number of devices in its preferred connection list. The system controller can initialize each control device communicating across the network as an unconnected device in a virtual network. After selecting a given control device to include in the router list, the system controller can add that control device and each control device in its preferred connection list to a connected list. For example, the connected list might list devices connected in the virtual network. The system controller can continue adding control devices to the connected list (e.g., the virtual network) until no more control devices remain. The system controller can generate a secondary connection list for one or more of the control devices communicating over the network. For example, the secondary connection list for a given control device might include connections to the device that have a communication quality metric above a secondary target quality threshold. The secondary target quality threshold might be lower than the preferred target quality threshold. The system controller can further select control devices to include in the router list based on the number of unconnected devices in the secondary connection list for those control devices. The system controller can generate a list of tertiary connections for one or more of the control devices communicating over the network. This list can include connections for each control device that has a communication quality metric above a tertiary target quality threshold. For example, the tertiary target quality threshold might be lower than the secondary target quality threshold. The system controller can further select control devices to include in the router list based on the number of unconnected devices in the secondary connection list for those control devices. BRIEF DESCRIPTION OF THE FIGURES FIG. 1A is a diagram of an example of a load control system. FIG. 1B is a block diagram that illustrates an example of a device capable of processing and / or communicating in a load control system, such as the load control system in FIG. ML / E / ZuZo / uuZo fóó 1A. FIG. 1C is a block diagram illustrating an example of a load control device capable of operating in a load control system, such as the load control system in FIG. 1A. FIG. 2A is a diagram of an example network that can allow communication between devices in the load control system of FIG. 1A. FIG. 2B is an example network diagram or network partitions (e.g., networks or subnets) that allow communication between devices in the load control system of FIG. 1A. FIG. 20 and 2D are diagrams of another example of a network that allows communication between devices in the load control system of FIG. 1A. FIG. 2E is a diagram of another example network illustrating the cost and network overhead associated with communication between devices in the load control system of FIG. 1A. FIG. 2F is a table that illustrates examples of link costs that may correspond to different link qualities. FIG. 3 is a sequence flowchart that illustrates examples of messages communicated between devices on a network. FIG. 4 is a flowchart of an example procedure for collecting optimization data to optimize the selection of routing devices in a network. Figures 5A and 5B are flowcharts of an example procedure for processing optimization data in order to optimize the selection of routing devices in a network. FIG. 5C shows examples of preferred connection lists that can be generated using optimization data. FIG. 6 is a flowchart of an example procedure that can be performed on a control device to determine its function in a network. DETAILED DESCRIPTION Figure 1A is a diagram of an example of a load control system 100 for controlling the amount of power supplied from an alternating current (AC) power source (not shown) to one or more electrical loads. The load control system 100 can be installed in a load control environment 102. The load control environment 102 can include a space in a residential or commercial building. For example, the load control system 100 can be installed in one or more rooms on one or more floors of the building. The load control system 100 may comprise a plurality of control devices. These control devices may include load control devices configured to control one or more electrical loads within the load control environment 102 (also referred to as the user environment). For example, the load control devices may control one or more electrical loads in response to input from one or more input devices or other devices within the load control system 100. The load control devices in load control system 100 may include lighting control devices. For example, load control system 100 may include lighting control devices 120 to control lighting loads 122 in a corresponding lighting fixture 124. The lighting control devices 120 may comprise light-emitting diode (LED) drivers, and the lighting loads 122 may comprise LED light sources. Although each lighting fixture 124 is shown with a single lighting load 122, each lighting fixture may comprise one or more individual light sources (e.g., lamps and / or LED emitters) that may be controlled individually and / or in unison by the respective lighting control device.Although an LED driver is provided as an example lighting control device, other types of lighting control devices can be implemented as load control devices in load control system 100. For example, load control system 100 may comprise dimmer switches, electronic dimming ballasts for controlling fluorescent lamps, or other lighting control devices for controlling the corresponding lighting loads. Lighting control device 120 can be configured to directly control a quantity of power supplied to lighting load 122. Lighting control device 120 can also be configured to receive (for example, via wired or wireless communications) messages through radio frequency (RF) signals 108, 109 and to control lighting load 122 in response to the received messages.It will be recognized that the lighting control device 120 and the lighting load 122 may be integrated and thus be part of the same arrangement or bulb, for example, or they may be separate. The load control devices in the load control system 100 may comprise one or more devices capable of receiving RF signals 108 (e.g., wireless signals) to perform load control. For example, the load control system may include a loudspeaker 146 (e.g., part of an audio / visual or intercom system) capable of generating audible sounds, such as alarms, music, intercom functionality, etc., in response to RF signals 108. The load control devices in the load control system 100 may comprise one or more sunlight control devices, for example, motorized window treatments 150, such as motorized cellular shades, to control the amount of sunlight entering the load control environment 102. Each motorized window treatment 150 may comprise a curtain fabric 152 that hangs from an overhead rail 154 in front of a respective window 104. Each motorized curtain 150 may further comprise a motor drive unit (not illustrated) located within the overhead rail 154 for raising and lowering the curtain fabric 152 to control the amount of natural light entering the load control environment 102.The motor drive units of the motorized window treatments 150 can be configured to receive messages via RF signals 108 and adjust the fabric position of the respective motorized window treatment 152 in response to the received messages. For example, the motorized window treatments can be battery-operated. The load control system 100 can comprise other types of daylight control devices, such as, for example, a cellular shade, a curtain, a Roman shade, a Venetian blind, a roller blind, a pleated shade, a tensioned roller blind system, an electrochromic or smart window, and / or other suitable daylight control devices.Examples of battery-powered motorized curtains are described in greater detail in U.S. Patent No. 8,950,461, issued on February 10, 2015, entitled MOTORIZED WINDOW TREATMENT, and U.S. Patent No. 9,488,000, issued on November 8, 2016, entitled INTEGRATED ACCESSIBLE BATTERY COMPARTMENT FOR MOTORIZED WINDOW TREATMENT, the descriptions of which are incorporated herein in their entirety by reference. The load control devices in the load control system 100 may comprise a plug-in load control device 140 for controlling a plug-in electrical load, for example, a plug-in lighting load (such as a floor lamp 142 or a table lamp) and / or an appliance (such as a television or a computer monitor). For example, the floor lamp 142 may be plugged into the plug-in load control device 140. The plug-in load control device 140 may be connected to a standard electrical socket 144 and thus connected in series between the AC power supply and the plug-in lighting load. The plug-in load control device 140 may be configured to receive messages via RF signals 108 and to switch the floor lamp 142 on and off or adjust its intensity in response to the received messages. The load control devices in load control system 100 may comprise one or more temperature control devices, for example, a thermostat 160 for controlling an ambient temperature in load control environment 102. The thermostat 160 may be coupled to a heating, ventilation, and air conditioning (HVAC) system 162 via a control link 161 (for example, an analog control link or a wired digital communication link). The thermostat 160 may be configured to wirelessly communicate messages with an HVAC system controller 162. The thermostat 160 may comprise a temperature sensor for measuring the ambient temperature of load control environment 102 and may control the HVAC system 162 to adjust the room temperature to a setpoint temperature.The load control system 100 may include one or more wireless temperature sensors (not shown) located in the load control environment 102 to measure ambient temperatures. The HVAC system 162 may be configured to turn a compressor on and off to cool the load control environment 102 and to turn a heating source on and off to heat the rooms in response to control signals received from thermostat 160. The HVAC system 162 may be configured to turn an HVAC system fan on and off in response to control signals received from thermostat 160. Thermostat 160 and / or the HVAC system 162 may be configured to control one or more controllable dampers to regulate airflow in the load control environment 102.The 160 thermostat can be configured to receive messages via RF 108 signals and adjust heating, ventilation, and cooling in response to the messages received. The load control system 100 may comprise one or more of other types of load control devices, such as, for example, a screw-in luminaire including a dimmer circuit and an incandescent or halogen lamp; a screw-in luminaire including a ballast and a compact fluorescent lamp; a screw-in luminaire including an LED driver and an LED light source; an electronic switch, controllable circuit breaker, or other switching device for turning an appliance on and off; a controllable electrical receptacle or controllable power strip for controlling one or more plug-in loads; a motor control unit for controlling a motor load, such as a ceiling fan or exhaust fan; a projection screen; motorized interior or exterior blinds; a thermostat for a heating and / or cooling system;A temperature control device for controlling a reference temperature of an HVAC system; an air conditioner; a compressor; an electric baseboard heater controller; a controllable damper; a variable air volume controller; a fresh air intake controller; a ventilation controller; hydraulic valves for use with radiators and radiant heating systems; a humidity control unit; a humidifier; a dehumidifier; a water heater; a boiler controller; a pool pump; a refrigerator; a freezer; a television or computer monitor; a video camera; an audio system or amplifier; an elevator; a power supply; a generator; an electrical charger, such as an electric vehicle charger; and / or an alternative energy controller. The load control system 100 may comprise one or more input devices capable of receiving an input event to control one or more load control devices in the load control system 100. The input devices and the load control devices may be collectively referred to as control devices in the load control system. 100. Input devices in the load control system 100 may comprise one or more remote control devices, such as a remote control device 170. The remote control device may be battery-operated. The remote control device 170 may be configured to transmit messages via RF signals 108 to one or more additional devices in the load control system 100 in response to an input event, such as the pressing of one or more buttons or the rotation of a rotary knob on the remote control device 170. For example, the remote control device 170 may transmit messages to the lighting control device 120, the plug-in load control device 140, the motorized window treatments 150, and / or the temperature control device 160 via RF signals 108 in response to the pressing of one or more buttons located on it.The remote control device 170 can also communicate with other devices in the load control system 100 via a wired communication link. In response to an input event on the remote control device 170, a device to which the remote control device 170 is connected can be activated to transmit messages to one or more devices in the load control system 100. The remote control device 170 may include a keypad. Alternatively, the remote control device 170 may include a rotary knob configured to transmit messages to one or more devices in response to rotation of the rotary knob (e.g., rotation a predefined distance or for a predefined period of time). The remote control device 170 can be mounted on a structure, such as a wall, a toggle switch actuator, or a pedestal for placement on a horizontal surface.In another example, the remote control device 170 may be portable. The remote control device 170 may provide feedback (e.g., visual feedback) to a user of the remote control device 170 on a visual indicator, such as a status indicator. The status indicator may be illuminated by one or more light-emitting diodes (LEDs) to provide feedback. The status indicator may provide different types of feedback. The feedback may include feedback indicating user actuations or other user interface events, the status of electrical loads controlled by the remote control device 170, and / or the status of load control devices controlled by the remote control device 170.Feedback can be displayed in response to a user interface event and / or in response to received messages indicating the status of load control devices and / or electrical loads. Examples of battery-powered remote control devices are described in greater detail in U.S. Patent Commonly Assigned No. 8,330,638, filed December 11, 2012, entitled WIRELESS BATTERY-POWERED REMOTE CONTROL HAVING MULTIPLE MOUNTING MEANS, and U.S. Patent Application Publication No. 2012 / 0286940, published November 15, 2012, entitled CONTROL DEVICE HAVING A NIGHTLIGHT, the descriptions of which are incorporated in full by reference. The input devices of the load control system 100 may comprise one or more sensing devices, such as a sensing device 141. The sensing device 141 may be configured to transmit messages via RF signals 108 to one or more devices in the load control system 100 in response to an input event, such as a sensor measurement event. The sensing device 141 may also, or alternatively, be configured to transmit messages via a wired communication link to one or more additional devices in the load control system 100 in response to an input event, such as a sensor measurement event. The sensing device 141 may function as an ambient light sensor or a sunlight sensor and may be capable of performing a sensor measurement event by measuring the total light intensity in the space surrounding the sensing device 141.The sensing device 141 can transmit messages that include the measured light level or control instructions in response to the measured light level by means of RF signals 108. Examples of RF load control systems having daylight sensors are described in more detail in U.S. Patent Commonly Assigned No. 8,410,706, filed April 2, 2013, entitled METHOD OF CALIBRATING A DAYLIGHT SENSOR; and U.S. Patent No. 8,451,116, filed May 28, 2013, entitled WIRELESS BATTERY POWERED DAYLIGHT SENSOR, the descriptions of which are incorporated in full by reference. The detection device 141 can function as an occupancy sensor configured to detect occupancy and vacancy conditions in the load control environment 102. The detection device 141 can perform the sensor measurement event by measuring an occupancy or vacancy condition in response to the occupancy or vacancy, respectively, of the load control environment 102 by user 192. For example, the detection device 141 can comprise an infrared (IR) sensor capable of detecting the occupancy or vacancy condition in response to the presence or absence, respectively, of user 192. The detection device 141 can transmit messages that include occupancy or vacancy conditions, or control instructions generated in response to occupancy or vacancy conditions, via RF signals 108.Again, the 141 detection device can also, or alternatively, transmit messages that include occupancy or vacancy conditions, or control instructions generated in response to occupancy / vacancy conditions via a wired communication link. Examples of load control systems having occupancy and vacancy sensors are described in greater detail in U.S. Patent No. 28,228,184, issued July 24, 2012, entitled BATTERYPOWERED OCCUPANCY SENSOR, U.S. Patent No. 8,009,042, issued August 30, 2011, September 3, 2008, entitled RADIO-FREQUENCY LIGHTING CONTROL SYSTEM WITH OCCUPANCY SENSING, and U.S. Patent No. 8,199,010, issued June 12, 2012, entitled METHOD AND APPARATUS FOR CONFIGURING A WIRELESS SENSOR, the descriptions of which are incorporated in full by reference. The detection device 141 may function as a visible light sensor (for example, including a camera or other device capable of detecting visible light). The detection device 141 may be capable of performing the sensor measurement event by measuring a quantity of visible light within the load control environment 102. For example, the detection device 141 may comprise a visible light detection circuit that has an image recording circuit, such as a camera, and an image processing circuit. The image processing circuit may comprise a digital signal processor (DSP), a microprocessor, a programmable logic device (PLD), a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or any suitable processing device capable of processing images or visible light levels.The detection device 141 can be positioned facing the load control environment 102 to detect one or more environmental features within that environment. The image recording circuit of the detection device 141 can be configured to capture or record an image. This image recording circuit can then provide the captured image to the image processor. The image processor can be configured to process the image into one or more detected signals that are representative of the detected environmental features.The detected environmental characteristics can be interpreted from the signals detected by the control circuit of the sensing device 141, or the detected signals can be transmitted to one or more devices via RF signals 108, 109 (e.g., a computer in the load control environment) for interpretation. For example, the environmental characteristics interpreted from the detected signals may include the occurrence of motion, the amount of motion, the direction of motion, the speed of motion, the number of occupants counted, an occupancy condition, an unoccupied condition, a light intensity, a visible light color, a visible light color temperature, the amount of direct sunlight penetration, or another environmental characteristic in the load control environment 102.In another example, the sensing device 141 can provide a raw or processed (e.g., preprocessed) image to one or more devices (e.g., computer devices) in the load control system 100 for further processing. The sensing device 141 can function as a color temperature sensor when it detects the color temperature of visible light. Examples of load control systems having visible light sensors are described in greater detail in U.S. Patent No. 10,264,651, issued April 16, 2019, entitled "LOAD CONTROL SYSTEM HAVING A VISIBLE LIGHT SENSOR," and U.S. Patent Application Publication No. 22018 / 0167547, published June 14, 2018, entitled "CONFIGURATION OF A VISIBLE LIGHT SENSOR," the full descriptions of which are incorporated herein by reference. The sensing device 141 may be external to the lighting fixtures 124 (for example, fixed or attached to a ceiling or wall of the load control environment 102). The sensing device 141 may be positioned facing the load control environment 102 and may be capable of performing sensor measurement events within the load control environment 102. In one example, the sensing device 141 may be fixed or attached to a window 104 of the load control environment 102 and operate as a window sensor capable of performing sensor measurement events on the light entering the load control environment 102 through the window 104.For example, the detection device 141 may comprise an ambient light sensor capable of detecting when sunlight falls directly on the detection device 141, is reflected off the detection device 141, and / or is blocked by external means, such as clouds or a building, based on the measured light levels received by the detection device 141 from outside the window. The detection device 141 may send messages indicating the measured light level. Although illustrated as external to the lighting fixtures 124, one or more detection devices 141 may be mounted on one or more of the lighting fixtures 124 (for example, on a lower or outward-facing surface of the lighting fixture 124).For example, one or more sensing devices 141 can be electrically coupled to a control circuit or load control circuit of the load control devices 120 to perform control in response to sensor measurement events of the sensing devices 141. The 100 load control system may comprise other types of input devices, such as, for example, temperature sensors, humidity sensors, radiometers, cloud day sensors, shade sensors, pressure sensors, smoke detectors, carbon monoxide detectors, air quality sensors, motion sensors, security sensors, proximity sensors, accessory sensors, partition sensors, keypads, multi-zone control units, slider control units, kinetic or solar-powered remote controls, key fobs, cell phones, smartphones, tablets, personal digital assistants, personal computers, laptops, watches, audiovisual controls, security devices, and energy monitoring devices (for example, such as power meters, energy meters, utility submeters, and service rate meters). IVIA / E / ZUZJ / UUI public, etc.), central control transmitters, residential, commercial, or industrial controllers, and / or any combination thereof. Input devices and load control devices can be configured to communicate messages with each other over a communication link within the load control system 100. For example, input devices and load control devices may be able to communicate messages directly with each other via RF signals 108. The RF signals 108 can be transmitted using a proprietary RF protocol, such as the CLEAR CONNECT protocol (e.g., the CLEAR CONNECT TYPE A and / or CLEAR CONNECT TYPE X protocols). Alternatively, RF 108 signals can be transmitted using an RF protocol, such as a standard protocol, e.g., one from WIFI, cellular (e.g., 3G, 4G LTE, 5G NR or other cellular protocol), BLUETOOTH, BLUETOOTH LOW ENERGY (BLE), ZIGBEE, Z-WAVE, THREAD, KNX-RF, ENOCEAN RADIO, or a different protocol.In one example, input devices can transmit messages to load control devices via RF signals 108 that comprise input events (e.g., button presses, sensor measurement events, or other input events) or control instructions generated in response to input events to control the electrical loads managed by the load control devices. Although the communication links can be described as wireless communication links, wired communication links can be implemented similarly to enable the communications described in this document. In order for devices in the load control system 100 to recognize messages addressed to them and / or to which they can respond, the devices can be associated with each other by performing an association procedure. For example, for a load control device to respond to messages from an input device, the input device can first be associated with the load control device. As an example of an association procedure, devices can be put into association mode to share a unique identifier for association with and / or storage on other devices in the load control system 100. For example, an input device and a load control device can be put into association mode by the user 192 by pressing a button on the input device and / or the load control device.Activating the button on the input device and / or the load control device may place the input device and / or the load control device into association mode due to their association. In association mode, the input device may transmit one or more association messages to the load control device (directly or through one or more devices, as described in this document). The association message from the input device may include a unique identifier for the input device. The load control device may locally store the input device's unique identifier in association information, enabling it to recognize messages (e.g., subsequent messages) from the input device that may include load control instructions or commands.The association information stored in the load control device can include the unique identifiers of the devices with which the load control device is associated. The load control device can be configured to respond to messages from the related input device by controlling a corresponding electrical load according to the load control instructions received in the messages. The input device can also store the unique identifier of the load control device with which it is associated in the association information stored locally within it. A similar association procedure can be implemented among other devices in the 100 load control system to enable each device to communicate messages with associated devices.This is just one example of how devices can communicate and partner with each other, and other examples are possible. According to another example, one or more devices may receive system configuration data (for example, or subsequent updates to the system configuration data) that is loaded onto the devices and specifies the association information, which includes the unique identifiers of the devices to be associated. The system configuration data may comprise a load control data set that defines the devices and the operating configuration of the load control system 100. The system configuration data may include information about the devices in the user environment 102 and / or the load control system 100. The system configuration data may include association information that indicates defined associations between devices in the load control system 100. The association information may be updated using any of the association procedures described in this document.One or more intermediary devices may also maintain association information, including the unique identifiers that define the associations of other devices within the load control system 100. For example, input devices and load control devices may communicate over a communication link within the load control system 100 through one or more intermediary devices, such as routing devices or other devices on a network. Intermediary devices may include input devices, load control devices, a central processing device, or another intermediary device capable of enabling communication between devices within the load control system.The association information maintained on intermediary devices may include the unique identifiers of devices that are associated with each other to identify and / or enable message communication between devices in the Load Control System 100. For example, an intermediary device may identify the unique identifiers transmitted in association messages between devices during the association procedure and store these unique device identifiers as an association in the association information. Intermediary devices may use this association information to monitor and / or route communications on a communication link between devices in the Load Control System 100.In another example, association information from other devices can be loaded into the intermediary device and / or communicated from the intermediary device to the other devices to be stored locally in it (e.g., in input devices and / or load control devices). The load control system 100 may include a system controller 110. The system controller 100 may function as an intermediary device, as described in this document. For example, the system controller 110 may function as a central processing device for one or more devices in the load control system 100. The system controller 110 may function to communicate messages to and from the control devices (for example, input devices and load control devices). For example, the system controller 110 may be configured to receive messages from input devices and transmit messages to the load control devices in response to messages received from the input devices. The system controller 110 may route messages based on association information stored within it.Input devices, load control devices, and the 110 system controller can be configured to transmit and receive RF signals 108 and / or via a wired communication link. The 110 system controller can connect to one or more networks, such as a wired or wireless local area network (LAN), for example, to access the Internet. The 110 system controller can connect wirelessly to networks using one or more wireless protocols. The 110 system controller can connect to networks via a wired communication link, such as a network communication bus (for example, an Ethernet communication link). The system controller 110 can be configured to communicate over the network with one or more computing devices, for example, a mobile device 190, such as a personal computing device and / or a portable wireless device. The mobile device 190 can be located on an occupant 192, for example, attached to the occupant's body or clothing, or held by the occupant. The mobile device 190 can be characterized by a unique identifier (for example, a serial number or a memory address) that uniquely identifies the mobile device 190 and, therefore, the occupant 192. Examples of personal computing devices can include a smartphone, laptop computer, and / or tablet. Examples of portable wireless devices can include an activity tracker, smartwatch, smart clothing, and / or smart glasses.In addition, the 110 system controller can be configured to communicate over the network with one or more other control systems (e.g., a building management system, a security system, etc.). Mobile device 190 can be configured to transmit messages to system controller 110, for example, in one or more Internet Protocol packets. For instance, mobile device 190 can be configured to transmit messages to system controller 110 over the LAN and / or the Internet. Mobile device 190 can be configured to transmit messages over the Internet to an external service, and then system controller 110 can receive the messages. Mobile device 190 can transmit and receive RF signals 109. The RF signals 109 can be of the same signal type and / or transmitted using the same protocol as the RF signals 108. Alternatively or additionally, mobile device 190 can be configured to transmit RF signals according to another signal type and / or protocol.The Load Control System 100 may comprise other types of network-connected computing devices, such as a desktop personal computer (PC), a television with wireless communication capability, or any other suitable Internet Protocol-enabled device. Examples of load control systems that function to communicate with mobile and / or computing devices on a network are described in greater detail in Joint U.S. Patent No. 2013 / 0030589, issued January 31, 2013, entitled LOAD CONTROL DEVICE HAVING INTERNET CONNECTIVITY, the full description of which is incorporated herein by reference. The operation of the load control system 100 can be programmed and configured, for example, using the mobile device 190 or another computing device (for example, when the mobile device is a personal computing device). The mobile device 190 can run graphical user interface (GUI) configuration software to allow a user 192 to program how the load control system 100 will operate. For example, the configuration software can run as a PC application or a web interface. The configuration software and / or the system controller 110 (for example, by means of instructions from the configuration software) can generate the system configuration data, which may include the load control data set that defines the operation of the load control system 100.For example, the load control dataset may include information regarding the operating settings of different load control devices within the load control system (e.g., lighting control device 120, plug-in load control device 140, motorized window treatments 150, and / or thermostat 160). The load control dataset may also include information on how the load control devices respond to inputs received from input devices.Examples of configuration procedures for load control systems are described in greater detail in Joint U.S. Patent No. 7,391,297, issued June 24, 2008, entitled HANDHELD PROGRAMMER FOR A LIGHTING CONTROL SYSTEM; U.S. Patent Application Publication No. 2008 / 0092075, issued April 17, 2008, entitled METHOD OF BUILDING A DATABASE OF A LIGHTING CONTROL SYSTEM; and U.S. Patent Application Publication No. 2014 / 0265568, issued September 18, 2014, entitled COMMISSIONING LOAD CONTROL SYSTEMS. The load control system 100 may also include a network configuration device 111. The network configuration device 111 can be configured to communicate over the network through which the control devices of the load control system 100 communicate with each other. The network configuration device 111 can be configured to manage or monitor the network over which the control devices communicate. For example, the network configuration device 111 can be configured to assign roles to the control devices on the network during initial configuration and commissioning or during an optimization procedure to optimize network communications, as described later in this document. The network configuration device 111 can be a temporary device of the load control system 100.For example, network configuration device 111 can be temporarily joined to the network of load control system 100 and then removed from the network of load control system 100 (for example, after performing one or more of the procedures described in this document). Furthermore, network configuration device 111 can be physically installed in load control system 100, or it can be an external device that accesses load control system 100 via the internet and / or an external network or cloud. As described herein, network configuration device 111 can be a distinct device added to the network or a function assigned to a given device within load control system 100. The network configuration device 111 can be configured to perform one or more of the network optimization procedures described later in this document. For example, the network configuration device 111 can be added to and / or installed in the load control system 100 to perform one or more of the network optimization procedures described herein, which may include joining and / or communicating across the network. The network configuration device 111 can then be removed and / or uninstalled from the load control system, for example, after the network optimization procedure is completed. In a situation where the network configuration device can access the load control system 100 via the internet or an external cloud, the network configuration device 111 can remotely receive information that can be used to perform the network optimization procedures described herein. Figure 1B is a block diagram illustrating an example of a device 130 capable of processing and / or communicating in a load control system, such as the load control system 100 in Figure 1A. In this example, the device 130 can be a control device capable of transmitting or receiving messages. The control device can be an input device, such as a sensing device 141 (e.g., an occupancy sensor or other sensing device), the remote control device 170, or another input device capable of transmitting messages to load control devices or other devices in the load control system 100. The device 130 can also be a computing device, such as the mobile device 190, the system controller 110, the network configuration device 111, or another computing device in the load control system 100. Device 130 may include a control circuit 131 for controlling the functionality of Device 130. The control circuit 131 may include one or more general-purpose processors, dedicated processors, conventional processors, digital signal processors (DSPs), microprocessors, integrated circuits, a programmable logic device (PLD), application-specific integrated circuits (ASICs), or the like. The control circuit 131 may perform signal encoding, data processing, image processing, power control, input / output processing, or any other functionality that enables Device 131 to operate as one of the devices in the load control system (e.g., load control system 100) described herein. The control circuit 131 can be communicatively coupled to a memory 132 to store information in and / or retrieve information from memory 132. Memory 132 may comprise a computer-readable storage medium or a machine-readable storage medium that maintains a device data set of associated device identifiers, network information, and / or computer-executable instructions to perform the functions described herein. For example, memory 132 may comprise computer-executable instructions or machine-readable instructions that include one or more parts of an optimization procedure as described herein to optimize communications on a network.Control circuit 131 can access instructions from memory 132 in order to execute them, causing control circuit 131 to function as described herein, or to operate one or more devices as described herein. Memory 132 may include non-removable and / or removable memory. Non-removable memory may include random-access memory (RAM), read-only memory (ROM), a hard disk, or any other type of non-removable memory storage. Removable memory may include a subscriber identity module (SIM) card, a memory card, or any other type of removable memory. Memory 132 may be implemented as an external integrated circuit (IC) or as an internal circuit of control circuit 131. The device 130 may include one or more communication circuits 134 that communicate with the control circuit 131 to send and / or receive information as described herein. The communication circuit 134 may perform wireless and / or wired communication. The communication circuit 134 may be a wired communication circuit capable of communicating over a wired communication link. The wired communication link may include an Ethernet communication link, an RS-485 serial communication link, a 0-10 volt analog link, a pulse-width modulated (PWM) control link, a digital addressable lighting interface (DALI) digital communication link, and / or another wired communication link.Communication circuit 134 can be configured to communicate over power lines (for example, the power lines from which device 130 receives power) using a power line carrier (PLC) communication technique. Communication circuit 134 can also be a wireless communication circuit that includes one or more RF or infrared (IR) transmitters, receivers, transceivers, or other communication circuits capable of wireless communication. Although only one communication circuit 134 can be illustrated, multiple communication circuits can be implemented in the device 130. The device 130 can include one communication circuit configured to communicate over one or more wired and / or wireless communication networks and / or protocols, and at least one other communication circuit configured to communicate over one or more wired and / or wireless communication networks and / or protocols. For example, a first communication circuit can be configured to communicate over a wired or wireless communication link, while another communication circuit can communicate over a different wired or wireless communication link.The first communication circuit can be configured to communicate via a first wireless communication link (e.g., a wireless network communication link) using a first wireless protocol (e.g., a wireless network communication protocol such as CLEAR CONNECT (e.g., CLEAR CONNECT A and / or CLEAR CONNECT X) and / or THREAD protocols), and the second communication circuit can be configured to communicate via a second wireless communication link (e.g., a direct or short-range wireless communication link) using a second wireless protocol (e.g., a short-range wireless communication protocol such as BLUETOOTH and / or BLUETOOTH LOW ENERGY (BLE) protocols). One of the communication circuits 134 may comprise a transmitting and / or receiving beacon circuit capable of transmitting and / or receiving beacon messages via a short-range RF signal. The control circuit 131 may communicate with the transmitting beacon circuit (e.g., a short-range communication circuit) to transmit beacon messages. The transmitting beacon circuit may communicate beacon messages via RF communication signals, for example. The transmitting beacon circuit may be a unidirectional communication circuit (e.g., the transmitting beacon circuit is configured to transmit beacon messages) or a bidirectional communication circuit capable of receiving information on the same network and / or protocol in which the beacon messages are transmitted (e.g., the transmitting beacon circuit is configured to both transmit and receive beacon messages).The information received in the beacon's transmission circuit can be provided to control circuit 131. The control circuit 131 can communicate with one or more input circuits 133 from which it can receive inputs. The input circuits 133 can be included in a user interface to receive inputs from the user. For example, the input circuits 133 can include an actuator (e.g., a momentary switch that can be activated by one or more physical buttons) that can be activated by a user to communicate the user's input or selections to the control circuit 131. In response to activation of the actuator, the control circuit 131 can enter an association mode, transmit association messages from the control device 130 through the communication circuits 134, and / or receive other information (e.g., control instructions to perform control of an electrical load).In response to an activation of the trigger, control can be exercised by transmitting control instructions that indicate activation in the user interface and / or control instructions generated in response to the activation. The trigger may include a touch-sensitive surface, such as a capacitive touch surface, resistive touch surface, inductive touch surface, surface acoustic wave (SAW) touch surface, infrared touch surface, acoustic pulse touch surface, or other touch-sensitive surface that is configured to receive inputs (e.g., touch activation / inputs), such as point actions or gestures from a user.The control circuit 131 of device 130 can enter association mode, transmit an association message, transmit control instructions, or perform other functionality in response to user activation or input on the touch-sensitive surface. Input circuits 133 may include a sensing circuit (e.g., a sensor). The sensing circuit may be an occupant detection circuit, a temperature detection circuit, a color detection circuit (e.g., color temperature), a visible light detection circuit (e.g., a camera), a daylight detection circuit, an ambient light detection circuit, or another sensing circuit for receiving an input (e.g., detecting an environmental feature in the vicinity of device 130). Control circuit 131 may receive information from one or more input circuits 133 and process the information to perform functions as described herein. The control circuit 131 can communicate with one or more output sources 135. The output sources 135 can include one or more light sources (e.g., LEDs) to provide indications (e.g., feedback) to a user. The output sources 135 can include a display (e.g., a visible screen) to provide information (e.g., feedback) to a user. The control circuit 131 and / or the display can generate a software-generated graphical user interface (GUI) for display on the device 130 (e.g., on the screen of the device 130). The user interface of device 130 can combine features of input circuits 133 and output sources 135. For example, the user interface can have buttons that activate the triggers of input circuits 133 and can have indicators (e.g., visible indicators) that can be illuminated by the light sources of output sources 135. In another example, the display and control circuit 131 can be in two-way communication, as the display can show information to the user and includes a touchscreen capable of receiving input from a user. The input received through the touchscreen can be provided to the control circuit 131 to perform functions or control operations. Each of the hardware circuits within device 130 can be powered by a power supply 136. The power supply 136 may include a power supply configured to receive power from an alternating current (AC) or direct current (DC) power supply, for example. In addition, the power supply 136 may comprise one or more batteries. The power supply 136 produces a Vcc voltage supply to power the hardware within device 130. Figure 1C is a block diagram illustrating an example of load control device 180. Load control device 180 may be a lighting control device (e.g., lighting control device 120), a motorized window treatment (e.g., motorized window treatments 150), a plug-in load control device (e.g., plug-in load control device 140), a temperature control device (e.g., temperature control device 160), a dimmer, an electronic switch, an electronic lamp ballast, and / or another load control device. Load control device 180 may include a control circuit 181 for controlling the functionality of load control device 180.The control circuit 181 may include one or more general-purpose processors, dedicated processors, conventional processors, digital signal processors (DSPs), microprocessors, integrated circuits, a programmable logic device (PLD), application-specific integrated circuits (ASICs), or similar components. The control circuit 181 may perform signal encoding, signal processing, image processing, power control, input / output processing, or any other functionality that enables the load control device 180 to act as one of the load control system devices (e.g., load control system 100) described herein. The load control device 180 may include a load control circuit 185 that can be electrically coupled in series between a power supply 187 (for example, an AC power supply and / or a DC power supply) and an electrical load 188. The control circuit 181 can be configured to control the load control circuit 185 to control the electrical load 188, for example, in response to received instructions. The electrical load 188 can include a lighting load, a motor load (for example, for a ceiling fan and / or exhaust fan), an electric motor for controlling a motorized window treatment, a component of a heating, ventilation, and cooling (HVAC) system, a loudspeaker, or any other type of electrical load. The control circuit 181 can be communicatively coupled to a memory 182 to store information in and / or retrieve information from memory 182. Memory 182 may comprise a computer-readable storage medium or a machine-readable storage medium that maintains a device data set of associated device identifiers, network information, and / or computer-executable instructions to perform the functions described herein. For example, memory 182 may comprise computer-executable instructions or machine-readable instructions that include one or more parts of an optimization procedure as described herein to optimize communications on a network.Control circuit 181 can access instructions from memory 182 in order to execute them, causing control circuit 181 to function as described herein, or to operate one or more devices as described herein. Memory 182 may include non-removable memory and / or removable memory. Non-removable memory may include random-access memory (RAM), read-only memory (ROM), a hard disk, or any other type of non-removable memory storage. Removable memory may include a subscriber identity module (SIM) card, a memory card, or any other type of removable memory. Memory 182 may be implemented as an external integrated circuit (IC) or as an internal circuit of control circuit 181. The load control device 180 may include one or more communication circuits 184 that communicate with the control circuit 181 to send and / or receive information as described herein. The communication circuit 184 may perform wireless and / or wired communication. The communication circuit 184 may be a wired communication circuit capable of communicating over a wired communication link. The wired communication link may include an Ethernet communication link, an RS485 serial communication link, a 0-10 volt analog link, a pulse-width modulated (PWM) control link, a digital addressable lighting interface (DALI) digital communication link, and / or another wired communication link.The communication circuit 184 can be configured to communicate over power lines (for example, the power lines from which the load control device 180 receives power) by using a power line carrier (PLC) communication technique. The communication circuit 184 can also be a wireless communication circuit that includes one or more RF or IR transmitters, receivers, transceivers, or other communication circuits capable of wireless communication. Although only one communication circuit 184 can be illustrated, multiple communication circuits can be implemented in the load control device 180. The load control device 180 can include one communication circuit configured to communicate using one or more wired and / or wireless communication protocols and / or networks, and at least one additional communication circuit configured to communicate using one or more wired and / or wireless communication protocols and / or networks. For example, a first communication circuit can be configured to communicate over one wired or wireless communication link, while another communication circuit can communicate over a different wired or wireless communication link.The first communication circuit can be configured to communicate via a first wireless communication link (e.g., a wireless network communication link) using a first wireless protocol (e.g., a wireless network communication protocol such as OLEAR CONNECT (e.g., OLEAR CONNECT A and / or OLEAR CONNECT X) and / or THREAD protocols), and the second communication circuit can be configured to communicate via a second wireless communication link (e.g., a direct or short-range wireless communication link) using a second wireless protocol (e.g., a short-range wireless communication protocol such as BLUETOOTH and / or BLUETOOTH LOW ENERGY (BLE) protocols). One of the communication circuits 184 may comprise a transmitting and / or receiving beacon circuit capable of transmitting and / or receiving beacon messages via a short-range RF signal. A control circuit 181 may communicate with the transmitting beacon circuit (for example, The transmitting beacon circuit (ML / E / ZuZo / uu) is a short-range communication circuit used to transmit beacon messages. The transmitting beacon circuit can communicate beacon messages via RF communication signals, for example. The transmitting beacon circuit can be a unidirectional communication circuit (e.g., the transmitting beacon circuit is configured to transmit beacon messages) or a bidirectional communication circuit capable of receiving information on the same network and / or protocol in which the beacon messages are transmitted (e.g., the transmitting beacon circuit is configured to both transmit and receive beacon messages). The information received on the transmitting beacon circuit can be provided to control circuit 181. The control circuit 181 may be in communication with one or more input circuits 183 from which inputs can be received. The input circuits 183 may be included in a user interface to receive inputs from the user. For example, the input circuits 183 may include an actuator (e.g., a momentary switch that can be activated by one or more physical buttons) that can be activated by a user to communicate the user's input or selections to the control circuit 181. In response to activation of the actuator, the control circuit 181 may enter an association mode, transmit association messages from the load control device 180 through the communication circuits 184, and / or receive other information.In response to activation of the trigger, control can be achieved by controlling the load control circuit 185 to control the electrical load 180, and / or by transmitting control instructions indicating activation in the user interface and / or control instructions generated in response to activation. The trigger may include a touch-sensitive surface, such as a capacitive touch surface, resistive touch surface, inductive touch surface, surface acoustic wave (SAW) touch surface, infrared touch surface, acoustic pulse touch surface, or other touch-sensitive surface configured to receive inputs (e.g., touch activations / inputs), such as point actions or gestures from a user.The load control device 180's control circuit 181 can enter association mode, transmit an association message, control the load control circuit 185, transmit control instructions, or perform other functionality in response to activation or input by the user on the touch surface. Input circuits 183 may include a sensing circuit (e.g., a sensor). The sensing circuit may be an occupant detection circuit, a temperature detection circuit, a color detection circuit (e.g., color temperature), a visible light detection circuit (e.g., a camera), a daylight detection circuit, an ambient light detection circuit, or another sensing circuit for receiving an input (e.g., detecting an environmental feature in the vicinity of the load control device 180). The control circuit 181 may receive information from one or more input circuits 183 and process the information to perform functions as described herein. The control circuit 181 can illuminate light sources 183 (e.g., LEDs) to provide feedback to a user. The control circuit 181 can operate to illuminate the light sources 183 of different colors. The light sources 183 can illuminate, for example, one or more indicators (e.g., visible indicators) of the load control device 180. As described herein, a network can be used to facilitate communication between the respective devices (e.g., control devices and / or a system controller) of the load control system 100. For a respective control device to communicate via the network, the control device can join the network, for example, by initiating a commissioning procedure. The commissioning procedure can include a claiming procedure, a joining procedure, and / or a coupling procedure. The claiming procedure can be used to discover and claim control devices for addition to the network. For example, control devices in the load control system (e.g., the load control system 100 shown in FIG. 1A) can be claimed using a user mobile device (e.g., mobile device 190).Each control device can be claimed by a user's 190 mobile device to join the network (for example, through a joining procedure, as described in this document) and / or pair with other devices on the network (for example, through a pairing procedure, as described in this document). Each control device can transmit a beacon (for example, a control device beacon) over a short-range wireless communication link. The 190 mobile device can discover (for example, receive) beacons transmitted by control devices on the load control system. Each beacon can include a unique beacon identifier from the control device that transmitted the beacon. The unique beacon identifier can include a unique device identifier (for example, serial number) from the control device itself. The 190 mobile device can identify one or more beacons of the control device from which a beacon is received in a communication quality measurement (e.g., Received Signal Strength Indicator (RSSI) or other communication quality measurement) above a predefined value. For example, the 190 mobile device can identify one or more of the beacons transmitting the received beacons with the strongest Received Signal Strength Indicators, and the 190 mobile device can transmit a connection message to the control devices. The control device can receive the connection message from the 190 mobile device and can be configured to establish a connection (e.g., a two-way communication connection) with the 190 mobile device. The connection message can inform the control device that the control device has been selected for retrieval. The connection message can function as a retrieval message, or a separate retrieval message can be sent after the connection is established between the 190 mobile device and the control device. The retrieval message can indicate that the control device has been retrieved to join the network. In response to receiving the retrieval message, the control device can transmit a retrieval confirmation message to the 190 mobile device. The retrieval confirmation message can include configuration information that can be used to join the control device to the network. For example, the configuration information can include a unique device identifier (e.g., serial number) for the control device and / or network credentials for joining a network.Network credentials may include a network key for the network, a network address for the control device (for example, a network address), and / or a join identifier for the control device. The network address and / or join identifier may be used during the join procedure to allow the control device to join the network. User 192 can continue moving mobile device 190 around the load control environment 102 where the load control system is installed to perform the claiming procedure with additional control devices. When user 192 finishes claiming control devices (for example, mobile device 190 has claimed each of the control devices or a portion of the control devices in the load control system), mobile device 190 can upload the configuration information from the claimed devices to a central processing device, such as a system controller (for example, system controller 110). The uploaded configuration information can be used to identify devices to join the network. As described herein, system controller 110 can be installed in the space being commissioned or it can be a remote computing device.Although mobile device 190 is described as the device that performs communications with the control device(s), other devices in the load control system 100 may perform similar communications with the control device(s) during the claims procedure. For example, system controller 110, network configuration device 111, or other computing device in the load control system 100 may be implemented as described in this document. During the joining procedure, the control device can search for a network to join. For example, the control device can initiate the joining procedure after being claimed using the claim procedure. As described in this document, during the joining procedure, the control device can transmit and / or receive joining messages (for example, messages to join a wireless network, such as join request messages and / or join response messages). As a result of the joining procedure, and as described later in this document, the control device can be configured with a network key that allows the device to send and / or receive messages across the network.After the control device joins the network, it can, for example, attempt to connect to another device (such as a leader or routing device) to form a mesh network (e.g., network formation). To connect to another device, the control device can send and receive a number of connection messages over the network. During network formation, multiple control devices may attempt to connect to another device on the network simultaneously or at nearly the same time. As a result, multiple control devices may send messages to connect to other devices at the same or nearly the same time. When multiple devices send messages at the same or nearly the same time, the messages may collide, potentially resulting in messages not being received. Furthermore, message collisions during network formation can delay the completion of network formation, which in turn can delay the installation and / or operation of a load control system. As the scale of a network installation increases (for example, the number of devices connected to the network), the number of collisions that occur during network formation can also increase. Furthermore, after a device fails to connect to the network continuously (for example, as a result of message collisions and / or a lack of connectivity with an existing network), the device may attempt to form another network (for example, a network partition). Network partitions can communicate in parallel, but they cannot communicate with each other (for example, at least for a period of time and / or until the network partitions are merged into a single network partition). For example, devices connected to a first network partition may not be able to communicate with devices connected to a second network partition.As communication links are established between devices at a location, each network can grow, and one or more control devices on one network can join the other. Devices leaving a network can cause undue processing delays for the devices remaining on the network as they reconfigure and / or discover their roles within the network. Figure 2A illustrates an example of a network 200 that can enable communication between control devices in a load control system (e.g., load control system 100). The network 200 can include any network suitable for facilitating communication within a load control system. For example, the network 200 could be a mesh network in which the control devices communicate using a mesh wireless communication protocol (e.g., the THREAD protocol or another suitable protocol). The various control devices in load control system 100 can communicate with each other via the network 200. As shown in Figure 2A, the network 200 can comprise a single network partition. Alternatively, the network 200 can be an example of a network partition (e.g., a subnet or secondary network) within a larger network.For example, network 200 can be an example of a network partition within a larger network composed of multiple network partitions. Network 200 is an example of a network, and the techniques described herein can be applied to other networks, for example, those that include more or fewer control devices than network 200. The circular nodes in FIG. 2A can represent devices that are connected to other devices in network 200 (for example, the various control devices of load control system 100). A control device that is connected to at least one other control device in network 200 can communicate with the other control devices (for example, those connected to another control device in network 200). Communication within network 200 can be facilitated by network communication links (for example, attachments) established within network 200. With reference to FIG.2A, network communication links between devices can be indicated by lines (e.g., solid and dashed lines) connecting the respective control devices. Control devices connected to at least one other device in network 200 can assume and / or be assigned a respective role in the network. For example, roles can include: a leader device (e.g., leader device 210), a routing device (e.g., routing devices 220a-220d), an end device (e.g., end devices 230a and 230b), a router-ready end device (e.g., router-ready end device 240), a master device, a sub-device, and / or an idle terminal device (e.g., idle terminal device 250). The role of a control device can indicate the functions and / or capabilities of the control device with respect to network 200.As described herein, terminal devices may include terminal devices (e.g., terminal devices 230a and 230b), router-eligible terminal devices (e.g., router-eligible terminal device 240), and / or an inactive terminal device (e.g., inactive terminal device 250). As illustrated in FIG. 2A, network 200 can include a leader device 210 and one or more routing devices 220a-220d. The leader device 210 can manage other control devices in network 200. For example, the leader device 210 can assign and maintain routing identifiers (e.g., routing IDs) for each of the routing devices 220. For example, each of the routing devices 220a-220d can be assigned a unique routing identifier. The leader device 210 can assign and maintain roles for other devices. The leader device 210 can be configured as the gateway for network 200. For example, the leader device can be a control device that facilitates communication (e.g., routes and receives messages to and from) between network 200 and other networks or network partitions. With reference to FIG.1 A, a system controller (for example, the system controller 110 shown in FIG. 1 A) can be an example of a leading device 210. In addition, a control device within a load control system that can be assigned to the role of a routing device can be assigned to the role of a leading device. The lead device 210 can support and be connected to multiple routing devices (for example, 64 routing devices, 32 routing devices, or any other number of routing devices can be defined for network 200). The lead device 210 can function as a routing device. Routing devices 220a-220d in network 200 (for example, connected to the lead device 210 in network 200) can communicate with each other, for example, to form a mesh network. Routing devices 220a-220d can communicate with each other via network communication links (for example, as indicated by the solid lines connecting routing devices 220a-220d).Routing devices 220a-220d can communicate with the leader device 210, either directly or through one or more routing devices (for example, as indicated by the solid lines connecting the leader device 210 to routing devices 220a and 220c). Routing devices 220a-220d can receive and route messages to other devices in the 200 network (for example, end devices 230a and 230b, the routing-eligible end device 240, and / or the idle end device 250). For example, routing devices 220a-220d can receive and / or transmit messages between devices, or between themselves to communicate messages received from one device connected to another device connected to another routing device.With reference below to the load control system 100, a device that, for example, is externally powered (for example, a device that is not battery operated) can be assigned to the role of a routing device, such as the system controller 110, the dimmer 120, the LED controller 130, the plug-in load control device 140, the motorized window treatments 150 and / or the thermostat 160. Network 200 can include one or more end devices 230a, 230b (e.g., full or minimal end devices). End devices 230a, 230b can be connected to another device (e.g., a master device, such as the leader device 210 and / or routing devices 220a, 220b, 220c, 220d) in network 200 and can transmit and / or receive messages through their attached master device (e.g., leader device and / or routing device). Although Figure 2A shows two end devices 230a, 210b, each connected to different routing devices, each routing device 220a-220d can support multiple end devices (e.g., more than 500 end devices).The system controller 110, input devices (e.g., remote control device 170) and / or load control devices (e.g., dimmer 120, LED controller 130, plug-in load control device 140, motorized window treatments 150 and / or thermostat 160) can be examples of terminal devices 230a, 230b. With reference again to FIG. 2A, network 200 may include routing-eligible terminal device 240. Routing-eligible terminal device 240 may be a terminal device capable (for example, capable hardware and / or capable software) of becoming a leader device and / or a routing device. In certain situations, the role of routing-eligible terminal device 240 may be upgraded to a leader device and / or a routing device. For example, when routing-eligible terminal device 240 identifies itself as being within range of a terminal device attempting to connect to network 200, routing-eligible terminal device 240 may be upgraded to the routing device role. The terminal device eligible for router 240 may transmit and / or receive messages through the coupled routing device 220d. As shown in FIG.2A, the routing-eligible terminal device 240 can be one of the terminal devices connected to the routing device 220d. Examples of a routing-eligible terminal device 240 include the system controller 110, dimmer 120, LED controller 130, plug-in load control device 140, motorized window treatments 150, and / or thermostat 160. With reference to the load control system 100 below, a control device that is, for example, externally powered (e.g., a control device that is not battery-powered) can be assigned the role of a routing-eligible terminal device, such as the system controller 110, dimmer 120, LED controller 130, plug-in load control device 140, motorized window treatments 150, and / or thermostat 160. Network 200 may include idle terminal device 250. Idle terminal device 250 may include, or be similar to, a terminal device. For example, idle terminal device 250 may be a terminal device powered by a finite power supply (e.g., a battery). Idle terminal device 250 may be aware of its function as an idle terminal device based, for example, on an indication stored in idle terminal device 250. Communication with idle terminal device 250 may be arranged in such a way that the finite power supply is conserved and / or consumed efficiently. For example, idle terminal device 250 may periodically deactivate the communication circuit(s) between message transmissions. Idle terminal device 250 may transmit and / or receive messages through an attached routing device 220a.As shown in FIG. 2A, the idle terminal device 250 can be one of the terminal devices coupled to the routing device 220a. Input devices (e.g., the remote control device 170) and / or load control devices (e.g., motorized window treatments 150 when battery operated) can be examples of the idle terminal device 250. In addition, sensors and / or battery-powered devices can be examples of the idle terminal device 250. The lead device 210 can update the roles (for example, or confirm role updates) of devices communicating within the network 200, based on changes in the network. For instance, a control device might be assigned a specific role when it connects to the network, and the lead device 210 can update that role based on changes in network conditions. These changes might include increased message traffic, other devices connecting, changes in signal strength, etc. Updates to a control device's assigned role can be based on the device's capabilities.For example, the 210 lead device can upgrade the role of a routing-eligible end device from a control device to a routing device (for example, a routing-eligible end device is an end device that is eligible to perform the role of a routing device). The 210 lead device can upgrade the role of a control device to a routing device by assigning a routing identifier (ID) to the device. As the lead device 210 updates the functions of devices in network 200, the lead device can maintain the number of routing devices in network 200 and / or the routing identifiers in use in network 200. For example, the lead device 210 can store and / or maintain a bitmap 217 that can be used to indicate the number of routing devices and / or the routing identifiers used in network 200. The bitmap 217 can include a number of bits, each of which corresponds to a different router identifier used in network 200. In one example, the lead device 210 can support 64 routing devices, and the lead device 210 can store a 64-bit bitmap to track the routing identifiers in use in network 200.Each bit in the bitmap can indicate whether the leader device 210 identifies a routing identifier as in use (for example, with a value of 1) or unused (for example, with a value of 0). The leader device 210 can determine that a device should be upgraded to a router and, provided a routing identifier is available, assign a routing identifier to the routing device. The leader device 210 can downgrade routing devices (for example, to terminal devices) or remove routing devices from the 200 network. As routing devices are added or removed, bitmap 217 can be updated to indicate the number of routing devices and / or routing identifiers in use in the 200 network. The lead device 210 can send bitmap 217 to the other routing devices in network 200. Each routing device, including lead device 210, can maintain network information about each of the routing devices identified as being used in network 200. For example, each routing device can maintain network information about each of the routing devices in a router table, such as router table 219. For example, the network information in router table 219 can identify the routing devices in network 200 and the quality of communication that a corresponding routing device has with the other routing devices, which is maintained in the router table stored locally on them.Each router table, such as router table 219, can include a row for each routing identifier listed in bitmap 217. Each routing device in the network, including the lead device 210, can communicate within network 200 based on the network information stored and maintained in its locally stored router table. For example, a routing device, such as routing devices 220a-220d and / or the lead device 210, can forward messages differently within network 200 depending on the quality of communication with the corresponding routing devices identified in their locally stored router table. Control devices connected to the 200 network can function as primary and / or secondary devices. Lead devices (e.g., lead device 210) and routing devices (e.g., routing devices 220a-220d) connected to one or more end devices (e.g., end devices 230a, 230b, routing-eligible end device 240, and / or idle end device 250) can function as primary devices. End devices (e.g., end devices 230a, 230b, routing-eligible end device 240, and / or idle end device 250) coupled to a lead device (e.g., lead device 210) or a routing device (e.g., one of routing devices 220a-220d) can operate as secondary devices.As a primary device, the leading device 210 and the routing devices 220a-220d can each be coupled to one or more secondary devices (for example, one or more of the terminal devices 230a, 230b, the routing-eligible terminal device 240, and / or the idle terminal device 250, as described herein). Furthermore, the leading device 210 and the routing devices 220a-220d can store and / or forward messages sent by their respective attached secondary devices.For example, the lead device 210 and the routing devices 220 can receive messages from their respective child devices and route the received messages to the intended recipient device (e.g., either directly to the intended receiver, via the respective lead device of the intended receiver, and / or to a routing or lead device—that is, en route to the intended receiver). Similarly, the lead device 210 and the routing devices 220a–220d can receive messages destined for their respective child devices and route the message to the appropriate child device. The lead device of a respective idle terminal device can schedule communications with the idle terminal device when the idle terminal device's communication circuit is activated. As shown in FIG. 2A, the relationship (e.g., coupling) between a secondary device and its respective primary device can be indicated by dashed lines. For example, routing device 220a can be configured as the primary device for terminal device 230a and idle terminal device 250. Similarly, routing device 220b can be configured as the primary device for terminal device 230b. Routing device 220a can receive messages destined for terminal device 230a and forward the message to terminal device 230a. Because routing device 220a is configured as the primary device for terminal device 230a, terminal device 230a can transmit messages to routing device 220a, and routing device 220a can route the message to the intended recipient.For example, when terminal device 230a attempts to transmit a message to terminal device 230b, terminal device 230a may initially transmit the message to routing device 220a. Routing device 220a may then route the message to routing device 220b (e.g., the parent device of terminal device 230b). For example, routing device 220a may route the message to routing device 220b via routing device 220c or routing device 220d, and routing device 220b may then forward the message to the final device 230b. Furthermore, as described herein and illustrated in FIG. 2A, routing device 220a can route the message to terminal device 230b by means of routing device 220c (for example, the auxiliary master device of routing device 230b). Secondary devices can be configured to transmit unicast messages to their respective parent devices. A control device can transmit unicast messages to another control device on the network directly or by hopping through other devices on the network. Each unicast message can be individually addressed to another control device, including a unique identifier for the control device to which the unicast message is being transmitted. Control devices can generate separate unicast messages for each control device with which they communicate and route the unicast messages to each control device independently. Unicast messages can also include the unique identifier of the control device that is transmitting the unicast message.A control device can determine that it is the intended recipient of a unicast message by identifying its own unique identifier in the unicast message. Messages can be sent across the network using multicast and / or broadcast messages. Multicast messages can be sent to a group of control devices on the network. A multicast message can include a group identifier. Control devices that are members of the group can recognize the group identifier and process the message accordingly. Broadcast messages can be sent to every control device on the network capable of receiving the message. Broadcast messages can include an indication that the message is a broadcast message (for example, a broadcast address). Each device that receives a broadcast message can process the message accordingly. A network can use either multicast or broadcast messages, and the two terms can be used in ways that are impossible to teach in this document. Messages transmitted by a secondary device to its respective primary device can include an indication (for example, a unique identifier) of the intended recipient, and the primary device can route the message accordingly. Referring again to Figure 2A, terminal device 230a can transmit messages to routing device 220a (for example, the primary device of terminal device 230a), and routing device 220a can route the message based on the intended recipient. For example, if terminal device 230a transmits a message intended for terminal device 230b, routing device 220a can route the message to the device in routing 220b (for example, the primary device of the terminal device eligible for routing 230b) via routing device 220c or routing device 220d.For example, if routing device 220a routes the message through routing device 220d, routing device 220d can forward the message to routing device 220b, which can then forward the message to terminal device 230b. Routing device 220a can identify routing device 220b as the parent device to which terminal device 230b is connected using a lookup table. As illustrated in Figure 2A, multiple paths can exist for routing messages through the 200 network, and routing devices can identify the shortest path (e.g., the lowest hop count) to deliver messages to a respective device. Secondary devices can be configured to communicate with an auxiliary master device (for example, configured to communicate with more than one master device). With reference to FIG. 2A, for example, terminal device 230b can be configured to communicate with (for example, transmit messages to and receive messages from) a master device (for example, a primary master device), such as routing device 220b. Terminal device 230b can also be configured to communicate with (for example, receive messages from) an auxiliary master device, such as routing device 220c (for example, as illustrated by the long and short dashed lines in FIG. 2A). A secondary device can receive unicast messages from its master device (for example, a primary master device).A secondary device can also receive multicast messages (e.g., and / or transmit messages) from its primary device (e.g., the primary primary device) and one or more auxiliary primary devices, which can increase the efficiency and reliability of the secondary device receiving the messages. For example, the secondary device can receive advertising messages from the network via an auxiliary primary device. The number of auxiliary primary devices with which a secondary device synchronizes can be limited to a threshold number (e.g., 3, 5, 10, etc.). A secondary device can connect to a single primary device and synchronize with one or more auxiliary primary devices. For example, the secondary device can send and / or receive unicast messages through the primary devices. Similarly, the secondary device can receive multicast messages through one or more synchronized auxiliary primary devices. The number of auxiliary primary devices with which a respective secondary device synchronizes can be limited to a threshold number of synchronized auxiliary primary devices, which can be predefined and / or configured. A secondary device can attempt to synchronize with an auxiliary primary device by transmitting a message (referred to herein as a link request message) to the auxiliary primary device. For example, with reference to FIG.2A, end device 230b may have transmitted a link request message to router 220c. The link request message can be used to request a network communication link between two devices. As described herein, messages can be exchanged between devices that share a network communication link. In response to receiving the link request message, routing device 220c may transmit a message (referred to herein as the link acceptance message) to end device 230b. The link acceptance message may include information that allows the respective secondary device to decrypt messages from the auxiliary primary device (for example, a frame counter).As described herein, when a secondary device is synchronized with an auxiliary primary device, the secondary device can receive multicast messages through the synchronized auxiliary primary device. For example, with reference to FIG. 2A, terminal device 230b can receive multicast messages through both the primary device (e.g., routing device 220b) and the auxiliary primary device (e.g., routing device 220c), which can increase the efficiency and reliability of secondary device 230b receiving multicast messages. A secondary device can receive advertising messages from a routing device other than its primary device or a routing device other than its auxiliary primary device. For example, the routing device might broadcast advertising messages to allow other control devices to determine that a network has been formed and that the device receiving the advertising message can attempt to connect to the routing device (for example, to communicate across the network). Devices can receive and track the advertising messages broadcast by routing devices to determine if the device can communicate across the network.Alternatively, advertising messages transmitted by a routing device may provide other routing devices with the ability to measure the communication quality of the signal (e.g., by measuring the Received Signal Strength Indicator) between the respective routers connected to the network (e.g., routing devices can use this information to update their respective routing tables or routing data). As described herein, the secondary device may measure the Received Signal Strength Indicator (RSSI) or other communication quality measurement of the received advertising messages. Certain messages can be propagated and transmitted by multiple devices on network 200, which can increase the likelihood that a respective secondary device will receive a message. For example, instead of sending multiple transmissions, multicast messages that are substantially similar can be broadcast (e.g., messages containing the same load control instructions sent to multiple load control devices). Referring again to load control system 100, pressing a button on remote control device 170 can adjust the intensity of multiple lighting loads (e.g., lighting load 122 and plug-in lighting load 142), and a message can be transmitted to adjust the respective lighting loads.In addition, devices receiving the broadcast transmission can be configured to process and repeat (e.g., forward the message over the network or act as a repeater) the message in response to receiving the broadcast transmission. Secondary devices can create and maintain a parent auxiliary table. The parent auxiliary table can include a list of parent auxiliaries with which a respective secondary device is configured to communicate (for example, synchronized with and / or capable of receiving multicast messages). Additionally, the parent auxiliary table can include an indication of the communication quality metric (received signal strength, for example, an RSSI) for each of the secondary device's parent auxiliaries. For example, the parent auxiliary table can include a moving average of the received signal strength indicators for each of the secondary device's parent auxiliaries. Similarly, secondary devices can create and / or maintain a router table.The router table can include the routing devices from which a respective secondary device has received messages (for example, advertising messages). Additionally, the router table can include an indication of the RSSI or other communication quality measurements of the messages received from each of the routing devices in the router table. Alternatively, secondary devices can maintain a generic router table. This router table can include each of the routing devices from which a respective secondary device has received messages and an indicator of the received signal strength for each of the respective routing devices.The router table may also include an indication of whether a given routing device is a primary device with respect to the secondary device or an auxiliary primary device with respect to the secondary device. As used herein, the term auxiliary primary table may refer to a separate table within the router table or a subset of the router table that includes the routing devices that are the synchronized auxiliary primary devices of the secondary device. As described herein, network 200 can enable communication between devices in a load control system (e.g., load control system 100 shown in FIG. 1A). Terminal devices 230a and 230b can include load control devices and / or input devices (e.g., input devices) that communicate with other devices in the load control system. For example, terminal device 230a can communicate with another terminal device and / or a routing device in the load control system via RF communication. With reference to FIG. 1A, the remote control device 170 can function as an end device or an idle end device to communicate messages comprising user input indications and / or control instructions to control another end device (e.g., the dimmer 120, LED driver 130, plug-in load control device 140, motorized window treatment 150, and / or thermostat 160). The remote control device 170 can communicate through one or more intermediate main devices, such as a leader device and / or a routing device, for example.The lead device and / or routing device can communicate with one or more lead devices and / or routing devices on the network to route messages to the other terminal device (e.g., dimmer 120, LED controller 130, plug-in load control device 140, motorized window treatment 150 and / or thermostat 160) to perform load control. A control device can connect to another control device on a network or network partition (for example, network 200 illustrated in FIG. 2A) to enable the device to communicate (for example, transmit and / or receive messages) across the network. A control device can initiate coupling to another control device on a network by transmitting a parent solicitation message (for example, a multicast parent solicitation message) to describe potential parent devices. A control device can transmit a parent solicitation message to discover and / or attach to a parent device (for example, routing and / or leader devices).A control device can transmit the master request message as a multicast message, for example, to identify devices connected to a network that can act as a master device for the control device. Potential master devices (for example, the lead device 210 and / or the routing devices 220 in network 200) that receive a master request message (for example, a multicast master request message) can respond by transmitting a master reply message. For example, potential master devices that receive a multicast master request message can each transmit a master reply message (for example, such as a unicast message) to the control device that transmitted the master request message.A primary reply message can indicate that the control device transmitting the primary reply message is available to act as the primary device. Consequently, a control device transmitting a parent request message can receive multiple replies to the primary request message and determine a primary device to synchronize with based on the primary reply messages received. The control device transmitting the primary request message can identify the received communication quality metric (e.g., RSSI) associated with the reply messages and attempt to synchronize with the primary device that has the highest received signal strength indicator for the reply message. Figure 2B is an illustrative example of a network 200a that has a plurality of network partitions 201, 202, and 203 (e.g., separate network partitions). As illustrated in Figure 2B, network partition 201 may include the following primary devices: a leading device 211 and routing devices 221a, 221b, 221c, and 221d. In addition, network 201 may include secondary devices, such as terminal devices 231a and 231b; a routing-capable end device 241; and an idle end device 251. For example, each of the routing devices 221a and 221d in network partition 201 may be assigned a unique routing identifier. Network partition 202 may include the following primary devices: a leading device 212 and routing devices 222a, 222b, 222c, 222d.Additionally, network 202 can include secondary devices, such as: terminal devices 232a, 232b; routing-eligible terminal devices 242; and inactive terminal device 252. For example, each of the routing devices 222a-222d in network partition 202 can be assigned a unique routing identifier. Network partition 203 can include a single primary device, the leading device 213, and a single terminal device, the terminal device 223. As illustrated in FIG. 2B, network portion 203 may include a leading device 213 and a terminal device 223. Network partition 203, however, may not include a routing device. Instead, leading device 213 may function as the sole routing device within network partition 203. A leading device that is not connected to or synchronized with a routing device may be called a single-instance device. For example, leading device 213 may be a single-instance device. As illustrated in FIG. 2B, a single-instance device may be connected to one or more child devices (for example, terminal device 223). Network partition 203 may be a single-instance partition. As illustrated in FIG. 2B, a single-instance partition may include a leading device (for example, leading device 213).Furthermore, a single-instance partition can include one or more terminal devices (for example, terminal device 223). However, as illustrated in FIG. 2B, a single-instance partition can not include a routing device. Network 200a enables communication between control devices in a load control system (e.g., load control system 100). Furthermore, network partitions 201, 202, and 203 can be formed when certain control devices are unable to connect to an existing network partition. For example, as described herein, a control device might attempt to connect to another control device in a network partition by transmitting a master request message (e.g., a multicast master request message).However, if the control device does not receive a response to the master request message (for example, because the control device is out of communication range of the routing devices of an already formed network partition), the control device may attempt to form its own network partition (for example, becoming a lead device of a new network partition). A control device that cannot connect to a network partition can form another network partition. For example, with reference to Figure 2B, the lead device 213 might not have been able to connect to a routing device in network partitions 201 and 202 (for example, because lead device 213 was out of communication range of the routing devices in network partitions 201 and 202). Consequently, lead device 213 can form network partition 203, and end device 223 can join network partition 203. Similarly, lead device 212 might not have been able to connect to network partitions 201 and 203 (for example, because lead device 212 is out of communication range of the routing devices in network partitions 201 and 203) and formed network partition 202. A network partition can be associated with a partition identifier (e.g., a partition ID). The partition identifier can be assigned randomly or pseudo-randomly (e.g., randomly assigned from a range or list of identifiers). For example, the priority of a given network partition can be based on its partition identifier. The partition identifier can be assigned by randomly selecting a number from a range of partition identifier values. The partition identifier can be selected on a lead device and transmitted in advertising messages to other devices that can connect to the lead device. With reference to Figure 2B below, network partitions 201, 202, and 203 can each be associated with a respective partition identifier.For example, network partition 202 might be assigned a partition identifier of 1, network partition 203 might be assigned a partition identifier of 2, and network partition 201 might be assigned a partition identifier of 3. Although the partition identifiers of network partitions 201, 202, and 203 are sequential (for example, to provide a simplified explanation), the assignment of partition identifiers to the network partition can be sequential, non-sequential, and / or random. As described herein, a partition identifier can also indicate a priority for the respective network partition 201, 202, and 203. For example, the partition identifier can also be a priority value for the respective network partition 201, 202, and 203 (for example, the respective priorities of network partitions 201, 202, and 203 could be 3, 1, and 2).A higher or lower partition identifier can indicate a higher priority value for the network partition (for example, network partition 201 may be a higher priority network partition than network partitions 202, 203 depending on the partition identifier). A network partition can be assigned a priority based on the control devices (e.g., routing devices and / or terminal devices) within it. For example, a network partition with at least one routing device in addition to the lead device might have a higher priority than a network partition with only a lead device and no other routing devices. Referring to Figure 2B, network partition 201 might have a higher priority than network partition 203 because network partition 201 contains routing devices 221a–221d, while network partition 203 has no routing devices besides the lead device. Furthermore, a network partition can be prioritized based on the number of control devices (e.g., routing devices and / or terminal devices) within it.2B, network partition 201 can have a higher priority than network partition 203 because network partition 201 can have a greater number of control devices within it. Each control device in a network partition can have its number of control devices stored locally. Network partitions with the same number of control devices can be assigned different priorities using different partition identifiers, as described in this document. For example, as shown in FIG. 2B, network partition 201 and network partition 202 can have the same number of control devices (e.g., routing devices and / or terminal devices). Network partition 201 can have a higher priority depending on whether it has a higher or lower partition identifier. As control devices connect to each of the network partitions 201, 202, 203, the effective communication range of each of the network partitions can increase. Furthermore, control devices that initially could not connect to one or more of the network partitions 201, 202, 203 (for example, because the control device was previously outside the communication range of all network partitions) will subsequently be able to connect to one of the network partitions 201, 202, 203. In addition, communication within a load control system can be facilitated more effectively when a single network partition is formed (for example, network 200 has a single network partition as illustrated in FIG. 2A) compared to when multiple network partitions are formed (for example, network 200a has multiple network partitions 201, 202, 203 as illustrated in FIG. 2B).For example, communication within a load control system can be facilitated by creating a single network partition because a device in one partition might not be able to transmit messages to control devices connected to another partition (for example, a device in one partition might not be able to communicate with devices outside that partition). Consequently, if a control device connected to the first partition is also within communication range of a second partition, the device might attempt to disconnect from the first partition and connect to the second. For instance, a control device might disconnect from the first partition and connect to the second when the second partition has a higher priority than the first. ΜΛ / Ε / ΖυΖο / υυΊ is the name of the first network partition.Each routing device connected to each network partition 201 and 202 can be associated with a communication range. The communication range of each routing device can be predefined and / or preconfigured. For example, the communication range of each routing device can be predefined and / or preconfigured based on its hardware components. The effective communication range of a network or network partition can be based on the communication range of the routing devices connected to that network (for example, the sum of the communication ranges of all connected routing devices).As a result, the communication range of a respective network or network partition can increase as the number of routing devices connected to the respective network increases. As described in this document, control devices connected to a lower-priority network partition can attempt to connect to a higher-priority network partition. For example, control devices connected to network partition 202 can attempt to connect to network partition 201 (for example, because network partition 201 has a priority value of 3 and network partition 202 has a priority value of 1). Routing device 222a can receive an advertisement message from a device connected to network partition 201 (for example, from routing device 221d). The advertisement message might include an indication that the partition identifier of network 201 (for example, 3) is higher than the partition identifier of network partition 202, indicating that network partition 201 is a higher-priority network partition than network 202.The routing device 222a can determine to connect to network partition 201 (for example, because network partition 201 has a higher priority). Routing device 222a can attempt to connect to network partition 201 by transmitting a request to the leader device of network partition 201 (for example, leader device 211). The request can include a request to connect to network partition 201 as a routing device, for example, requesting to connect to network partition 201 and to be assigned a specific routing identifier. For instance, routing device 222a might request to connect to network partition 201 and to be assigned the routing identifier that routing device 222a has assigned in network partition 202. In response, leader device 211 might reject the request if another routing device (212a-212d) attached to network partition 201 already has the requested routing identifier assigned.Lead device 211 can accept the request if none of the routing devices 212a212d attached to network partition 201 are assigned the requested routing identifier. YES. If routing device 222a is attached to network partition 201 and assigned the requested routing identifier, secondary devices of routing device 222a (e.g., end device 232a and idle end device 252) can automatically connect to network partition 201. For example, when secondary devices communicate with routing device 222a using the routing identifier, and if the leader device 211 of network partition 201 assigns routing device 222a the requested identifier (e.g., the routing identifier assigned in network partition 202), the secondary devices can continue communicating with routing device 222a using the same routing identifier. Figures 2C and 2D illustrate an example network 200b as it progresses through network formation. As illustrated in Figure 2C, network 200b may include a leading device 214 and a terminal device 234a. Since network 200b is in the early stages of network formation, it may not yet include a routing device. The terminal device 234a may, therefore, connect to the leading device 214 (for example, because no other routing devices exist in network 200b yet). However, the network communication link (for example, the primary / secondary link) between the leading device 214 and the terminal device 234a may be weak (for example, the received signal strength indicator for messages received by the terminal device 234a may be approximately -60 dB).For example, the network communication link between the lead device 214 and the end device 234a may be weak because the lead device 214 and the end device 234a are not located close to each other. If the network communication link between the lead device 214 and the end device 234a is weak, the probability of message transmission and / or reception failures between the lead device 214 and the end device 234a may increase. Figure 2D illustrates network 200b during a later stage of network formation than the stage illustrated in Figure 2C. As illustrated in Figure 2D, network 200b can grow to include additional control devices as network formation progresses (e.g., over time). For example, network 200b can grow to include routing devices 224a and 224b. Furthermore, routing devices 224a and 224b can be placed closer to the end device 234a (e.g., closer to the terminal device 234a than the guide device 214).Furthermore, the received signal strength indicators of messages transmitted by routing devices 224a and 224b and received by terminal device 234a may be strong (e.g., stronger than the received signal strength indicators transmitted by leading device 214 and received by terminal device 234a, such as -35 dB and -30 dB, respectively). Therefore, the potential network communication links (e.g., potential primary / secondary links) between routing devices 224a and 224b and terminal device 234a may be stronger than the network communication link between leading device 214 and terminal device 234a. Moreover, as illustrated in FIG.2D, a potential network link between routing device 224b and terminal device 234a may be stronger than a potential network link between routing device 224a and terminal device 234a (for example, because routing device 224b is placed closer to terminal device 234a than routing device 224a). As the network formation progresses, additional devices can be connected. As a result, end device 234a may experience improved communication across network 200b if it disconnects from an initial master device (e.g., lead device 214) and connects to an updated master device (e.g., routing device 224a or routing device 224b). For example, as described in this document, the updated master device can be placed closer to end device 234a than the initial master device (e.g., so that the updated master device and end device 234a have a stronger network communication link), which can increase the likelihood of successful message transmission and / or reception.As a result, as the network develops, the terminal device can determine whether to connect to an updated master device. Although Figures 2C and 2D illustrate an example where the relative positioning of devices can increase or decrease the shared network communication link between two devices, other conditions can affect this link (e.g., line of sight, interference, signal obstructions, etc.). Therefore, the hypothetical cases in Figures 2C and 2D are simply examples to illustrate that a network can change over time and that network changes can be considered to improve communications. Figure 2E illustrates an example of a 200c network. As illustrated in Figure 2E, the 200c network may include a leading device 215 and routing devices 225a, 225b, 225c, 225d, 225e, and 225f. In the 200c network, the routing devices (e.g., the leading device 215 and routing devices 225a, 225b, 225c, 225d, 225e, and 225f) may periodically transmit advertising messages that can be used to calculate the cost and / or quality of communications in the 200c network. For example, routing device 225c can send an advertising message that is received by leading device 215, and leading device 215 can send an advertising message that is received by routing device 225c.Each routing device can measure the received signal strength measurement (RSSI) of the received advertising message and calculate a link quality at which the advertising message is received (e.g., link quality index (LQI)). Each routing device (for example, the lead device 215 and routing devices 225a, 225b, 225c, 225d, 225e, and 225f) can send an advertising message as a multicast message. Advertising messages transmitted by one routing device can be received by neighboring routing devices that share a single-hop network communication link with the routing device transmitting the advertising messages. A single-hop network communication link may be capable of transmitting messages (for example, messages) from one routing device via unicast and / or multicast communication directly to another routing device.For example, routing devices 225a and 225c could be neighboring devices that share a one-hop communication link with the leading device 215, since routing devices 225a and 225c can send messages directly to and / or receive messages directly from the leading device 215. The one-hop communication link could be a network link where the routing devices can directly receive advertising messages above a certain link quality (e.g., LQI greater than 0). After a routing device receives a periodic advertising message from another routing device, it can calculate the link quality (e.g., LQI) of the network communication link through which the advertising message is received. The LQI can be calculated as a predefined number within a range that indicates different link qualities for the network communication link between two devices. For example, the LQI could be set to 0, 1, 2, or 3. Different LQI values can be assigned based on the RSSI of the received advertising message and a link margin relative to a predefined reception level. The reception level can be a predefined minimum reception level. Alternatively, the reception level can be set to a predefined RSSI value for communications on the network.For example, the receive level can be defined by a background noise level set to an average RSSI value for the noise generated on the network over a period of time. In an example using the receive level as the background noise, a routing device (for example, the leading device 215 or the routing device 225c) can calculate an LQI of 1 for communications received on a link from a neighboring routing device when the RSSI value of one or more advertising messages (for example, the average RSSI for advertising messages over a period of time) has at least a 2 dB link margin above the background noise level.The routing device (e.g., the 215 lead device or the 225c routing device) can calculate a link quality of 2 for communications received on a network communication link with a nearby routing device when the RSSI value of one or more advertising messages (e.g., average RSSI for advertising messages over a period of time) is at least 10 dB above the background noise. The routing device (e.g., the 215 lead device or the 225c routing device) can calculate a link quality of 3 for communications received on a network communication link with a nearby routing device when the RSSI value of one or more advertising messages (e.g., average RSSI for advertising messages over a period of time) is at least 20 dB above the background noise.A link quality value of zero may indicate that the link quality is unknown or infinite when the RSSI value of one or more advertisement messages (for example, the average RSSI value for advertisement messages over a period of time) cannot be determined above the background noise. Although examples of predefined numbers indicating different levels of link quality and / or different link margins that can be assigned to those levels are provided, other indicators and / or values can be used to define the link quality between two routing devices. Furthermore, although individual routing devices may be provided as examples (for example, leading device 215 or routing device 225c), other routing devices can similarly calculate link quality for network communication links between neighboring routing devices. The Link Quality Index (LQI) of the network communication links, measured locally at each control device (e.g., the leading device 215 and the routing device 225c), can be exchanged with the other device on the network communication link. For example, the LQI can be measured locally at each control device and transmitted to the other device via an advertisement message. The LQI measured by another routing device (e.g., on the other side of the network communication link) and received at a routing device can be stored as the Link Quality Out (LQO) for the network communication link. The LQI and / or LQO can be stored in a local router table on each routing device. For example, the leading device 215 can store the LQI and / or LQO for the network communication link with each routing device on network 200c in a router table 229.Similarly, routing device 225c can store the LQI and LQO for communicating with each routing device in network 200c in a router table 261. As described herein, each of the routing tables 229 and 261 can identify network information for communicating with each router in network 200c from the perspective of the devices in which the routing tables 229 and 261 are stored. The number of routing devices in network 200c and / or the routing identifiers in use in network 200c can be determined from a bitmap 227, as described herein. The bitmap 227 can be maintained by the lead device 215 and distributed to the other routing devices to maintain their routing tables locally. For example, routing devices 225a, 225c can receive bitmap 227 and update their local routing tables.Bitmap 227 can indicate the number of rows in the routing tables (for example, by indicating the number of routing devices identified in the network) and / or the routing identifiers to include in the routing tables. Routing devices can maintain updated network information for the routing identifiers indicated in the routing tables. The updated network information in the routing tables can include the LQI and / or LQO for the network communication link between the routing devices identified in bitmap 227. For example, router 225c can receive bitmap 227 from lead device 215 and update router table 261 to include the routing devices in table 261 indicated in bitmap 277, or remove routing devices in table 261 that are not usable in the network. The lead device 215 and the routing devices 225a, 225b, 225c, 225d, 225e, and 225f can use LQI and LQO in their respective routing tables to calculate a link cost for communicating over a network link with other routing devices. The link quality for the network communication link between the two routing devices can be the lower of the link quality value for transmitted messages (e.g., LQO) and the link quality value for received messages (e.g., LQI) over a single-hop communication link between the two devices. An LQO or LQI of zero may indicate that the routing device does not have a direct network communication link with the routing device listed in the router table. A link cost for sending communications between devices on a network link can directly correspond to the link quality of the communications on that network link. The link cost can indicate a relative cost or loss of communications on the network link. Figure 2F is an example from Table 262, which illustrates examples of link costs that can correspond to different link qualities. As shown in Figure 2F, a higher link quality can correspond to a lower link cost for communications on the network link between two neighboring devices. The link cost for each network communication link can be used by a routing device to calculate a path cost for communications between that routing device and another routing device in the 200c network. The path cost can indicate the relative cost or loss of communications along a complete communication path, which may include one or more routing devices. The path cost for one communication route can be compared to another to determine a higher-quality communication path for sending digital communications, which may have a lower relative cost associated with message transmission. The path cost can indicate the total cost of communicating a message from an initial routing device to a final routing device. For example, the path cost can be calculated as the total of the link costs for each hop between the initial routing device from which a message can originate and the final routing device where the message can be received in network 200c. Each routing device can calculate the path cost to a neighbor device on a single-hop network communication link as if it were equal to the link cost and store the path cost in its locally stored router table. For example, routing device 225c can set the path cost for communications with leading device 215 equal to the link cost (e.g., the lower of LQI and LQO) on the network communication link and store the path cost in router table 261.Similarly, routing device 225c can set the path cost for communications with routing device 225b equal to the link cost (e.g., less than LQI and LQO) on the network communication link and store the path cost in the router table. Each routing device (e.g., the leader device 215 and routing devices 225a, 225b, 225c, 225d, 225e, and 225f) can update the path cost for message communication to / from each routing device in its respective routing table based on path cost information received from another routing device. For example, since routing device 225b may be able to communicate directly with the leader device 215, routing device 225b may receive path cost information for message communication through another router in network 200c. Router 225c can then transmit the path cost for message communication to / from the leader device 215 (e.g., path cost = 2) in a multicast message that is received by other routing devices. The multicast message can be an advertising message, for example.Routing device 225b can receive the path cost for communicating messages between leading device 215 and routing device 225c (e.g., path cost = 2). To calculate the total path cost for communicating messages between routing device 225b and leading device 215 via routing device 225c, routing device 225b can add the link cost for communications between routing device 225b and routing device 225c (e.g., link cost = 1) to the path cost received from routing device 225c (e.g., path cost = 1) to obtain a total path cost (e.g., path cost = 3).The link cost for communications between routing device 225b and routing device 225c can be determined from the quality of the network communication link between routing device 225b and routing device 225c, which can be the lower of the LQI and LQO of the network communication link (e.g., link quality = 3). Each routing device can send / transmit an advertising message that includes the path cost to one or more routing devices in network 200c. Routing devices that receive the path cost information from the routing device that sent the advertising message can update their respective path cost information in their local routing tables (for example, by adding their link cost for communications with the routing device that sent the advertising message to the path cost in the received message). Each routing device can use the locally stored path cost information to identify the path through which messages can be communicated. For example, messages transmitted from routing device 225b to the lead device 215 can be communicated through routing device 225a or routing device 225c.Routing device 225b can receive respective advertising messages from routing device 225a and routing device 225c indicating that the path cost for message communication between routing device 225a and leading device 215 is the same as the path cost for message communication between routing device 225c and leading device 215 (e.g., path cost = 2 on each network communication link).Routing device 225b can add the calculated link cost to communicate messages between routing device 225b and routing device 225c (e.g., link cost = 1) to the path cost information received in the advertisement message from router 225c (e.g., path cost = 2) to determine the total path cost to communicate with leading device 215 via routing device 225c (e.g., total path cost = 3).Routing device 225b can similarly add the calculated link cost for communicating messages between router 225b and router 225a (e.g., link cost = 2) to the path cost information received in the advertisement message from router 225a (e.g., path cost = 2) to determine the total path cost for communicating with leader device 215 via routing device 225a (e.g., total path cost = 4). Routing device 225b can then update a locally stored router table with the lowest calculated path cost for communicating with leader device 215 and / or the identifier of the routing device through which the messages will be transmitted (e.g., router 225c).Each routing device can similarly update its respective locally stored router table with the lowest calculated path cost to communicate with the other routing devices in network 200c. For example, as shown in FIG. 2E, the lead device 215 and the routing device 225c can each calculate the lowest path cost to communicate with other routing devices in network 200c and store the path cost in their respective routing tables 229 and 261. Routing tables 229 and 261 can also store the next-hop router identifier from the respective devices 215 and 225c through which messages will be communicated to achieve the calculated path cost for communication to the destination router device. Through periodic updates of link quality (e.g., LQI and / or LQO), link cost, and / or path cost, and by communicating the path cost to other routing devices in periodic advertisement messages, each routing device can have up-to-date path cost information to communicate messages to other routing devices in the 200c network. The routing device can then use the best communication path (e.g., the lowest-cost path) to communicate messages to other devices. This routing mechanism allows routing devices to detect when other routing devices have disconnected from the 200c network, or if the path cost between routing devices has changed, and calculate the next lowest-cost path to maintain connectivity with other routing devices in the 200c network. In an effort to distinguish the relatively older data transmitted in periodic advertising messages from the relatively newer data transmitted in periodic advertising messages, advertising messages can communicate using a sequence number. The lead device, such as lead device 215, can be responsible for updating the sequence number and distributing the updated sequence number to the other routing devices in the network (for example, routing devices 225a, 225b, 225c, 225d, 225e, and 225f in network 200c). For example, lead device 215 can increment the sequence number periodically (for example, after transmitting one or more advertising messages) and / or after adding a routing device to the network.The sequence number can be updated to allow routing devices on the network (e.g., lead device 215 and / or routing devices 225a, 225b, 225c, 225d, 225e, and 225f on network 200c) to identify updated network information transmitted in advertising messages. For example, if routing devices (e.g., lead device 215 and / or routing devices 225a, 225b, 225c, 225d, 225e, and 225f on network 200c) are periodically communicating advertising messages that include route cost information indicating the cost of communicating with other routing devices on the network, the sequence number can be updated to identify this updated route cost information. After the lead device 215 updates its sequence number, it can distribute that sequence number to other routing devices on the network. For example, the lead device 215 can use the sequence number in its own advertising messages. After receiving the updated sequence number, each routing device can use it for subsequent advertising messages transmitted from the lead device on the network. Each sequence number transmitted from the lead device 215 to the other routing devices can be used in advertising messages for those devices until the lead device 215 distributes a subsequent sequence number.For example, routing device 225c can receive the sequence number directly from the lead device 215 and use that sequence number in subsequent advertisement messages. Routing device 225b can receive the sequence number in advertisement messages transmitted from routing device 225c and use that sequence number in subsequent advertisement messages transmitted from routing device 225b. Each routing device can use the current sequence number until an updated sequence number is received from and distributed by the lead device 215.Each routing device can update the network information stored locally in the router table when it receives an advertisement message from a non-leader routing device (e.g., routing devices 225a, 225b, 225c, 225d, 225e, 225f) that has an updated sequence number. If a routing device receives an advertisement message with the same sequence number as a previously received advertisement message, and / or one previously received from the same non-leader routing device, the routing device may fail to process the advertisement message. If a routing device does not receive an updated sequence number within a predefined time period (e.g., minutes, seconds, etc.), it will fail to process the advertisement message.), the router may assume that the 215 leader device is unavailable for communication (e.g., offline, powered off, dropped off the network, changed roles, or unable to communicate with the routing device) and attempts to form another network or network partition that has another 215 leader device. As described herein, control devices joining a network, such as network 200, 200a, 200b, and 200c, can each be assigned a respective role. Control devices assigned certain functions within the network, such as the lead or routing role, can be configured to facilitate communication with control devices assigned other roles within the network, such as end devices (e.g., including end devices, idle end devices, and / or end devices eligible for routing, as described herein). Control device roles can initially be assigned on a first-come, first-served basis. For example, control devices that attempt to join a network first can be assigned roles configured to facilitate communication with other control devices that subsequently join the network.This can result in a degradation of the quality of network communication links as the network evolves and other devices are added to or near the network. For example, control devices may establish network links with each other that provide the best quality network communication links at that time. But over time, the quality of these network communication links can change, and in certain cases (for example, when noise sources are introduced into the network), the quality of these network communication links can degrade. Noise sources (e.g., noise-generating devices) can be located in the space where the network is deployed. For example, noise sources that might be located near the network could include wireless access points (WAPs), microwave ovens, video cameras, security card readers, and other noise-generating devices. The presence of noise sources in a network can degrade the quality of communication on a communication link or throughout the network. As noise sources are added to a space that can degrade the quality of communication on a network communication link, additional control devices can be added to the network, and their addition can improve the quality of communication on the network communication link or throughout the network. The functions of control devices attached to or connected to the network can be updated to further improve communication quality.For example, the functions of control devices located near noise sources can be assigned in a way that optimizes or improves communication quality within the network deployment area. Additionally, control devices may experience poor network communication links, for instance, if they are installed in an isolated location (e.g., a location not near other control devices on the network). Control devices can be assigned the role of leader device or routing device according to a predefined procedure (e.g., predefined by the respective network or protocol). The leader and routing device roles can initially be assigned to control devices on a first-come, first-served basis during the initial network startup (e.g., when the control devices are powered on). For example, after joining or connecting to a network, a control device might attempt to initiate a connection to another device on the network (e.g., by transmitting a lead request message). If the control device cannot connect the other device to the network (e.g., it does not receive a response to the lead request message, for example, because a leader or routing device is not on the network), the leader device role can be assigned to the control device.Over time, other control devices may join or connect to the network and attempt to connect to the control device assigned to the lead device role. For example, these other control devices may initially be assigned the end device role. Furthermore, as described in this document, the lead device may decide to adjust the roles of other control devices, for example, by upgrading one or more of them to the routing device role. However, when determining how to adjust the roles of the other control devices, the lead device may not consider the quality of communication on the network communication links experienced by the respective control devices. When roles are assigned in this way, control devices that experience lower quality communications on network communication links can be assigned the role of a leading device or a routing device, which are control devices configured to facilitate communications between other control devices on the network (e.g., control devices that are assigned the roles of terminal devices, including terminal devices, idle terminal devices, router-enabled terminal devices, etc., as described in this document).Similarly, when roles are assigned in this way, there may be no control devices assigned the leader or routing device role near noise sources, and control devices assigned the terminal device role may be unable to connect to a nearby leader or routing device. Assigning the leader or routing device role to control devices experiencing poor communication quality can decrease the overall quality of communication on network links and / or the network as a whole.Over time, networks that assign control devices experiencing poor network communication links with other control devices to the role of leader or router may experience a higher probability of communication failures, particularly in locations with a source of network noise. Consequently, certain network optimization procedures can be implemented so that the roles assigned to control devices are based on the quality of a given control device's network communication links with other devices on the network. After the network is established, the quality of the network communication links between a control device and its respective control devices can be considered when assigning functions to those devices. For example, networks can enter a router optimization mode to evaluate and / or determine the quality of the network communication links between the control device and its respective control devices, and optimize the functions assigned to the control devices within the network based on the quality of these links. The roles assigned to the control devices can be updated as a result of the router optimization mode.For example, while the lead device function can initially be assigned to a first control device, the lead device function can later be assigned to another control device depending on the router's optimization mode. A router optimization mode can be initiated by a user through an application running on a network device (for example, the 190 mobile device or another suitable network device, such as a personal computer). Alternatively, router optimization mode can be activated periodically (for example, by a system controller, such as the 110 system controller) and / or by a monitoring device on the network (for example, a monitoring device assigned the leading device role). For instance, a monitoring device might activate router optimization mode after detecting a change in the quality of network communications (for example, when a monitoring device detects increased packet loss within the network). During a router optimization mode, control devices communicating across the network can transmit (for example, via unicast, multicast, and / or broadcast messages) one or more optimization messages. Control devices receiving these optimization messages can measure and store a communication quality metric (for example, RSSI) of the optimization message along with an indication (for example, a unique identifier) of the control device that transmitted the optimization message (for example, optimization data). This optimization data can identify the number and quality of network links a control device has established on the network. As described later in this document, the optimization data can be used to identify optimized functions for control devices on the network.Then, each of the control devices can transmit its respective optimization data to another control device (e.g., the system controller) that processes the optimization data. The system controller, or another control device on the network (for example, a network configuration device and / or the control device assigned to the lead device role on the network), can process and analyze the optimization data received from the various control devices to generate optimized network data. For example, the optimization data can be used to identify the number and quality of potential connection links that a given control device can establish with other control devices on the network. The system controller can use the optimization data to determine possible couplings (for example, link couplings) that each control device could form with other control devices on the network and / or optimized roles for the control devices on the network.The system controller can generate optimized network data that includes optimized control device functions in the real network based on the optimization data. By generating optimized network data, the system controller can form an abstract or virtual network. This abstract or virtual network can then define the optimal roles of the control devices within the network based on the optimization data, for example, to determine the best control devices to assign as lead devices and / or routing devices. The abstract or virtual network can also define connections between each of the control devices, representing potential mating links between them.For example, since the optimization data received from each control device identifies the number and quality of network communication links that a respective control device has established with other control devices on the network, the system controller can assign connections in the abstract network such that control devices that have a large number of network communication links that are above the defined quality threshold can be assigned to the role of leading device or routing device before control devices that do not have a large number of network communication links that are above the desired quality threshold.Furthermore, the system controller can assign connections and / or roles in the abstract network in such a way that routing devices can be grouped or clustered around the noise source (for example, assigning the routing device role to control devices surrounding noise sources). As described in this document, noise sources can degrade the quality of communication on a network link or in a network, and grouping or clustering control devices assigned the router role around the noise can counteract the degradation of communication quality on a network link or in a network. When the system controller first begins processing optimization data to generate optimized network data, it may consider each control device in the abstract network as an unconnected device (for example, a control device that has no defined connection to any other control device in the abstract network). The system controller can then process the optimization data to identify potential connection couplings between each control device and the potential connection couplings that a given control device might have with other control devices that are above a defined quality threshold (for example, using the optimization procedures described in this document with respect to FIGS). MA / t / ZUZÓ / UUΊ fóó 5A-5C). Based on this information, the system controller can, for each control device, identify a list of other control devices with which a respective control device has potential connection links that are above the defined quality threshold (for example, a preferred connection list, as described herein). The system controller can further assign the control device that has a potential preferred connection with the system controller and has the most preferred connections with other control devices that are above the defined quality threshold to the leading device role in the abstract network. After assigning the control device to the leading device role in the abstract network, the system controller can consider that control device (for example, the leading device in the abstract network) as a connected device.Furthermore, the system controller can define connections between the leading device and other control devices that have potential coupling links exceeding the quality threshold defined with the leading device in the abstract network, and can consider those other control devices as connected devices. As described herein, control devices with at least one defined connection to another control device in the abstract or virtual network can be considered connected devices. A connected list of control devices, as described herein, can be maintained, which includes a list of the connected devices in the abstract or virtual network. It can be guaranteed that a connected device in the abstract network has at least one strong potential coupling link in the network that can be formed after the optimization procedures are completed. The system controller can continue adding control devices to the connected list by defining connections between control devices in the abstract network until no more devices are disconnected. For example, the system controller can identify a disconnected control device and assign it the routing device role in the abstract network. Control devices with potential connection links (e.g., those above a defined quality threshold) where the control device is identified as being eligible for the routing device role in the abstract network can then be assigned connections to that routing device and added to the connected list (e.g., devices considered connected). This is described in more detail in this document regarding FIGS.5A-5C, the system controller can continue assigning the routing device role to control devices and connecting them to routing devices in the abstract network until no more devices remain disconnected. For example, the system controller can identify control devices (e.g., control devices in the list of connected control devices) that have potential connection links exceeding the defined quality threshold with the largest number of unconnected devices and assign those control devices to the routing device role. This will allow control devices with the highest quality network communication links to the largest number of other devices to act as routing devices in the network.The system controller can then consider each of the control devices that have potential binding links to the routing devices as connected devices in the abstract network and define a connection between those control devices and at least one of the routing devices. The system controller can continue identifying routing devices and connected devices in the abstract network to define connections to any remaining unconnected devices. For example, the system controller can identify unconnected devices that have potential suitable connections (for example, secondary connections, as described later in this document) to a control device already assigned to the routing device role. These potential suitable connections may fall below a first quality threshold, but they can still be considered suitable connections because they may still exceed a second, lower quality threshold. The system controller can then assign one or more of these unconnected devices with potential suitable connections to the routing device role, thus making them considered connected devices in the abstract network.The system controller can then consider each of the unconnected devices that have potential suitable connection links to those routing devices (for example, control devices that have potential suitable connections to a control device already assigned to the routing device role) as connected devices in the abstract network. The system controller can define connections between routing devices that have potential suitable connections to other routing devices and control devices that have potential mating links that are above the quality threshold defined with that routing device in the abstract network, and can consider those other control devices as connected devices. If there are unconnected control devices that do not have a potential primary or secondary connection to any of the connected devices in the abstract network, the system controller can assign connected control devices with a tertiary connection to one or more of the unconnected devices to act as routing devices. For example, a tertiary connection might be represented by a communication quality metric that is lower than the communication quality metric for secondary connections. The tertiary connections for each control device might include control devices that have below-average connections with that particular control device.Control devices with tertiary connections to one or more unconnected devices can be uplinked to routing devices located in problematic areas for network communication. The system controller can define connections between the new routing device and the unconnected devices that have tertiary connections to the new routing device, and can consider those other control devices as connected devices. These routing devices (e.g., new routing devices with tertiary connections to other control devices) can be placed in parts of the network where the noise source is strongest, and can be used to intentionally replenish routing devices in these potentially more problematic areas of the network around a noise source. The system controller can continue identifying control devices to be assigned to the routing device role in the abstract network and add other control devices that have network communication links with these control devices that exceed the defined quality threshold to the connected list until no more disconnected devices remain. When no more disconnected devices remain, the system controller can assign one or more additional control devices to the routing device role, for example, until at least a minimum number of routing devices remain in the network. For instance, the system controller can be configured to assign additional routing devices in parts of the network where the noise source is stronger.By identifying connected control devices that have a tertiary connection to unconnected devices, the system controller can also mark other nearby control devices as potential candidates for upgrade to the routing device role. The system controller can then choose from the marked control devices when determining additional control devices to assign to the routing device role. Identifying control devices to be assigned to the routing device role in this way can cause certain control devices assigned to the routing device role to be grouped or stacked around the noise source, which, as described herein, can counteract the degradation of communication quality in a network or communication link caused by noise sources. After the list of connected devices is complete (for example, no more disconnected devices remain), the system controller can transmit the optimized network data (for example, defining the control devices to be assigned to the leader or routing device role) to the control devices on the network. The optimized network data can then be used to weight the control devices assigned to the leader or routing device role. ML / t / ZUZÓ / UUΊ fóó routing device in favor of becoming a leading device or routing device, respectively. The roles of certain control devices in a network can be updated or changed to accommodate optimized network data. For example, in certain cases, a control device previously assigned the leader role can be reverted to the router or end device role. The leader device can send a message (for example, a leader abdication message) indicating to other devices that the leader device can be demoted and / or specifying when the leader device should be demoted. The message can also indicate which control device is assuming the leader role. A control device assigned the routing role can be similarly upgraded to the leader role or reverted to the end device role.For example, a message informing another device of the updated device function might be multicast across the network (e.g., multicast to every device on the network). The message might also include a time when the updated device function will take effect. Furthermore, a control device assigned to the end device role can be upgraded to the leader device and / or routing device role based on optimization data. When a control device is upgraded to the leader device role, for example, the leader device can transmit (for example, via unicast) a message (for example, a leader abdication message) to the control device indicating that the control device will assume the leader role. When the control device is upgraded to the routing device role, the leader device can transmit (for example, via unicast) a message indicating that the control device will be upgraded to the routing device role. This message can also include the router identifier assigned to the control device. Figure 3 illustrates a sequence flow diagram 300 showing examples of messages transmitted between a system controller 302 and lighting devices 304a, 304b. The system controller 302 and the lighting devices 304a, 304b can be connected to a network that allows the system controller 302 and the lighting devices 304a, 304b to communicate with each other (for example, a network similar to networks 200, 200a, 200b, 200c and / or network partitions 201, 202, 203). The system controller 302 and the lighting devices 304a, 304b can be assigned roles on the network, as described in this document. System controller 302 can activate a router optimization mode, which, as described in this document, can be used to assign the functions of control devices on a network. Function assignment can be a reassignment of functions after they have already been established. For example, system controller 302 can transmit a message (e.g., a router optimization mode message) 306 to activate lighting devices 304a and 304b to enter router optimization mode. System controller 302 can transmit the router optimization mode message 306 to lighting devices 304a and 304b as a unicast message, a multicast message, and / or a broadcast message. Although not illustrated in Figure 3, system controller 302 can also transmit the router optimization mode message to additional devices.Alternatively, another device initiates a router optimization mode and / or transmits router optimization messages. After receiving an optimization mode message from the router, a control device can transmit one or more optimization messages. For example, after receiving router optimization mode message 306 from system controller 320, lighting device 304a can transmit optimization message 308. Optimization message 308 can include an indication of the optimization message source (for example, a unique source identifier, such as a network address). As illustrated in FIG. 3, lighting device 304a can transmit optimization message 308 (for example, as a unicast, multicast, or broadcast message) to other devices on the network, such as system controller 302 and lighting device 304b, as illustrated in FIG. 3. Although not shown in FIG.3, the 304a lighting device can transmit optimization messages to additional devices. A control device that receives an optimization message from another control device can measure and store a communication quality metric of the optimization message along with an indication of the device that transmitted the optimization message (for example, the network address). A communication quality metric might include, for example, a Received Signal Strength Identifier (RSSI) of the received optimization message. The communication quality metric might include the received signal strength identifier of the optimization message minus a background noise value from the background noise at the control device (for example, the difference between the received signal strength identifier and the background noise). Alternatively, the communication quality metric might also include a link quality value (for example, an inbound link quality or an outbound link quality).The communication quality metric can be calculated for each optimization message received, or it can be averaged for multiple optimization messages received over time. In 310, the lighting device 304b can measure and store the communication quality metric of the optimization message 308 transmitted by the lighting device 304a. In 312, the system controller 302 can measure and store the communication quality metric of the optimization message 308 transmitted by the lighting device 304a. The communication quality metric of the optimization message 308 can be measured and stored in the system controller and the lighting device 304b for each device to identify the quality of communications received from the lighting device 304a. In addition to the communication quality metric, the lighting device 304b and the system controller 302 can store an indication of the source of the optimization message, such as a network identifier for the lighting device 304a. In response to the optimization mode message from router 306, lighting device 304b can transmit an optimization message 314, which includes its network identifier, to lighting device 304a and system controller 302. Lighting device 304b can then transmit the optimization message 314 (for example, as a unicast, multicast, or broadcast message) to other devices on the network, such as system controller 302 and lighting device 304a. Again, although not shown in Figure 3, lighting device 304b can also transmit optimization messages to additional devices. In 318, lighting device 304a can measure and store the communication quality metric of the optimization message 314 transmitted by lighting device 304b.In 316, the system controller 302 can measure and store the communication quality metric of the optimization message 314 transmitted by the lighting device 304b. The communication quality metric of the optimization message 314 can be measured and stored in the system controller and the lighting device 304a for each device to identify the quality of communications received from the lighting device 304b. In addition to the communication quality metric, the lighting device 304a and the system controller 302 can store an indication of the source of the optimization message, such as a network identifier for the lighting device 304a. The device that initially transmitted the router optimization mode message can also transmit an optimization message to other control devices. For example, system controller 302 can transmit optimization message 320 to lighting devices 304a and 304b. In step 324, lighting device 304a can measure and store the communication quality metric of optimization message 320 transmitted by system controller 302. In step 322, lighting device 304b can measure and store the communication quality metric of optimization message 320 transmitted by the system controller. The communication quality metric of optimization message 320 can be measured and stored in lighting devices 304a and 304b so that each device can identify the quality of the communications received from the system controller. 302. In addition to the communication quality metric, lighting devices 304a, 304b can store an indication of the optimization message source, such as a network identifier for system controller 302. Although the flowchart shows system controller 302 transmitting a separate optimization message 320 that can be transmitted and measured on lighting devices 304a, 304b to identify the quality of communications transmitted by system controller 302, lighting devices 304a, 304b can measure and store a communication quality metric of the router optimization mode message 306 that is transmitted from system controller 302 to initiate the router optimization procedure. As described herein, control devices that receive optimization messages can aggregate the communication quality metrics of the received optimization messages and generate optimization data. The optimization data for a given control device can indicate the number of control devices from which optimization messages are received and the quality of the network links over which the optimization messages are received. For example, the optimization data might include the network addresses for each control device from which an optimization message has been received and the corresponding communication quality metrics for the optimization message received from that control device. After generating the optimization data, a control device can transmit the optimization data to another control device for processing and analysis. The control device to which the optimization data is transmitted can be the same control device that transmitted the router optimization mode message or another control device. As shown in FIG. 3, lighting device 304a can transmit optimization data 328 to system controller 302. Optimization data 328 can include the network identifier of lighting device 304b and the network identifier of system controller 302, each with a respective communication quality metric from the optimization messages 314 and 320 received from device 304b and system controller 302. Lighting device 304b can also transmit optimization data 326 to system controller 302.Optimization data 326 may include the network identifier of lighting device 304a and the network identifier of system controller 302, each with a respective communication quality metric from optimization messages 308, 320 received from lighting device 304a and system controller 302. System controller 302 may have its own optimization data stored in memory, which includes the network identifier of lighting devices 304a, 304b, each with a respective communication quality metric from optimization messages 308, 314 received from lighting devices 304a, 304b. In 330, the system controller 302 can process optimization data, for example, to determine the number of highest-quality communications experienced by a device. For instance, the system controller 302 can process communication quality metrics within the optimization data to determine which control devices will be assigned as lead devices in the network. The system controller 302 can transmit updated network data 332a and 332b to lighting devices 304a and 304b. This updated network data 332a and 332b can include a router list containing a list of control devices to be assigned as routing devices in the network. The updated network data 332a and 332b can be sent as a broadcast or multicast message to lighting devices 304a and 304b.Updated network data 332a and 332b can be sent as unicast messages to lighting devices 304a and 304b, specifying the function of each device. After receiving the updated network data 332a and 332b, the lighting devices 304a and 304b can update their respective functions as indicated in the updated network data 332a and 332b. Although FIG. 3 illustrates an example of three devices (e.g., system controller 302, and lighting devices 304a, 304b) transmitting messages during a router optimization procedure, an optimization procedure can be carried out by any number of devices. Furthermore, although FIG. 3 illustrates an example in which each device transmits a single optimization message, each device can transmit and measure, respectively, multiple optimization messages, which can increase the accuracy of the network data generated by system controller 320. Router optimization messages can also, or alternatively, be transmitted at periodic intervals (e.g., with slight randomization). For example, a router optimization procedure can be triggered periodically (e.g., triggered at regular intervals). The procedure illustrated in FIG.3 can be an optimization data collection period, which may include the time period during which devices on a network transmit, receive, and measure multiple optimization messages. As described herein, a control device can enter a router optimization mode, for example, based on the receipt of a router optimization mode message. Although the system controller 302 can be described as the control device that can activate router optimization mode in other control devices and / or process optimization data, other control devices can be implemented similarly. For example, a lighting device or other control device can be implemented in the system to activate optimization mode and / or process the data. ML / E / ZuZo / uuZo optimization fóó. In another example, a network configuration device can be implemented to activate optimization mode and / or process optimization data, as described herein. Router optimization mode can be activated multiple times. For example, router optimization mode can be initiated or entered first by a device in a load control system (such as a system controller, like system controller 100 of load control system 100, and / or the network configuration device). After the first router optimization mode is complete, subsequent router optimization mode entries can be initiated by a second control device in the load control system. For example, the second control device could be a control device assigned a specific function in the network (such as a control device assigned the lead device role). Figure 4 is a flowchart of an example of procedure 400 for collecting optimization data to optimize the selection of routing devices in a network (e.g., networks 200, 200a, 200b, 200c, and / or network partitions 201, 202, and 203). Procedure 400 can be executed by one or more control devices in a load-control system that is attached to or connected to the network (e.g., each leader device, routing device, and / or end device) as part of a router optimization procedure. For example, each of the network's control devices can execute procedure 400, or parts of it, simultaneously to collect optimization data. The control devices can be part of a load-control system (e.g., load-control system 100). The control device can initiate procedure 400 to 402, and the control device's control circuitry can enter router optimization mode at 404. The control device's control circuitry can initiate procedure 400 to 402 in response to receiving a router optimization mode message at 402. The router optimization mode message can be transmitted by a network device directly to the control devices or to a load-control system controller (e.g., system controller 110, 302) to cause the system controller to transmit the router optimization mode message to the control devices on the network. Alternatively, the router optimization mode message can be transmitted by a network configuration device.A user of the load control system can initiate the router optimization procedure using an application running on a network device (for example, the 190 mobile device or another suitable network device, such as a personal computer). The user can initiate the router optimization procedure after introducing a noise source (for example, a wireless access point (WAP)) into the system. ML / E / ZuZo / uuY fóó the network that can cause network communication problems in the control devices. Also, or alternatively, the router optimization procedure can be initiated periodically (for example, by the device assigned to the lead device role). In one example, the introduction of a noise source into the network (for example, a wireless access point (WAP)) can cause network communication problems in the control devices, and the device functions can be updated to optimize device locations with respect to the noise source to improve network communications. The user can also, or alternatively, initiate the router optimization procedure in response to receiving network information on the mobile device. For example, before entering the router optimization procedure on 402, the mobile device running the application or system driver (e.g., via mobile device startup) can send a message to the control devices to query them for network information that may indicate the quality of network communications and / or whether the control devices are experiencing communication problems.For example, the query might request network information from the control devices, such as recent messages received on the control devices over a period of time, the communication link quality, the communication link cost, background noise on the control devices, and / or other network information that might indicate the communication quality on the control devices. In response to receiving this network information, the user or the mobile device might decide to initiate procedure 400 in an attempt to improve network communications. For example, the user might initiate procedure 400 on the mobile device to have the mobile device send the router optimization mode message on 402.A user can initiate the router optimization procedure when the control devices do not receive messages that have been transmitted on the network, the quality of a communications link is below a threshold, the cost of a communications link is above a threshold, or background noise on the control devices is above a threshold. The control circuit of the control device can initiate the router optimization procedure itself (for example, when the control device is a system controller). The control circuit can also be configured to initiate the router optimization procedure periodically (for example, every 20 minutes), allowing it to periodically assess the quality of network communications and correct the router's location if any communication problems arise. For example, the control circuit can initiate the router optimization procedure by periodically transmitting a router optimization mode message on port 402 to other control devices within its communication range on port 406. In 408, the control circuit of the control device can store a unique identifier and a communication quality metric for each optimization message received in memory in 406. For example, the communication quality metric might indicate the signal strength at which an optimization message was received. The communication quality metric might comprise, for example, a Received Signal Strength Identifier (RSSI) of a received optimization message compared to background noise at the control device (e.g., the difference between the RSSI and the background noise). The communication quality metric might be time-averaged (e.g., the difference between a time-averaged value of the Received Signal Strength indicators of optimization messages received from a particular control device and the background noise).Additionally, or alternatively, the communication quality metric may comprise a link quality or a link quality indicator (e.g., inbound link quality or outbound link quality). The control device's control circuitry may continue to store the unique identifiers and communication quality metrics of received optimization messages in memory 408 until optimization data collection is complete in 410. For example, the control device may collect optimization data for a predetermined period of time, and / or another control device (e.g., the system controller, the mobile device, and / or another control device on the network) may transmit a message to the control device to stop it from collecting optimization data.When the optimization data collection is complete in 410, the control device can transmit the optimization data to the system controller in 412, and procedure 400 can be completed in 414. The system controller can use the optimization data (for example, generated using procedure 400 in FIG. 4) to form an abstract or virtual network. The abstract or virtual network can then define the optimal connections and / or roles of the control devices in the network based on the optimization data. For example, the abstract network can define connections (for example, representing possible attachments in a network communication link) between the control devices, which can be used to assign lead and / or routing devices.As described in this document, the system controller can be configured to use the abstract network (for example, the control devices identified to be assigned to the leader or routing device role and / or the connections established between each of these control devices based on their respective assigned functions) and / or the optimization data on which the abstract network is based, to generate optimized network data. The optimized network data can define the optimized control devices to be assigned to the leader or routing device role. The optimized network data can then be used to optimize the selection of leader and routing devices in a network. Figures 5A and 5B are flowcharts of an example of procedure 500 for optimization data processing to optimize the selection of a leader device and routing devices in a network (e.g., networks 200, 200a, 200b, 200c and / or network partitions 201, 202, 203). Procedure 500 can be executed by a control device in a load control system that joins or connects to the network (e.g., one of the leader devices, routing devices, and / or terminal devices) as part of a router optimization procedure. For example, procedure 500 can be performed by a control device assigned the role of leader device. Procedure 500 can also, or alternatively, be performed by another device in a load control system.For example, procedure 500 can also, or alternatively, be performed by a system controller, such as the system controller 100 of the load control system 100, and / or a network configuration device. Procedure 500 can be performed multiple times, and the control device performing procedure 500 can be changed in subsequent invocations of procedure 500. For example, a first device (for example, the system controller and / or network configuration device) can perform the first invocation of procedure 500, and another device (for example, the control device assigned to the lead device role, which, as described in this document, can change over time) can perform subsequent invocations of procedure 500. As further illustrated in Figures 5A and 5B, procedure 500 can be used to construct the abstract or virtual network that defines the optimal connections and / or roles of the control devices based on the optimization data. As described herein, when procedure 500 is first started, each of the control devices can be considered as unconnected. For example, the control circuit of the system controller or another device performing the optimization procedure can initialize each of the control devices as unconnected in the abstract or virtual network.During procedure 500, the system controller can create a router list of control devices that the system controller has determined will be assigned and operated as routing devices, and a connected list of control devices that have been determined to have a connection to at least one other control device in an abstract or virtual network. The router list of control devices and the connected control device list can be used to represent the abstract or virtual network that defines the optimal functions of the control devices and / or the connections (for example, potential accessories) between each of the control devices in the network. Using procedure 500, control devices can be added to the router's control device list or to the connected control device list.As described in this document, control devices added to the connected control device list can be considered connected devices (i.e., they are no longer considered unconnected devices). The system controller can continue adding control devices to the connected control device list until there are no more unconnected devices. Although procedure 500, or other procedures described in this document, may be described as being implemented by the system controller, other control devices and / or the network configuration device may implement the procedures, or parts of the procedures, described in this document. The control device that performs the procedure may be predefined (for example, predefined as the system controller or another control device) or selected before executing procedure 500. For example, the control device that performs procedure 500 may be selected during network formation (for example, the control device that is determined to be assigned the lead device role based on network optimization data, as described in this document).In certain scenarios, procedure 500 may be performed multiple times (for example, periodically and / or in response to a specific trigger), and a different control device may perform procedure 500 during subsequent executions. Furthermore, the different control device may be a control device assigned a specific role in the network. For example, the control device assigned the lead device role in the network may perform procedure 500 or other procedures described in this document. And, because in certain cases the control device assigned the lead device role may change over time, the control device that performs procedure 500, or other procedures described in this document, may also change over time (for example, as the control device assigned the lead device role changes with network changes). The system controller's control circuit can initiate procedure 500 at 502 and receive optimization data from the control devices (e.g., each individual control device) on the network via a communication circuit. Referring to Figure 4, the optimization data received from the control devices can be similar to the optimization data transmitted at 410 of procedure 400. The system controller's control circuit can also combine optimization data stored by the system controller during procedure 400 with the optimization data received from the other control devices at 504.Optimization data may include communication quality metrics, such as received signal strength indicators (RSSI) and / or other communication quality metrics, which define the quality of network communication links (e.g., primary-secondary attachment links, and / or other network links) between the various control devices in the optimization data. In 506, the system controller's control circuitry can balance optimization data to limit it to inter-device connections in the worst-case scenario. For example, optimization data might include a first communication quality metric for optimization messages transmitted by a first control device and received by a second control device on a network communication link, and a second communication quality metric for optimization messages transmitted by the second control device and received by the first control device on the network communication link.The system controller can compare the communication quality metrics for the first and second control devices and identify the worst-case communication quality metric (e.g., smallest received signal strength indicator, smallest received signal strength indicator above the noise level, lowest link quality, highest link cost, or other worst-case communication quality metric). The system controller can then limit the communication quality metric for both the first and second control devices to the worst-case communication quality metric of the first and second communication quality metrics at 506. In 508, the system controller's control circuitry can generate a preferred connection list for each control device in the optimization data. This preferred connection list for each control device can include a list of devices that have the best (for example, higher than a defined threshold for the preferred connection list) network communication links with that particular control device. For instance, when generating the preferred connection list for each control device, the system controller can include the unique identifiers of other control devices in the preferred connection list that have a potential connection to the control device characterized by a communication quality metric exceeding a preferred target quality threshold.The preferred connection list for each control device can also be ranked or weighted, or alternatively, as described later in this document. For example, the preferred connection list for each control device can rank or weight each device from those with the best network communication links to a particular control device to those with the worst network communication links to that particular control device (e.g., to indicate the relative strength of the communication each control device has with the control device). That is, the preferred connection list can identify which devices experience better connections with a respective control device than other devices.For example, a higher weighting might indicate a higher communication quality metric for a potential connection to a device, and a lower weighting might indicate a lower communication quality metric for that connection. The preferred target quality threshold might be a predefined received signal strength threshold. The preferred target quality threshold might be a predefined received signal strength relative to the background noise at the control device (for example, at least zero decibels or higher after subtracting background noise). The preferred target quality threshold might be a predefined link quality. The preferred target quality threshold might be a predefined target quality threshold. After generating preferred connection lists for each control device, the system controller can have a preferred connection list for every control device, including the system controller itself. This can give the system controller an understanding of which control devices have the most preferred connections to the system controller and other control devices in the system. Figure 5C provides examples of five preferred connection lists (560, 562, 564, 566, 568) that can be generated in the system controller's control circuit and stored in memory using optimization data received from the control devices, although the number of preferred connection lists generated in a system controller can vary. In 510, the system controller's control circuit can select a leading device from the optimization data using the preferred connection lists generated for each control device in 508. When selecting the leading device in 510, the control device can choose the control device that has the most other control devices in its preferred connection list. For example, as shown in the sample preferred connection lists in 560, 562, 564, 566, and 568, the system controller can select Control Device 2 as the leading device, since Control Device 2 has the most other control devices in its preferred connection list of any of the other control devices, including the system controller.If the system controller itself has the largest number of control devices in its preferred connections list, the system controller can select itself as the leading device. Since the system controller may be centrally located within the network, the system controller may choose one of the control devices from its own preferred connection list to be the leading device. For example, the system controller may select the control device in its own preferred connection list (e.g., the system controller's preferred connection list illustrated in Figure 560) that has the most other control devices in the selected control device's preferred connection list (e.g., the selected control device's preferred connection list) to be the leading device in the network in Figure 510. As illustrated in Figure 510.5C, Control Device 2 can be selected as the lead device because Control Device 2 is on the system controller's preferred connection list and has the most other control devices on its preferred connection list between Control Device 2 and Control Device 3. The system controller can add the selected control device to the router list in 512. The selected control device (for example, Control Device 2) can be selected as a device to which the role of a routing device in the network is assigned.The system controller can add the selected control device (for example, Control Device 2) and the control devices in its preferred connections list (for example, System Controller, Control Device 1, and Control Device 3) to the connected list in 514 (for example, so that the selected control device and the control devices in its preferred connections list are no longer unconnected devices). The system controller can first identify a minimum number of control devices with connections exceeding a defined quality threshold, along with the largest number of other control devices, to be assigned the routing device role. In 516, for example, the system controller's control circuitry can select a control device from the connected list that has the most disconnected control devices in its preferred connections list to be a routing device. As shown in the example preferred connections lists 560, 562, 564, 566, and 568, the system controller can select Control Device 3 as the device in the connected list that has the most disconnected control devices (for example, Control Device 4) in its preferred connections list.In 518, the system controller can add the selected control device to the router list and add the selected control device and the control devices in the preferred connections list for the selected control device to the connected list. For example, Control Device 3 can be added to the router list. Control devices in the preferred connections list for Control Device 3 that have not yet been added to the connected list (for example, Control Device 4) can be added to the connected list. If there are more control devices in the connected list that have unconnected control devices in their preferred connection list on 520, the system controller's control circuitry can once again select a control device in the connected list that has the most unconnected control devices in its preferred connection list to be a routing device on 516. For example, since Control Device 3 is in the connected list and has the most unconnected control devices in its preferred connection list (for example, Control Device 4), Control Device 3 can be added to the router list so that it is assigned the role of a router device on the network. When there are no more control devices in the connected list that have unconnected control devices in their preferred connections list at 520, but there are still unconnected devices at 522, the system controller can search for control devices that have a secondary connection to one of the control devices in the router list. For example, a secondary connection might be represented by a communication quality metric that is lower than the communication quality metric for preferred connections. Control devices that have secondary connections to each control device might include control devices that have proper connections to that particular control device.For example, when secondary connections are identified for each control device, the system controller can identify the unique identifiers of other control devices that have a potential connection to the control device characterized by a communication quality metric that exceeds a secondary target quality threshold. The secondary target quality threshold can be a predefined threshold of received signal strength that is worse than the preferred target quality threshold (for example, associated with a lower communication metric or link quality than the preferred target quality threshold). The secondary target quality threshold can be a predefined received signal strength relative to the background noise at the control device (for example, less than zero decibels, but greater than -10 decibels after subtracting background noise).The secondary target quality threshold can be a predefined link quality that is worse than the preferred target quality threshold. The secondary target quality threshold can be lower than the preferred target quality threshold. The system controller's control circuit can select an unconnected control device to be a routing device in 524, where the selected control device has a secondary connection to one of the control devices in the router list. In 526, the system controller's control circuit can add the selected control device to the connected list. In 528, the system controller can check if there are any control devices in the connected list that have unconnected control devices in their preferred connection list (for example, if the control device that was just added to the connected list in 526 has control devices in the preferred connection list).If so, the system controller's control circuitry can select a control device in the connected list that has the most disconnected control devices in its preferred connections list (for example, the control device that was just added to the connected list at 516) to be a routing device at 516. The system controller can then add the selected control device to the routers list and add the selected control device and the control devices in the preferred connections list for the selected control device to the connected list at 518.If there are no control devices in the connected list that have unconnected control devices in their preferred connections list in 528 (for example, if the control device that was just added to the connected list in 526 does not have any control devices in the preferred connections list), but there are unconnected control devices that have a secondary connection to one of the control devices in the routers list in 530, the system driver can select one of the unconnected control devices to be a routing device in 524. If there are no unconnected control devices with a secondary connection to one of the control devices in the router list at 530, but there are still unconnected control devices at 532, the system controller's control circuitry can select a control device from the connected list (for example, a selected connected device) to be a routing device. This selected control device has a tertiary connection to an unconnected control device (for example, a selected unconnected device). For example, a tertiary connection might be represented by a communication quality metric that is lower than the communication quality metric for secondary connections. The tertiary network links for each control device might include control devices with below-average connections to that particular control device.Control devices that have tertiary connections to one or more unconnected devices may be promoted to routing devices located in a problematic area for network communication. When tertiary connections are identified for each control device, the system controller can identify the unique identifiers of other control devices that have a potential connection to the control device characterized by a communication quality metric exceeding a tertiary target quality threshold. The tertiary target quality threshold can be a predetermined received signal strength threshold that is worse than the secondary target quality threshold.The tertiary target quality threshold can be a predefined received signal strength compared to the background noise at the control device (for example, less than -10 decibels, but greater than -100 decibels or less after subtracting background noise). The tertiary target quality threshold can be a predefined link quality that is worse than the preferred target quality threshold. The tertiary target quality threshold can be a predefined target quality threshold that is worse than the secondary target quality threshold. A tertiary target quality threshold can be omitted, as tertiary connections can be worse than secondary connections. In version 536, the system controller can add the selected connected device to the router list and add the unconnected device that has a tertiary connection to that device to the connected list. In 538, the system controller's control circuitry can begin selecting control devices as candidates for upgrade to routing devices. As described herein, the control devices selected as candidates can include connected devices that have secondary or tertiary connections to the unconnected device selected in 534 (for example, the unconnected device that has a tertiary connection to one of the connected devices). For example, after selecting routing devices as described herein, the system controller can begin selecting non-router control devices from the connected list as candidates for upgrade.For example, control devices selected as support candidates might be potential routing devices to support some of the weakest connections in the network to the selected routing devices (for example, tertiary connections to newly added routing devices). Support candidates can be chosen so that they are grouped around control devices with tertiary connections to connected devices. By grouping support devices (for example, devices that have been upgraded to the routing device role) around these weaker connections, you can increase the likelihood that a device will receive messages (for example, multicast or broadcast messages). Each support candidate can be assigned a weight. For example, support candidates can be weighted so that those with secondary connections to the selected unconnected device (534) have a higher weight than those with tertiary connections. For instance, support candidates with a secondary connection to the selected unconnected device (534) could be assigned a weight of 0.5, while those with a tertiary connection could be assigned a weight of 0.25. This weighting helps in selecting routing devices that can best support control devices with weaker connections and / or the largest number of control devices with weaker connections.And the supporting candidates may be clustered around the control devices with the weakest connections. Support candidates can have potential connections to the selected control device characterized by communication quality metrics that meet the primary target's quality threshold, the secondary target's quality threshold, or the tertiary target's quality threshold (if implemented). The system controller can assign weight numbers to support candidates in 538. The weight numbers can be based on a value representing the amount of target connectivity deficit for the selected device. The value can also be assigned to support candidates based on their potential ability to correct that deficit. The value can be added to the weight number each time the system controller executes 538, so that the weight numbers represent a cumulative amount that each support candidate can help other control devices communicate on the network.At 540, the system controller can check if there are any control devices in the connected list that have unconnected control devices in their preferred connections list. If so, the system controller's control circuitry can select a control device in the connected list that has the most unconnected control devices in its preferred connections list to be a routing device to 516. If there are no control devices in the connected list that have unconnected control devices in their preferred connections list to 540, but there are unconnected control devices that have a secondary connection to one of the control devices in the router list at 542, the system controller can select one of the unconnected control devices to be a routing device to 524.If there are no disconnected control devices that have a secondary connection to one of the control devices in the router list at 542, but there are still disconnected control devices at 544, the system controller can select a control device from the connected list to be a routing device, where the selected control device has a tertiary connection to one of the disconnected control devices at 534. When there are no more disconnected control devices in ports 522, 532, and 544, the system controller can determine if there are more routing devices to assign in port 546. For example, the system controller's control circuitry might determine that there are additional routing devices that can be assigned on the network. If there are more routing devices to assign in port 546 and there are control devices that have been designated as support candidates in port 548, the system controller's control circuitry can select the support candidate with the highest weighting number to be a routing device in port 550, and can add the selected control device to the router list in port 552. If there are more routing devices to assign to 546, but there is no support candidate at 548, the system controller's control circuit can select one of the control devices that was a routing device in the network before the router optimization procedure is executed (for example, and is not in the router list at that time) to be a routing device at 554, and can add the selected control device to the router list at 552. Routing devices in the network can be stored with their function in the system controller before the implementation of the optimization procedure.When there are no more routing devices to assign on 546, the system controller can transmit optimized network data to the control devices on 556 (for example, via unicast, multicast, and / or broadcast messages), and procedure 500 can exit on 558. The optimized network data can indicate the control devices that have been assigned as routing devices in the router list to optimize network communications. The optimized network data can indicate the control device that was assigned as the lead device in the router list. For example, the optimized network data can include the unique identifier of the control device that was assigned as the lead device in the router list. The optimized network data can include the unique identifier of the control devices that are assigned as routing devices.Control devices can determine whether to upgrade, downgrade, or maintain their network function based on their identifiers in the router list. For example, control devices that identify their unique identifier in the router list can function as routing devices, while control devices that fail to identify their unique identifier in the router list can function as terminal devices. Optimized network data can then be used to weigh the roles of control devices assigned as either leading or routing devices, favoring their upgrade to a leading or routing role, respectively.Additionally, or alternatively, devices designated as routing devices can report this assignment during a subsequent invocation of the optimization procedures described herein (for example, in the optimization data transmitted by that device). In response to receiving this optimization data, the system controller (for example, another device performing the optimization procedures described herein, such as the lead device) can determine to upgrade that device accordingly. The system controller, in response to receiving optimization data, can determine whether to upgrade a given device that is determined to be assigned the routing device role. In making this determination, the system controller can, for example, consider one or more of the following: It can consider whether the device is already assigned the routing device role. It can consider whether the device is already configured as the primary device for one or more end devices. It can consider the number of end devices connected to the device. In addition, one or more messages can be sent to control devices on the network to indicate which control devices have been assigned as routing devices, which control device has been assigned as a leader device, and / or which control devices have been demoted from the routing or leader device role based on optimized network data. As described in this document, these messages can also indicate when these role updates will be implemented. In response, the control devices on the network can update their respective roles accordingly. Furthermore, control devices connected to the control devices that are being demoted from routing devices to end devices can initiate connection procedures.As described in this document, by the time these control devices cease to be a router device and begin their connection procedures, the control devices that have been assigned as routing devices may have already updated their roles, which may allow the control device to couple the optimal routing devices based on the optimized network data. Figure 6 is a flowchart of an example of procedure 600 that can be performed on a control device to determine its role in a network (e.g., networks 200, 200a, 200b, 200c, and / or network partitions 201, 202, and 203). Procedure 600 can be executed by a control device in the network (e.g., one of the leading devices, routing devices, and / or end devices) as part of a router optimization procedure. For example, procedure 600 can be executed by a control device in a load-control system (e.g., system controller 110 of load-control system 100) after the system controller assigns the control devices to the router list (e.g., as shown in procedure 500 in Figure 5).During procedure 600, the control device can determine its function and operate in accordance with that function as described herein. The control circuit of the control device can initiate procedure 600 at 602 and identify the optimized network data received from the system controller or another control device on the network at 604. Procedure 600 can be activated at 602 by the control circuit upon receiving a message via the communication circuit that includes the optimized network data. The optimized network data may indicate the lead device and / or routing devices that have been assigned by the system controller or another control device on the network. For example, the optimized network data may include the router list or an indication of the unique identifiers (e.g., network identifiers) of the control devices that have been assigned as routing devices in the router list. In step 606, the control device can determine whether it is currently assigned as a routing device in the network. If the control device is currently assigned a different role in the network (for example, as an end device), the control device can determine in step 610 whether it is assigned as a routing device in the optimized data. If the control device is not assigned as a routing device in the optimized network data, then step 600 can terminate, allowing the control device to retain its current role (for example, as a terminal device) in the network.If the control device is assigned as a routing device using optimized network data in 610, then the control device can update its role in 614 to become a routing device and begin operating as such, as described herein. For example, the control device can send a router request message to the leader device to become a routing device on the network. The leader device can then add the control device to its router table and begin advertising and operating as a router, as described herein. One of the control devices can be assigned as the lead device in the optimized network data. In 610, the control circuit of the control device can determine from memory which role of lead device in the optimized network data is assigned. If the control device is assigned the role of lead device in the optimized network data, the control device can upgrade its function to lead device in 614 (for example, from a routing device or an end device). The control device can wait for the current leader device to identify that it is not assigned the leader device role in the optimized network data and transmit an indication that it is demoting its role. For example, the current leader device can send a leader abdication message through its communication circuit, which can be received by the control device before it upgrades to the leader device role in step 614. The leader abdication message can indicate to the control device that the leader device is relinquishing its position as leader device, and the control device can assume the leader device functions. After the control device upgrades to leader device in the network, it can assume the responsibilities of the leader device in the network. For example, the control device will begin transmitting advertising messages as the lead device and will perform the other lead responsibilities described in this document. If, in step 606, the control device's control circuit determines that it is currently assigned the role of a routing device in the network, the control device's control circuit can determine in step 608 whether it is assigned as a routing device in the optimized network data. If the control device is currently assigned as a routing device and is assigned as a router in the optimized network data, the control device can remain a routing device in the network, and step 600 can terminate. If the control device is currently assigned the role of a routing device in the network but is not assigned the role of a routing device in the optimized network data, the control device can downgrade its role to an end device in step 612.The control device can also multicast a message indicating that it should be demoted to the end device role, which, as described herein, can allow end devices connected to the control device to initiate connection procedures with an optimal routing device based on optimized network data. When a router is downgraded to a terminal device, its control circuit can send a router release message to the leader device via the communication circuit, prompting the leader to release it from the router table. The router release message can be sent as a unicast message directly to the leader device or as a multicast message. The router release message can include the unique identifier of the routing device (e.g., the router ID or another unique identifier) to be released from the router table. The leader device can receive the router release message and release the control device from the router table. Alternatively, the leader device can remove the router ID from the control device's router table.Receiving the router release message on the leader device can allow the leader device to proactively release the control device from the router table before the control device leaves the network, or allow the leader device to wait to determine that the control device has been lost due to a lack of responsiveness, which will allow the leader device to update the router table and / or bitmap before having to wait a period of time to determine that the control device has been lost as a routing device. Proactively removing the router's control device from the router table and / or bitmap will allow end devices to identify the loss of their router from the network sooner. They will receive the updated router table and / or bitmap and attempt to connect to another routing device (such as the primary or auxiliary primary device) without having to wait for a period of time to determine that their router has been lost due to a lack of response. Upon receiving the router release message, the lead device can broadcast an advertisement message that includes the updated router table containing the bitmap indicating that the identified router has been removed from the network.Routing devices in the network can relay the advertisement message until it reaches every routing device and end device in the network. An end device that is secondary to the control device removed from the router table can, upon receiving the advertisement message (for example, from a primary router, a secondary primary router, or another router), identify that its primary routing device is no longer a routing device and send a primary request message to another routing device in the network. The control device can be assigned the role of a leader device and can either maintain its function or downgrade its function based on the leader device's indication in the optimized network data.In section 608, the control device can currently be assigned the role of leader device in the network and determine that it should be assigned the role of leader device in the optimized network data. In this case, the control device can maintain its role as leader device in the network. In another example, the control device can currently be assigned the role of leader device and determine, in section 608, that it has been assigned the role of a router or terminal device in the optimized network data and can demote its role. If the control device is currently assigned the role of leader device and is assigned the role of terminal device in the optimized network data, the control device can demote its role to a routing device from the leader device and then demote its role to a terminal device from the routing device. If the control device is downgraded from a leader device to a router device, the leader device can identify the next leader device to assume control as the leader device. For example, the control device can be downgraded from a leader device to a routing device if another control device identifies itself as the leader device based on optimized network data. The other control device can identify itself as the leader device based on optimized network data if, for example, it has more control devices in its preferred connection list than the control device that is being downgraded from a leader device to a routing device.The control device can change its role as the leading device after sending a leader abdication message to the leading device specified in the optimized network data and / or receiving notification that the next leading device has assumed the leading role. The leader abdication message can inform the next leading device that the control device is relinquishing its position as the leading device and that the next leading device can assume the leading device role, as described herein. The control device can downgrade its role to a routing device from the leading device. If the control device determines that it is an end device in the optimized network data, the control device can downgrade its function to a terminal device in 612. As described in this document, the control device can send a router release message over the communication circuit to the newly upgraded leader device to be released as a routing device before being downgraded to a terminal device. The control device that sent the router release message can downgrade its function to an end device in 612. The procedure can terminate in 616. Although the features and elements described herein are described in particular combinations, each feature or element may be used alone or in any combination with the other features and elements. The methods described herein may be implemented in a computer program, software, instructions, or firmware stored on one or more non-transient computer-readable or other machine-readable media for execution by a computer or machine, or a part thereof. For example, computer-readable or machine-readable media may be executed by a control circuit, such as a processor. Examples of computer-readable or machine-readable media include electronic signals (transmitted via wired or wireless connections) and computer-readable storage media.Examples of computer-readable storage media include, but are not limited to, read-only memory (ROM), random-access memory (RAM), removable disks, and optical media such as CD-ROMs and digital versatile discs (DVDs). The control circuit can access the computer program, software, instructions, or firmware stored on the computer-readable or machine-readable media to execute it, causing the control circuit to function as described herein, or to operate one or more devices as described herein.
Claims
1. A device comprising: a memory; a communications circuit for transmitting and receiving messages; and a control circuit, configured to: receive, via the communications circuit, at least one optimization message from a plurality of control devices in a load control system; measure a communication quality metric for each of the at least one optimization message received from the plurality of control devices; store the communication quality metric in optimization data with a corresponding identifier of a respective control device from the plurality of control devices from which the optimization message was received;and processing the optimization data to generate optimized network data, wherein the optimized network data comprises a router list that includes one or more control devices determined to be assigned to a routing device role in a network, wherein each of one or more control devices to be included in the router list is determined based on the connections of each of one or more control devices, and wherein the connections represent potential connection links between a respective control device of one or more control devices determined to be assigned to the routing device role and the plurality of load control devices in the system; 2. The device of claim 1, wherein the control circuit is further configured to: transmit the generated optimized network data to each of the plurality of control devices in the load control system.
3. The device of claim 2, wherein the control circuit is further configured to: generate a preferred connection list for each control device of the plurality of control devices, wherein the preferred connection list comprises a list of connections for each control device that has a communication quality metric above a preferred target quality threshold, wherein the connections represent potential connection links between a respective control device and other control devices in the network; and select the one or more control devices to be included in the router list based on the preferred connection list for each control device of the plurality of control devices.
4. The device of claim 3, wherein the control circuit is further configured to: identify that the preferred connection list for a first control device has the largest number of devices from each of the preferred connection lists for the plurality of control devices; and select the first control device as one of the control devices to be included in the router list to be assigned the routing device function based on the preferred connection list for the first control device that has the largest number of devices.
5. The device of claim 4, wherein the control circuit is further configured to select a lead device from the control devices to be included in the router list, and wherein the control device is selected as the lead device based on it having the most devices in the preferred connections list.
6. The device of claim 4, wherein the control circuit is further configured to: initialize each of the plurality of control devices as a non-connected device in a virtual network; and after selecting the first control device as included in the router list, add the first control device and each control device in the preferred connection list for the first control device to a connected list indicating the connected devices in the virtual network.
7. The device of claim 6, wherein the control circuit is further configured to: identify a second control device from the connected list for inclusion in the router list, wherein the second control device is identified for inclusion in the router list based on it having the highest number of unconnected devices in a respective preferred connection list.
8. The device of claim 7, wherein the control circuit is further configured to: after selecting the second control device as included in the router list, add the second control device and each control device in the corresponding preferred connection list for the second control device to the connected list; and maintain the connected list of control devices in the virtual network to select additional control devices to include in the router list.
9. The device of claim 6, wherein the control circuit is further configured to: generate a secondary connection list for one or more control devices from the plurality of control devices, wherein the secondary connection list comprises a connection list for each of the one or more control devices that have a communication quality metric above a secondary target quality threshold, and wherein the secondary target quality threshold is a lower threshold than the preferred target quality threshold; and select control devices for inclusion in the router list based on a number of unconnected devices in the secondary connection list for the control devices.
10. The device of claim 9, wherein the control circuit is further configured to: generate a tertiary connection list for one or more control devices from the plurality of control devices, wherein the tertiary connection list comprises a connection list for each of the one or more control devices that have a communication quality metric above a tertiary target quality threshold, and wherein the tertiary target quality threshold is a lower threshold than the secondary target quality threshold; and select control devices for inclusion in the router list based on a number of unconnected devices in the tertiary connection list for the control devices.
11. The device of claim 10, wherein the control circuit is further configured to: determine that one or more control devices have been previously assigned to the routing role or device; and select the one or more control devices to be included in the router list.
12. The device of claim 3, wherein the list of preferred connections is weighted for each control device of the plurality of control devices to indicate a relative strength of communication that each control device has with a respective control device of the plurality of control devices.
13. The device of claim 2, wherein the control circuit is further configured to update the role of the first control device in response to the generated optimized network data.
14. The device of claim 13, wherein the control circuit is further configured to: enhance the function of the control device to a routing device or leading device in response to the generated optimized network data.
15. The device of claim 13, wherein the control circuit is further configured to: demote the role of the control device to an end device in response to the generated optimized network data.
16. The device of claim 15, wherein the control circuit is configured to downgrade the role when a unique identifier of the control device is not included in the router list.
17. A method comprising: entering a router optimization mode on a control device of a plurality of control devices in a load control system; transmitting at least one optimization message from the control device; receiving optimization messages on the control device from other control devices of the plurality of control devices in the load control system; measuring a communication quality metric for each optimization message received on the control device from the other control devices; storing the communication quality metric in optimization data with a corresponding identifier of a control device from which the optimization message was received;and process the optimization data by a system controller to generate optimized network data, wherein the optimized network data comprises a list of routers indicating the plurality of control devices that are assigned a router device role in a network.
18. The method of claim 17, further comprising: transmitting the generated optimized network data to each of the plurality of control devices in the load control system.
19. The method of claim 18, wherein the processing of the optimization data by the system controller to generate the optimized network data further comprises: generating a preferred connection list in the system controller for each control device of the plurality of control devices, wherein the preferred connection list comprises a list of connections for each control device that has a communication quality metric above a preferred target quality threshold, wherein the connections represent potential attached links between a control device and other control devices in the network; and selecting the control devices to be included in the router list based on the preferred connection list for the control devices.
20. The method of claim 19, wherein selecting the control devices to be included in the router list further comprises: identifying that the preferred connection list for a first control device has the largest number of devices from each of the preferred connection lists for the plurality of control devices; and selecting the first control device as one of the control devices to be included in the router list to be assigned the routing device function based on the preferred connection list for the control device that has the largest number of devices.
21. The method of claim 20, wherein the processing of the optimization data by the system controller to generate optimized network data further comprises the selection of a lead device from the control devices to be included in the router list, and wherein the control device is selected as the lead device based on the fact that it has the most devices in the preferred connection list.
22. The method of claim 20, the method further comprises: initializing each of the plurality of control devices as a non-connected device in a virtual network; and after selecting the first control device as included in the router list, adding the first control device and each control device in the preferred connection list for the first control device to a connected list indicating the connected devices in the virtual network.
23. The method of claim 22, wherein selecting the control devices to be included in the router list further comprises: identifying, by the system controller, a second control device from the connected list for inclusion in the router list, wherein the second control device is identified as being included in the router list based on it having the largest number of unconnected devices in a respective preferred connection list.
24. The method of claim 23, wherein selecting the control devices to be included in the router list further comprises: after selecting the second control device as included in the router list, adding the second control device and each control device in the corresponding preferred connection list for the second control device to the connected list; and maintaining, in the system controller, the connected list of control devices in the virtual network to select additional control devices for inclusion in the router list.
25. The method of claim 22, wherein the system controller that processes the optimization data to generate optimized network data further comprises: generating a secondary connection list in the system controller for one or more control devices from the plurality of control devices, wherein the secondary connection list comprises a connection list for each of the one or more control devices that have a communication quality metric above a secondary target quality threshold, and wherein the secondary target quality threshold is a lower threshold than the preferred target quality threshold; and selecting control devices for inclusion in the router list based on a number of unconnected devices in the secondary connection list for the control devices.
26. The method of claim 25, wherein the processing of the optimization data by the system controller to generate the optimized network data further comprises: generating a tertiary connection list in the system controller for one or more control devices from the plurality of control devices, wherein the tertiary connection list comprises a connection list for each of the one or more control devices having a communication quality metric above a tertiary target quality threshold, and wherein the tertiary target quality threshold is a worse threshold than the secondary target quality threshold; and selecting the control devices for inclusion in the router list based on a number of unconnected devices in the tertiary connection list for the control devices.
27. The method of claim 26, wherein the system controller that processes the optimization data to generate optimized network data further comprises: determining that one or more control devices have been previously assigned to the routing role or device; and selecting the one or more control devices to be included in the router list.
28. The method of claim 19, wherein the plurality of control devices comprises a second control device capable of communicating over a network communication link with the first control device, wherein the communication quality metric for the optimization message received at the first control device from the second control device comprises a first communication quality metric associated with the network communication link, the method further comprises: receiving an optimization message at the second control device transmitted from the first control device; measuring a second communication quality metric for the optimization message received at the second control device, wherein the second communication quality metric is also associated with the network communication link;store the second communication quality metric associated with the network communication link in optimization data on the second control device with a corresponding identifier of the first control device from which the optimization message was received; and transmit the optimization data comprising the second communication quality metric associated with the network communication link from the second control device to the system controller.
29. The method of claim 28, further comprising: receiving, in the system controller, the optimization data from the first control device and the second control device; balancing the optimization data to limit the optimization data to a worst-case connection for the network communication link by using one of the first communication quality metrics or the second communication quality metric associated with the network communication link; and using one of the first communication quality metric or the second communication quality metric associated with the network communication link when processing the optimization data to generate the preferred connection lists.
30. The method of claim 19, wherein the list of preferred connections is weighted for each control device of the plurality of control devices to indicate a relative strength of communication that each control device has with a respective control device of the plurality of control devices.
31. The method of claim 18, further comprising updating the control device function in response to the generated optimized network data.
32. The method of claim 31, further comprising: updating the function of the control device to a routing device or leading device in response to the generated optimized network data; and operating the control device on the network in accordance with the role of the routing device or leading device.
33. The method of claim 31, further comprising: degrading the role of the control device to an end device in response to the generated optimized network data, and operating the control device on the network in accordance with the role of the end device.
34. The method of claim 33, wherein the control device is configured to downgrade the role when a unique identifier of the control device is not included in the router list.
35. A method comprising: entering a router optimization mode on a control device of a plurality of control devices in a load control system; transmitting at least one optimization message from the control device; receiving optimization messages on the control device from other control devices of the plurality of control devices in the load control system; measuring a communication quality metric for each optimization message received on the control device from the other control devices; storing the communication quality metric in optimization data with a corresponding identifier of a control device from which the optimization message is received; and transmitting the optimization data to a system controller.