Smart home networking method based on power carrier communication and WiFi, smart home system and storage medium
By combining WiFi and power line communication in smart home devices, and dynamically switching the connection method according to signal quality, the problem of smart home devices connecting to the network in areas with no WiFi signal or weak signal is solved, thus improving network stability and coverage.
Patent Information
- Application Number
- CN202411552430.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-11-01
AI Technical Summary
Existing smart home devices cannot connect to the internet in areas with no or weak WiFi signal, and too many powerline communication devices can easily lead to network instability.
The master device scans the network status of the slave devices. If the signal is good when connecting to the router via the WiFi module, the connection is maintained; otherwise, it switches to the power line carrier communication module. After ensuring that the power line carrier module's communication signal meets the requirements, the WiFi hotspot is turned on, and the method with the highest communication quality is selected for network access.
It avoids WiFi signal dead zones and network instability caused by too many devices, thus improving network stability and coverage.
Smart Images

Figure CN119383025B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home control, in particular, to a smart home networking method based on power line carrier communication and WiFi, and also relates to a smart home system using the smart home networking method based on power line carrier communication and WiFi, and also relates to a computer readable storage medium using the smart home networking method based on power line carrier communication and WiFi. BACKGROUND
[0002] Nowadays, WiFi functions are used more and more in our life, and in the existing smart home system, WiFi full coverage needs to be achieved to effectively ensure the normal operation of smart home devices. Smart home devices installed in places without WiFi signals or with weak signals cannot be used for smart home functions through networking, and most smart home devices are installed in fixed positions, and it is difficult to improve the networking problem by moving the devices after installation.
[0003] In order to realize the networking of smart home devices, one of the existing ways is to realize indoor full coverage by extending WiFi through wireless bridging, so that smart home devices can be networked in any corner of the room, but in the actual use process, the limitation is very high, and it is easy to be affected by obstacles to cause small extension range. In addition, another way is to make smart home devices and routers communicate through power line carrier, which can effectively solve the problem of wireless signal coverage dead angle, but when there are too many smart home devices on the power line, it is easy to cause slow communication speed and unstable network.
[0004] Therefore, it is necessary to consider a more optimized smart home networking method. SUMMARY
[0005] The first object of the present application is to provide a smart home networking method based on power line carrier communication and WiFi, which can combine WiFi and power line carrier communication functions, avoid network coverage dead angle, and avoid network instability caused by too many devices.
[0006] The second object of the present application is to provide a smart home system which can combine WiFi and power line carrier communication functions, avoid network coverage dead angle, and avoid network instability caused by too many devices.
[0007] The third object of the present application is to provide a computer readable storage medium which can combine WiFi and power line carrier communication functions, avoid network coverage dead angle, and avoid network instability caused by too many devices.
[0008] In order to achieve the above-mentioned first object, the smart home networking method based on power line carrier communication and WiFi provided by the present application comprises: a master device scans all slave devices connected in a power line, and confirms the networking state of the slave devices; if the current slave device is networked with a router through a WiFi module, it is judged whether the WiFi connection signal of the current slave device meets the preset good communication condition; if the WiFi connection signal of the current slave device meets the preset good communication condition, the current networking state is maintained; if the WiFi connection signal of the current slave device does not meet the preset good communication condition, the power line carrier communication module of the current slave device is started to network.
[0009] As can be seen from the above scheme, in the smart home networking method based on power line carrier communication and WiFi of the present application, when networking, the master device scans the networking state of the slave devices; when the current slave device is networked with the router through the WiFi module, if the WiFi connection signal of the current slave device meets the preset good communication condition, the current networking state is maintained; if the preset good communication condition cannot be met, the power line carrier communication module of the current slave device is started to network, so that the current slave device uses WiFi communication only when the WiFi connection signal is good, reduces the occupation of the power line carrier communication module, avoids network instability caused by too many devices, and at the same time, uses the power line carrier communication module for communication when the WiFi signal is poor, avoiding signal coverage dead angles.
[0010] In a further scheme, when the router is networked with the master device through the WiFi module, the next level slave device networked with the master device uses the power line carrier communication module to network with the master device.
[0011] As can be seen, when the master device is networked through the WiFi module, the next level slave device networked with the master device uses the power line carrier communication module to network with the master device, which can reduce the interference between multiple WiFi signal connections and improve stability.
[0012] In a further scheme, after the power line carrier communication module of the current slave device is started to network, it further comprises: starting the WiFi hotspot function of the current slave device.
[0013] As can be seen, after the power line carrier communication module of the current slave device is started to network, the WiFi hotspot function of the current slave device is further started, which can increase the coverage range of the WiFi network and is beneficial to the networking of other devices such as smart home.
[0014] In a further scheme, after the power line carrier communication module of the current slave device is started to network, before the WiFi hotspot function of the current slave device is started, it further comprises: confirming that the communication signal of the current slave device networked through the power line carrier communication module meets the preset communication condition.
[0015] Therefore, before starting the WiFi hotspot function of the current slave device, it is necessary to ensure that the communication signal of the power line communication module networking meets the preset communication condition, so as to avoid affecting the communication quality of the WiFi hotspot.
[0016] In a further scheme, after the step of the master device scanning all the slave devices connected in the power line and confirming the networking state of the slave devices, the method further comprises: if the current slave device adopts the power line communication module for networking, performing a WiFi networking test on the current slave device; and when the WiFi connection signal of the WiFi networking test meets the preset good communication condition, adopting the WiFi module of the current slave device for networking and closing the power line communication module of the current slave device.
[0017] Therefore, if the current slave device adopts the power line communication module for networking, the WiFi networking test is performed on the current slave device, so that when the WiFi connection signal is good, the WiFi module networking can be switched to, thereby reducing the burden of the power line communication module.
[0018] In a further scheme, the step of performing the WiFi networking test on the current slave device comprises: the current slave device acquires all the connectable WiFi hotspots connected with the router, and performs a connection test on all the connectable WiFi hotspots one by one.
[0019] Therefore, when the WiFi networking test is performed on the current slave device, by performing a connection test on all the connectable WiFi hotspots one by one, the best WiFi hotspot can be ensured to be connected, thereby improving the communication quality.
[0020] In a further scheme, after the step of the master device scanning all the slave devices connected in the power line and confirming the networking state of the slave devices, the method further comprises: if there is an unconnected slave device initiating a networking request, acquiring WiFi network quality data of the unconnected slave device connected through the WiFi module and acquiring power line communication network quality data of the unconnected slave device connected through the power line communication module; and selecting the networking mode corresponding to the one with the highest communication quality in the WiFi network quality data and the power line communication network quality data to connect the unconnected slave device.
[0021] Therefore, when the unconnected slave device needs to be connected, the networking mode corresponding to the one with the highest communication quality in the WiFi network quality data and the power line communication network quality data can be selected to connect the unconnected slave device, so as to ensure the best communication quality.
[0022] In a further scheme, the smart home system is an air conditioning system.
[0023] In order to realize the second object of the present application, the present application provides a smart home system comprising a processor and a memory, the memory storing a computer program, the computer program realizing the steps of the smart home networking method based on power line communication and WiFi when executed by the processor.
[0024] In order to realize the third object of the present application, the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program realizing the steps of the smart home networking method based on power line communication and WiFi when executed by a controller. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 is a system block diagram of the smart home system applying the smart home networking method based on power line communication and WiFi of the present application.
[0026] Figure 2 is a flow chart of an embodiment of the smart home networking method based on power line communication and WiFi of the present application.
[0027] Figure 3 is a flow chart of an embodiment of the smart home networking method based on power line communication and WiFi of the present application.
[0028] Figure 4 is a flow chart of an embodiment of the smart home networking method based on power line communication and WiFi of the present application.
[0029] The present application is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0030] The smart home networking method based on power line communication and WiFi of the present application is a computer program applied in a smart home system, for performing networking operation on smart home devices in the smart home system.
[0031] In the present embodiment, referring to Figure 1 , the smart home system comprises a router 1 provided with WiFi function, a master device 2 in communication connection with the router 1, and a slave device 3 in communication connection with the master device 2, the master device 2 and the slave device 3 are both provided with WiFi module and power line communication module, and any two power line communication modules are connected with each other through power line. The master device 2 and the slave device 3 can both be smart home devices such as air conditioner, washing machine, television, smart fan, etc.
[0032] The router 1 and the master device 2 can be connected through WiFi module, and can also be connected through power line communication module.
[0033] In the preferred embodiment, the smart home system is an air conditioning system, and the master device 2 and the slave device 3 are both air conditioners.
[0034] Examples of smart home networking methods based on power line communication and WiFi:
[0035] like Figure 2 As shown, in this embodiment, the smart home networking method based on power line carrier communication and WiFi first executes step S1, where the master device scans all slave devices connected to the power line to confirm their network status. To confirm the network status of each smart home device in the smart home system, the master device needs to scan all slave devices connected to the power line. After receiving the scanning instruction, the master device first uses a power line carrier module to send a name-calling frame to scan all slave devices on the live and neutral lines. Upon receiving the name-calling frame, each slave device sends a response frame to the master device, which then confirms the network status of each slave device based on the response information.
[0036] After confirming the network connection status of the slave device, proceed to step S2 to determine whether the slave device is currently connected to the router via the WiFi module.
[0037] If the current slave device is not connected to the router via a WiFi module, proceed to step S1 for further confirmation of the network connection status. If the current slave device is connected to the router via a WiFi module, proceed to step S3 to determine whether the current slave device's WiFi connection signal meets the preset good communication conditions. The preset good communication conditions can be preset based on experimental data, and can be set according to parameters such as WiFi signal strength, network connection speed, and network latency.
[0038] If the WiFi connection signal of the current slave device meets the preset good communication conditions, then step S4 is executed to maintain the current network connection status. If the WiFi connection signal meets the preset good communication conditions, it means that the signal of the current slave device connecting to the network through the WiFi module is good, and the current network connection status can be maintained.
[0039] If the WiFi connection signal of the current slave device does not meet the preset good communication conditions, then step S5 is executed to enable the power line carrier communication module of the current slave device to connect to the network. The fact that the WiFi connection signal does not meet the preset good communication conditions indicates that the signal of the current slave device connecting to the network via the WiFi module is poor. Therefore, it is necessary to enable the power line carrier communication module to connect to the network and disable the current slave device's WiFi module to ensure communication stability. At the same time, this prevents the WiFi module from interfering with the signals of other WiFi modules while it is in operation.
[0040] After the power carrier communication module of the current slave device is started to network, step S6 is performed to confirm that the communication signal of the current slave device networking through the power carrier communication module satisfies the preset communication condition. The preset communication condition can be preset according to experimental data. Before the WiFi hotspot function of the current slave device is started, it is necessary to ensure that the communication signal of the power carrier communication module networking satisfies the preset communication condition, so that the WiFi hotspot has sufficient stability and the communication quality of the WiFi hotspot is avoided.
[0041] When the communication signal of the current slave device networking through the power carrier communication module satisfies the preset communication condition, step S7 is performed to start the WiFi hotspot function of the current slave device. After the power carrier communication module of the current slave device is started to network, the WiFi hotspot function of the current slave device is further started, which can increase the coverage range of the WiFi network and is beneficial to the networking of the smart home device.
[0042] In the embodiment, referring to Figure 3 After step S1 is performed, the master device scans all slave devices connected in the power line, and confirms the networking state of the slave device, step S20 is further performed to determine whether the current slave device uses the power carrier communication module to network.
[0043] If the current slave device does not use the power carrier communication module to network, step S1 is continuously performed. If the current slave device uses the power carrier communication module to network, step S30 is performed to test the WiFi networking of the current slave device. When the current slave device uses the power carrier communication module to network, the WiFi networking of the current slave device is tested, so that when the WiFi connection signal is good, the WiFi module networking can be switched, and the burden of the power carrier communication module is reduced.
[0044] In the embodiment, the step of testing the WiFi networking of the current slave device includes that the current slave device acquires all connectable WiFi hotspots connected with the router, and tests the connection of all connectable WiFi hotspots one by one. By testing the connection of all connectable WiFi hotspots one by one, the best WiFi hotspot can be ensured to be connected, and the communication quality is improved. During the testing, the master device can send a test packet to the slave device and obtain a communication quality feedback signal. The connectable WiFi hotspot can be a WiFi hotspot of the router, the master device or the slave device.
[0045] After the WiFi networking of the current slave device is tested, step S40 is performed to determine whether the WiFi connection signal of the WiFi networking test satisfies the preset good communication condition. After the communication quality feedback signal is obtained, whether the WiFi connection signal of the WiFi networking test satisfies the preset good communication condition can be determined according to the WiFi signal strength, network connection speed and network delay and the like.
[0046] When the WiFi connection signal of the WiFi networking test meets the preset good communication condition, step S50 is executed, the current slave device WiFi module is used for networking, and the current slave device power line carrier communication module is closed. The WiFi connection signal is good, which indicates that the WiFi module can be switched to networking, thereby reducing the number of power line carrier communication module communications and improving the stability of the network.
[0047] In this embodiment, referring to Figure 4 After step S1 is executed, the master device scans all the slave devices connected in the power line, and confirms the networking state of the slave devices, step S200 is further executed to determine whether there is an un-networked slave device initiating a networking request.
[0048] If there is no un-networked slave device initiating a networking request, step S1 is continuously executed. If there is an un-networked slave device initiating a networking request, step S300 is executed to obtain WiFi network quality data of the un-networked slave device through the WiFi module networking and to obtain power line carrier communication network quality data of the un-networked slave device through the power line carrier communication module networking. When the WiFi network quality data and the power line carrier communication network quality data are obtained, the master device sends network test packets to the un-networked slave device through the corresponding network, thereby obtaining the WiFi network quality data and the power line carrier communication network quality data fed back by the un-networked slave device.
[0049] After the WiFi network quality data and the power line carrier communication network quality data are obtained, step S400 is executed to select the networking mode corresponding to the one with the highest communication quality in the WiFi network quality data and the power line carrier communication network quality data to network the un-networked slave device. Selecting the networking mode corresponding to the one with the highest communication quality in the WiFi network quality data and the power line carrier communication network quality data to network the un-networked slave device can ensure the best communication quality.
[0050] As known from the above, the smart home networking method based on power line carrier communication and WiFi of the application, when networking, the master device scans the networking state of the slave device, when the current slave device is networked through the WiFi module and the router, if the WiFi connection signal of the current slave device meets the preset good communication condition, the current networking state is maintained, if the preset good communication condition cannot be met, the power line carrier communication module of the current slave device is opened for networking, so that the current slave device uses WiFi communication only when the WiFi connection signal is good, the occupation of the power line carrier communication module is reduced to avoid network instability caused by too many devices, at the same time, when the WiFi signal is poor, the power line carrier communication module is used for communication to avoid signal coverage dead angles.
[0051] The smart home system embodiment is as follows:
[0052] The smart home system of the embodiment includes a controller, which implements the steps in the smart home networking method based on power carrier communication and WiFi when executing a computer program.
[0053] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the controller to complete the present application. One or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the smart home system.
[0054] The smart home system can include, but is not limited to, a controller, a memory. Those skilled in the art can understand that the smart home system can include more or fewer components, or combine certain components, or different components, for example, the smart home system can also include input / output devices, network access devices, buses, etc.
[0055] For example, the controller can be a central processing unit (CPU), and can also be other general-purpose controllers, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose controller can be a microcontroller, or the controller can also be any conventional controller, etc. The controller is the control center of the smart home system, which connects various parts of the entire smart home system through various interfaces and lines.
[0056] The memory can be used to store computer programs and / or modules, and the controller realizes various functions of the smart home system by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. For example, the memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0057] The computer readable storage medium embodiment:
[0058] The modules of the smart home system integration in the above embodiments, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned smart home networking method embodiments based on power carrier communication and WiFi can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by the controller, the steps of the above-mentioned smart home networking method embodiments based on power carrier communication and WiFi can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The storage medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0059] It should be noted that the above is only the preferred embodiment of the present application, but the design concept of the application is not limited to this. Any non-essential modification of the application made by using this concept also falls within the protection scope of the application.
Claims
1. A smart home networking method based on power line carrier communication and WiFi, the smart home system comprising a router provided with a WiFi function, a master device in communication connection with the router, and a slave device in communication connection with the master device, the master device and the slave device each being provided with a WiFi module and a power line carrier communication module, and any two power line carrier communication modules being connected with each other through a power line; characterized in that the method comprises: the master device scanning all the slave devices connected in the power line and confirming the networking state of the slave devices; if the current slave device is in networking with the router through the WiFi module, determining whether the WiFi connection signal of the current slave device meets a preset good communication condition; if the WiFi connection signal of the current slave device meets the preset good communication condition, maintaining the current networking state; if the WiFi connection signal of the current slave device does not meet the preset good communication condition, starting the power line carrier communication module of the current slave device for networking; wherein when the router is in networking with the master device through the WiFi module, the next slave device in networking with the master device adopts the power line carrier communication module to network with the master device.
2. The smart home networking method based on power line carrier communication and WiFi according to claim 1, characterized in that after starting the power line carrier communication module of the current slave device for networking, the method further comprises: starting the WiFi hotspot function of the current slave device.
3. The smart home networking method based on power line carrier communication and WiFi according to claim 2, characterized in that after starting the power line carrier communication module of the current slave device for networking and before starting the WiFi hotspot function of the current slave device, the method further comprises: confirming that the communication signal of the current slave device in networking through the power line carrier communication module meets a preset communication condition.
4. The smart home networking method based on power line carrier communication and WiFi according to claim 2, characterized in that after the step of the master device scanning all the slave devices connected in the power line and confirming the networking state of the slave devices, the method further comprises: if the current slave device adopts the power line carrier communication module for networking, performing a WiFi networking test on the current slave device; when the WiFi connection signal of the WiFi networking test meets the preset good communication condition, adopting the WiFi module of the current slave device for networking and closing the power line carrier communication module of the current slave device.
5. The smart home networking method based on power line carrier communication and WiFi according to claim 4, characterized in that the step of performing a WiFi networking test on the current slave device comprises: the current slave device acquires all the connectable WiFi hotspots in networking with the router, and performs a connection test on each of the connectable WiFi hotspots.
6. The smart home networking method based on power line carrier communication and WiFi according to claim 1, characterized in that The main device scans all the slave devices connected in the power line, confirms the networking status of the slave devices, and further comprises the following steps: If there is an unconnected slave device initiating a networking request, the WiFi network quality data of the unconnected slave device connected through the WiFi module and the power line communication network quality data of the unconnected slave device connected through the power line communication module are obtained; The unconnected slave device is connected by selecting the networking mode corresponding to the one with the highest communication quality between the WiFi network quality data and the power line communication network quality data.
7. The power line communication and WiFi-based smart home networking method according to claim 1, characterized in that: The smart home system is an air conditioning system.
8. A smart home system comprising a processor and a memory, characterized in that: The memory stores a computer program, and the computer program is executed by the processor to realize the steps of the power line communication and WiFi-based smart home networking method according to any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the controller to realize the steps of the power line communication and WiFi-based smart home networking method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Device and method for automatic switching of narrow-band power line carrier and micro-power wireless binary channel
CN103138801A
Remote equipment upgrading method and device based on PLC (Programmable Logic Controller), equipment and storage medium
CN115134342A