# An IoT-Based System for Monitoring the Health of Guyed Towers in Overhead Power Lines
## 3 System Architecture
### Software Design of the System
#### 3.6.2 Border Node and Central Server  
From the perspective of the network, the border node acts as the primary coordinator of the mesh network by handling all join requests and validating and authenticating all nodes. Thus, nodes can communicate with each other by using IPv6 addresses, and the Wi-SUN network deals with the routing problem. A node starts participating in the network after the border node accepts its initial handshaking requests and assigns an IPv6 address whenever they \"turn on\". Next, the node learns which other nodes are direct neighbors who can send messages. When a new node completes the initial handshaking process, the routing table of the border node updates. Additionally, the assigned address of the nodes is associated with the geographic localization. By standard, a node has an IP address, MAC address, and geographic localization of the device that occurs at the network association process. The nodes learn the IPv6 address of the border node, which  
Figure 11: A generic flow chart for leaf and router nodes.  
is the default destination of the leaf sensing information. The border node controls the routing tables, referencing the router nodes to know the best paths for message passing. The border node also keeps a small record of recent messages it receives. If the connection to the server is lost, the border continues to store events locally and syncs to the server when the network link is re-established.  
All nodes belonging to a specific power path send their sensor's data to the border node located at a substation. Whenever a message is received, the border translates the IP from the received message to an identification tied to a specific guyed tower site. A second function of the border device is to allow real-time verification of the sensors' state through a human-machine interface (HMI). The HMI aids the technical staff in the need for in-site visits according to the tower site information. Figure 12 illustrates the software interface of the border node HMI. The screen is touch-sensitive, and the user can choose the tower site by touching the sides of the screen.  
The message's contents are validated and re-arranged to be sent forward to the central server, using a secured connection. Currently, data cross the internet using an intermediate server. Over the internet, the established links use SSL encryption for further protection of the messages exchanged. We used MQTT as a messaging protocol for the Internet of Things (IoT) for the current framework. MQTT is a significantly lightweight publish/subscribe messaging transport ideal for connecting remote devices with a small code footprint and minimal network bandwidth.  
The primary function of the central server is to receive data, pre-process them, store them in the database, and display them in a meaningful manner. Figure 13 illustrates the software interface that the user can access. The agent interested in monitoring the condition of any tower site can analyze the data stored in the central server. In this way, it can handle the computer interface depicted in Figure 13a to set access details of any tower site with sensing information for each cable. Furthermore, the history data can be seen according to what Figure 13a-d describes. Functions, such as setting alarms whenever there is a threshold crossing, are possible. The data at the server serves to accommodate multiple users to access stored data and valuable functions. That idea allows integration, remote visibility of the tower site, sending out alarms, and having prediction systems running simultaneously.  
Figure 12: User interface samples from the border node HMI: (**a**) real-time information from leaf nodes; (**b**) real-time information from the router node and weather station.