Optimizing LON Power Line Repeating Network Performance
LON is supported for SmartServer Pi 4.3 and higher, with the exception of LON PL.
As described in (Optional) Set up LON Power Line Repeating, you can enable LON power line repeating to extend the range of power line networks. The SmartServer extends the range by using one or more of the other power line devices as repeaters to communicate to a distant device. Power line channels have limited bandwidth and the SmartServer uses some of the bandwidth for repeating messages and for determining the best repeater paths. To accommodate system disruption, never deploy a system that uses more than 60% of the available network bandwidth. This page describes how you can reduce bandwidth use in a power line network with repeating.
This section consists of the following:
Repeater Chains Example
- SmartServer → device 2 (one hop, target edge device and no repeaters)
- SmartServer → device 2 → device 5 → device 7 (3 hops, target edge device plus 2 repeaters).
When you enable power line repeating, you can only install a single LON network interface, the network interface must be named lon0, and the interface must be a U70 PL-20 network interface.
You can use the DCI console to determine whether a device is up or down, to determine the repeater path that is used for each device, and to look at signal strength and margin for all the repeaters (also known as an agent). See the SmartServer Troubleshooting section for additional information on how to troubleshoot power line issues and use the DCI commands.
Once you add a device to the SmartServer, this device will be added to the DCI, and the DCI, if dynamic repeating is enabled, will try to find the best repeater path for each device.
If dynamic repeating is turned on (set on the LON Configuration page), then the SmartServer will communicate to all the devices and will try to determine which nearby devices have good signal strength and margin. These repeater devices are called agents. The SmartServer communicates to all devices, directly or through repeaters, to determine the best agents to use as repeaters, and then determines the repeater path to use.
Power line communication has very limited bandwidth, with many channels only supporting between to 4 - 14 packets per second. Each poll of a datapoint is a minimum of 2 packets (no repeaters) and additional 2 packets for each repeater is needed to communicate to a destination device. Therefore, if a device requires 3 hops (2 repeaters), then 6 packets are needed for each datapoint poll. Using dynamic repeating causes the SmartServer to periodically check each device further reducing available bandwidth. Consequently, it is very important to reduce the traffic on the power line channel.
In some cases, once the power line network is stable, you may want to change to static in order to speed up processing, like downloading applications into a device, and then re-enable dynamic repeating afterwards.
When adding or provisioning a new device, you can temporally disable background polling using the Pause button () on the CMS Devices widget prior to performing these actions to reduce the time required and increase the reliability of network management actions. When you are finished adding or provisioning new devices, you can then re-enable background polling. You can use also MQTT or REST APIs to pause monitoring. See the MQTT example below.
mosquitto_pub -t glp/0/17qehie/rq/cfg -m '{"mode":"maintenance"}'
mosquitto_pub -t glp/0/17qehie/rq/cfg -m '{"mode":"onnet"}'
For some streetlight applications, the power to the streetlights is powered-off during the day to save energy. However, the SmartServer will continue to poll datapoints (based on datapoint properties) of down devices. This process will cause poll commands to be queued up while the devices are down and may cause delays after powering up the edge devices, before the SmartServer appears to work; however, the poll commands are just delayed. Once power is restored to the edge devices, it will take time for the SmartServer to report that all devices are up due to devices that are being used as repeaters being down.
For this reason, it is recommended that you use an internal device and schedule events to pause background polling before turning off the power to the external devices, and then enable polling shortly after powering on the edge devices. If some devices need to be powered and some powered down then you may have to disable some or all datapoint properties polling and use an internal device to do Smart Polling. Smart Polling is only poll devices when they are powered. So for devices are fully powered up, and any required repeater is powered, this internal device will constantly poll its datapoints, but no polling will occur for devices that are down. When doing Smart Polling you won't be starting and stopping background polling as all background polling is done by the Smart Polling internal device.
Using a group controller internal device is recommended since it can more evenly distribute commands to a large group of devices, rather than having a scheduled event send the datapoint updates directly.
Improving Power Line Performance
- Reduce the number of datapoints per device that you need to poll to a single datapoint.
- Create a single structured datapoint with all the values from the device so you only poll one datapoint instead of multiple datapoints from a device.
- This step is especially important if you need to poll datapoints often.
- Reduce or disable polling using the Datapoints widget.
- The Datapoints widget sends on-demand poll requests on the channel that may affect overall performance if left open too long.
- The default polling is 30 seconds for 25 datapoints.
- Change the poll rate to 0 to disable polling, or change it to a larger number (like 180 seconds).
- The Datapoints widget sends on-demand poll requests on the channel that may affect overall performance if left open too long.
- Reduce or disable on-demand polling used by custom web pages, internal devices, Node-RED using the REST or MQTT APIs.
- Reduce Datapoint Properties widget polling and limit the number of datapoints being polled.
- Doing so will help ensure that the power line channel is not overwhelmed.
- Doing so also allows bandwidth for other applications.
- Disable monitoring (using the Datapoint Properties widget) temporarily when adding and provisioning devices.
- Doing so may speed up the process of adding and provisioning a new device.
- You can do this manually or using one of the APIs as follows:
- Using the CMS Devices widget Pause button ().
- Using MQTT or REST commands.
- Disable monitoring (using the Datapoint Properties widget) temporarily when the external devices are powered off.
- Doing so will ensure that the SmartServer does not queue up unnecessary polling commands.
- Doing so should also speed up the time that the SmartServer starts sending out new commands after the devices are powered up.
- Add two scheduled events to an internal device datapoint to pause or start datapoint monitoring. Possible solutions:
- Smart Polling
- The Internal device will do on-demand polling only for devices that are powered down temporarily during the day
- Polling only done when devices are powered up.
- Datapoint Properties polling
- Only used for devices powered up all day.
- Not used for devices that are temporarily powered down during the day.
- Polling delayed when sending commands to edge devices and then quickly poll to check settings and then normal periodic polling.
- The Internal device will do on-demand polling only for devices that are powered down temporarily during the day
- Pausing and starting the background (similar to Devices widget Pause button)
- Schedule the internal device to stop polling (Maintenance) 2 minutes using MQTT before turning off the edge devices.
- Schedule the internal device to start polling (Onnet) 5 minutes using MQTT after turning on the edge devices.
- Smart Polling
- If turning off power to some or all devices, you should add the most important devices to the SmartServer first so that when the DCI checks trys to communicate to devices that it always starts with the important device
- For example, if you are using a device for turning on the relay, if you add that device last then when devices are powered up the DCI may need to check all the other devices first before it gets to this device.
- By adding the device first into the SmartServer and provisioning it first, communication to important devices will happen faster than if the device was added later.
- By adding the device first into the SmartServer and provisioning it first, communication to important devices will happen faster than if the device was added later.
- For example, if you are using a device for turning on the relay, if you add that device last then when devices are powered up the DCI may need to check all the other devices first before it gets to this device.
- Use a group controller internal device to control datapoints.
- A group controller can more evenly distribute datapoint updates based on a street light application.
- A group controller can more evenly distribute datapoint updates based on a street light application.