CN108775679B - Centralized control method and device, central controller and control system of air conditioning unit - Google Patents
Centralized control method and device, central controller and control system of air conditioning unit Download PDFInfo
- Publication number
- CN108775679B CN108775679B CN201810798853.2A CN201810798853A CN108775679B CN 108775679 B CN108775679 B CN 108775679B CN 201810798853 A CN201810798853 A CN 201810798853A CN 108775679 B CN108775679 B CN 108775679B
- Authority
- CN
- China
- Prior art keywords
- fixing device
- central controller
- communication
- control
- communication mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004378 air conditioning Methods 0.000 title claims abstract description 12
- 238000004891 communication Methods 0.000 claims abstract description 253
- 238000001514 detection method Methods 0.000 claims description 23
- 230000002618 waking effect Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 description 8
- 230000000903 blocking effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 206010063385 Intellectualisation Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Classifications
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F24—HEATING; RANGES; VENTILATING
- F24F—AIR-CONDITIONING; AIR-HUMIDIFICATION; VENTILATION; USE OF AIR CURRENTS FOR SCREENING
- F24F11/00—Control or safety arrangements
- F24F11/50—Control or safety arrangements characterised by user interfaces or communication
- F24F11/56—Remote control
- F24F11/57—Remote control using telephone networks
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F24—HEATING; RANGES; VENTILATING
- F24F—AIR-CONDITIONING; AIR-HUMIDIFICATION; VENTILATION; USE OF AIR CURRENTS FOR SCREENING
- F24F11/00—Control or safety arrangements
- F24F11/62—Control or safety arrangements characterised by the type of control or by internal processing, e.g. using fuzzy logic, adaptive control or estimation of values
- F24F11/63—Electronic processing
- F24F11/64—Electronic processing using pre-stored data
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F24—HEATING; RANGES; VENTILATING
- F24F—AIR-CONDITIONING; AIR-HUMIDIFICATION; VENTILATION; USE OF AIR CURRENTS FOR SCREENING
- F24F11/00—Control or safety arrangements
- F24F11/70—Control systems characterised by their outputs; Constructional details thereof
Landscapes
- Engineering & Computer Science (AREA)
- Chemical & Material Sciences (AREA)
- Combustion & Propulsion (AREA)
- Mechanical Engineering (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Selective Calling Equipment (AREA)
Abstract
The application provides a centralized control method and device, a central controller and a control system of an air conditioning unit, wherein the centralized control device comprises: the fixing device is provided with a first wireless communication module and a first communication interface; the central controller is provided with a second wireless communication module corresponding to the first wireless communication module and a second communication interface corresponding to the first communication interface; the central controller can switch the communication mode with the fixing device to control the controlled equipment. The application can not only communicate with the fixing device in a wireless communication mode to control the controlled equipment, but also communicate with the fixing device in a wired communication mode of the communication interface to control the controlled equipment, and the two communication modes can be switched at any time, so that the flexible and convenient control of the controlled equipment can be realized, the stable and effective control of the controlled equipment can be ensured, and the application range is wider.
Description
Technical Field
The application relates to the technical field of control, in particular to a centralized control method and device, a central controller and a control system of an air conditioning unit.
Background
With the intellectualization of home appliances, more and more home appliances are controlled by a centralized controller, such as an air conditioning unit. Products for controlling home appliances by using APP on a mobile terminal have also appeared on the market, which mainly control home appliances by using WiFi, but when WiFi is unstable or no WiFi exists, the data link is not on, so that the home appliances cannot be controlled or the control effect is poor.
Disclosure of Invention
The application aims to solve the technical problems that the effect of household appliances controlled by WiFi is poor or cannot be controlled in the prior art, and provides a centralized control method and device, a central controller and a control system of an air conditioning unit.
In one aspect of the embodiments of the present application, there is provided a centralized control apparatus, including: the device comprises a fixing device, a first wireless communication module and a first communication interface, wherein the fixing device is provided with the first wireless communication module and the first communication interface; the central controller is provided with a second wireless communication module corresponding to the first wireless communication module and a second communication interface corresponding to the first communication interface; the central controller can switch a communication mode with the fixing device to control the controlled equipment, wherein the communication mode comprises wireless communication with the first wireless communication module through the second wireless communication module and wired communication with the first communication interface through the second communication interface.
Optionally, the central controller is detachably disposed on the fixing device, wherein when the central controller is placed on the fixing device, the central controller communicates with the fixing device through wired communication between the second communication interface and the first communication interface.
Optionally, when the central controller is detached from the fixing device, the central controller communicates with the fixing device through wireless communication between the second wireless communication module and the first wireless communication module.
Optionally, the first communication interface and the second communication interface are both USB interfaces.
Optionally, the central controller further includes: and the fixing device charges the battery through the first communication interface and provides power for the central controller.
Optionally, the central controller further includes: and the control chip is used for sending a control command to the fixing device through the first communication interface so as to control the controlled equipment.
Optionally, a first resistor is arranged on an anode pin of the USB interface of the central controller, a second resistor is arranged on a cathode pin, and the control chip is used for detecting the level of the anode pin through the first resistor and detecting the level of the cathode pin through the second resistor.
Optionally, the first wireless communication module and the second wireless communication module are both WiFi modules, or are both bluetooth modules, or are both ZigBee modules, or are both NB-I0T modules.
Optionally, the WiFi module on the central controller communicates wirelessly with the WiFi module on the fixing device through a wireless router.
Optionally, the fixing device is powered by a power cord.
In another aspect of the embodiment of the present application, there is also provided a control system of an air conditioning unit, including: the centralized control device.
In another aspect of the embodiment of the present application, there is also provided a centralized control method, including: detecting whether a wired connection is established with the fixing device; when the wired connection with the fixed device is not detected, the fixed device is communicated with the wireless communication mode to control the controlled equipment; when the wired connection with the fixing device is detected, the communication mode with the fixing device is switched to the wired communication mode for communication so as to control the controlled equipment.
Optionally, after switching the communication mode with the fixed device to the wired communication mode for communication, the method further includes: detecting whether a wired connection is disconnected from the fixing device; when the wired connection with the fixing device is detected to be disconnected, the communication mode with the fixing device is switched to the wireless communication mode for communication so as to control the controlled equipment.
Optionally, the wireless communication mode is correspondingly provided with a first thread, and the wired communication mode is correspondingly provided with a second thread.
Optionally, under the condition of receiving a control command for controlling the controlled device, when the wired connection with the fixed device is not detected, waking up the first thread, and communicating with the fixed device by using a wireless communication mode; when the wired connection with the fixed device is detected, the second thread is awakened, and the communication mode with the fixed device is switched to be the wired communication mode for communication.
Optionally, the wired connection is a USB interface connection, and detecting whether the wired connection is established with the fixing device includes: and detecting whether the USB interface has input voltage or input current.
Optionally, detecting whether a wired connection is established with the fixture further comprises: when the USB interface is detected to have input voltage or input current, judging whether equipment accessed by the USB interface is the fixing device or not; and when the equipment accessed by the USB interface is the fixing device, determining to establish wired connection with the fixing device.
Optionally, controlling the controlled device includes: establishing a message pipe with the fixed device through the wired connection or the wireless connection; when a control command for controlling the controlled device is received, the control command is sent to the fixing device through the message pipeline, and the fixing device controls the controlled device connected with the fixing device by using the control command; and receiving the data of the controlled equipment returned by the fixing device through the message pipeline.
In another aspect of the embodiment of the present application, there is also provided a central controller, including: the first detection unit is used for detecting whether wired connection is established with the fixing device or not; the first communication unit is used for communicating with the fixing device in a wireless communication mode to control the controlled equipment when the wired connection with the fixing device is not detected; and the second communication unit is used for switching the communication mode with the fixing device into a wired communication mode for communication when the wired connection with the fixing device is detected to be established so as to control the controlled equipment.
Optionally, the method further comprises: the second detection unit is used for detecting whether the wired connection with the fixing device is disconnected after the communication mode of the fixing device is switched to the wired communication mode for communication; and the switching unit is used for switching the communication mode with the fixing device into a wireless communication mode for communication when the wired connection with the fixing device is detected to be disconnected so as to control the controlled equipment.
Optionally, the wireless communication mode is correspondingly provided with a first thread, and the wired communication mode is correspondingly provided with a second thread.
Optionally, under the condition of receiving a control command for controlling the controlled device, the first communication unit is further configured to wake up the first thread when no wired connection with the fixed device is detected, and communicate with the fixed device by using a wireless communication manner; the second communication unit is further configured to wake up the second thread when it is detected that the wired connection is established with the fixing device, and switch a communication mode with the fixing device to a wired communication mode for communication.
Optionally, the wired connection is a USB interface connection, and the first detection unit includes: and the detection module is used for detecting whether the USB interface has input voltage or input current.
Optionally, the first detection unit further includes: the judging module is used for judging whether the equipment accessed by the USB interface is the fixing device or not when the USB interface is detected to have input voltage or input current; and the determining module is used for determining to establish wired connection with the fixing device when the equipment accessed by the USB interface is the fixing device.
Optionally, the method further comprises: the establishing unit is used for establishing a message pipeline with the fixed device through the wired connection or the wireless connection; a transmitting unit for transmitting a control command for controlling a controlled device to the fixing device through the message pipe when the control command is received, the fixing device controlling the controlled device connected thereto using the control command; and the receiving unit is used for receiving the data of the controlled equipment returned by the fixing device through the message pipeline.
According to the embodiment of the application, the centralized control device is split into the fixing device and the central controller, and the wireless communication module and the wired communication interface are respectively arranged on the fixing device and the central controller, so that the central controller can communicate with the fixing device in a wireless communication mode to control the controlled equipment, and can communicate with the fixing device in a wired communication mode of the communication interface to control the controlled equipment, the two communication modes can be switched at any time, flexible and convenient control of the controlled equipment can be realized, stable and effective control of the controlled equipment can be ensured, and the application range is wider.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a centralized control device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of another centralized control device according to an embodiment of the present application;
FIG. 3 is a flow chart of a centralized control method in an embodiment of the application;
FIG. 4 is a flowchart of another centralized control method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a centralized control device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be noted that the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In addition, the technical features of the different embodiments of the present application described below may be combined with each other as long as they do not collide with each other.
The embodiment of the application provides a centralized control device, as shown in fig. 1, which comprises: a fixture 10 and a central controller 20.
The fixing device 10 can be fixedly arranged indoors, can be fixed on a wall and can be connected with the controlled equipment 200 through a communication line, the fixing device 10 can be a base of a central controller, and the fixing device 10 is provided with a first wireless communication module 11 and a first communication interface 12; the central controller 20 is provided with a second wireless communication module 21 corresponding to the first wireless communication module 11 and a second communication interface 22 corresponding to the first communication interface 12. The controlled device 200 according to the embodiment of the present application may be a home appliance, such as an air conditioning unit. The wireless communication module of the embodiment of the application can be a Bluetooth module, a ZigBee module or an NB-I0T module, and the communication interface can be a USB interface.
The central controller 20 can switch the communication mode with the fixture 10 to control the controlled device 200, wherein the communication mode includes wireless communication with the first wireless communication module 11 through the second wireless communication module 21 and wired communication with the first communication interface 12 through the second communication interface 22.
In the embodiment of the present application, the central controller 20 can be switched to wireless communication or wired communication according to the requirement. When the wireless communication is unstable or cannot be communicated, it is possible to switch to wired communication to perform control of the controlled apparatus 200; when it is required to be able to control the controlled apparatus 200 anywhere and anytime, it is possible to switch to wireless communication for control. The two communication modes can realize seamless switching.
According to the embodiment of the application, the centralized control device is split into the fixing device and the central controller, and the wireless communication module and the wired communication interface are respectively arranged on the fixing device and the central controller, so that the central controller can communicate with the fixing device in a wireless communication mode to control the controlled equipment, and can communicate with the fixing device in a wired communication mode of the communication interface to control the controlled equipment, the two communication modes can be switched at any time, flexible and convenient control of the controlled equipment can be realized, stable and effective control of the controlled equipment can be ensured, and the application range is wider.
As an optional implementation manner, the central controller of the embodiment of the application is detachably arranged on the fixing device, wherein when the central controller is placed on the fixing device, the central controller communicates with the fixing device through wired communication between the second communication interface and the first communication interface; when the central controller is detached from the fixing device, the central controller is communicated with the fixing device through wireless communication between the second wireless communication module and the first wireless communication module.
Alternatively, as shown in fig. 2, the fixing device may be configured into an L-shape, and the L-shape fixing device is connected with the controlled device through a wired connection and a wireless connection, so as to process data of the controlled device and play a role in protocol conversion. Meanwhile, the fixing device can also play a role in fixing the central controller and charging the central controller.
Because the Bluetooth module, the ZigBee module and the NB-IOT module have distance limitation or need an ad hoc network (or a base station), the cost is high and the implementation is complex; the WiFi is used as a device popular in families, the coverage range is wide, the cost is low, the implementation is easy, and the communication of the USB interface is reliable and smooth, the response is fast, and the user experience is better than that of other modes, so that the first communication interface and the second communication interface can be the USB interface. The first wireless communication module and the second wireless communication module may be the same WiFi module. And the WiFi module on the central controller is in wireless communication with the WiFi module on the fixing device through the wireless router.
Optionally, the running system of the central controller in this embodiment may adopt an Android operating system, and install a USB driver. The USB Host is used as a USB Host, and controls the initiative of USB interface communication. The central controller of the embodiment can have all functions of intelligent equipment such as a mobile phone, a tablet personal computer and the like, and is charged through a battery power supply and a USB interface. Can flexibly move without being limited by the position.
The fixing Device of the embodiment can be used as a USB Device, is provided with a USB interface slot, is preloaded with a USB driver matched with the centralized controller when leaving a factory, and starts the USB driver when being electrified; meanwhile, the fixing device is connected with the controlled equipment through a communication line and is responsible for returning data of household appliances to the hollow device.
As an alternative, the central controller further comprises: the fixing device charges the battery through a first communication interface (such as a USB interface) and provides power for the central controller; the control chip is used for sending a control command to the fixing device through a first communication interface (such as a USB interface) so as to control the controlled equipment. The fixture is powered by a power cord (e.g., 220V). In the embodiment, the central controller is powered by a battery and can be connected with the fixing device through the USB interface to charge the battery; the fixing device and the central controller can communicate through a wireless router and a WiFi, can also communicate through a USB interface, and selects a communication mode according to a detection result, and when the central controller is connected with the fixing device and WiFi exists in a use environment, the USB interface is preferentially used for communication. The control chip is used for detecting whether the fixing device is connected with the fixing device through a USB interface.
Further, a first resistor is arranged on an anode pin of the USB interface of the central controller, a second resistor is arranged on a cathode pin, and the control chip is used for detecting the level of the anode pin through the first resistor and detecting the level of the cathode pin through the second resistor.
In this embodiment, the +5v power supply in the USB interface not only can provide a small current supply for the central controller, but also can perform the function of detecting connection. After the central controller is inserted into the USB interface of the fixing device, the +5V power supply of the fixing device is communicated with the central controller through the USB interface. The control chip of the central controller can check whether the USB interface of the fixing device is connected with the USB interface of the central controller through two resistors (a first resistor and a second resistor) with the resistance of 10 Kohms. If one of the anode pin and the cathode pin of the central controller is at a high level, and if one is at a low level, the central controller indicates that the fixing device is normally connected, the control chip starts to work, and DATA such as control commands and the like are sent to the fixing device through DATA+, DATA-.
In the embodiment of the application, the central controller is connected with the fixing device, the central controller communicates with the fixing device by using the USB interface, the fixing device sends the state quantity of the controlled equipment to the central controller, and the central controller can also send the control quantity to the fixing device. When the central controller is separated from the fixing device, the central controller sends the control quantity to the fixing device through the WiFi module, and the fixing device can return the state quantity to the central controller through the WiFi module.
The embodiment of the application also provides a control system of the air conditioning unit, which comprises: the embodiment of the application provides a centralized control device. The centralized control device is used for controlling the air conditioning unit, namely, the controlled equipment in the centralized control device in the embodiment is the air conditioning unit.
The present embodiment also provides a centralized control method, which may be used in the centralized control device of the foregoing embodiment, and may specifically be executed by a central controller, as shown in fig. 3, where the method includes:
in step S301, it is detected whether a wired connection is established with the fixing device.
In this embodiment, a detection server program may be provided in the central controller, which is essentially a service, and the program runs itself when the central controller is powered on, for detecting that wired connections are established with the fixing device. The wired connection described herein may be a connection through a USB interface.
In step S302, when the wired connection with the fixed device is not detected, the fixed device is communicated with the wireless communication mode to control the controlled device. If the wired connection is detected, the central controller and the fixing device adopt a wireless communication mode to transmit data or control commands so as to control the controlled equipment. The control mode is flexible and is not limited by geographic positions.
Step S303, when the wired connection with the fixed device is detected, the communication mode with the fixed device is switched to the wired communication mode for communication so as to control the controlled equipment.
When the establishment of the wired connection is detected, the communication mode is switched to a wired communication mode, such as USB interface communication, to control the controlled device. Because the wired communication mode has the advantage of stable control effect, when the wired connection is established, the wireless control is indicated to have a problem at the moment or the user does not consider factors such as control places, and the like, so that the most stable control mode is selected, and the optimal control effect is obtained.
According to the embodiment, whether the wired connection is established with the fixing device or not is detected, so that a more control mode is selected, and when the establishment of the wired connection is detected, the control mode is seamlessly switched into a wired communication mode, so that the optimal control effect is achieved.
Further, after switching the communication mode with the fixed device to the wired communication mode for communication, the method further comprises: detecting whether the wire connection with the fixing device is disconnected; when the wired connection with the fixed device is detected to be disconnected, the communication mode with the fixed device is switched to the wireless communication mode for communication so as to control the controlled equipment.
If the wired connection is established, the wireless communication mode is switched again when the wired connection is detected to be disconnected, so that the two communication modes can be switched at any time, flexible and convenient control of the controlled equipment can be realized, stable and effective control of the controlled equipment can be ensured, and the application range is wider.
As an alternative embodiment, the wired connection is a USB interface connection, and detecting whether the wired connection is established with the fixing device includes: and detecting whether the USB interface has input voltage or input current.
In this embodiment, whether the fixing device is connected to the central controller may be determined by detecting the input voltage and current. When detected, determining that the two are connected; otherwise, the two are not connected.
Since the charger may be connected to the central controller instead of the fixing device, in order to avoid erroneous judgment, in this embodiment, detecting whether a wired connection is established with the fixing device further includes: when detecting that the USB interface has input voltage or input current, judging whether equipment accessed by the USB interface is a fixed device or not; when the equipment accessed by the USB interface is a fixed device, the wired connection with the fixed device is established.
And judging whether the equipment accessed by the USB interface is a fixed device or not, namely, carrying out identity recognition on the equipment accessed to the central controller. The specific process is as follows:
and checking the power supply condition of the USB through a Linux kernel script, and when U (USB) is larger than 5v, considering that the USB interface is provided with access equipment (the access equipment is provided with a fixing device and a charger, and further carrying out identity recognition on the access equipment). The detection service program of the central controller obtains USB Device (including a fixing Device or a charger) connected with a USB Host through a getDeviceList () function of the USBManager, further verifies whether the getDeviceProtocol (), getVendorId (), getDeviceName () of the USB Device accords with the identity agreed by the two parties (defined according to the development scheme of each manufacturer), and if so, the verification is passed; otherwise, the flow does not pass. After the first detection and verification pass, the USB Host allocates an address addr to the USB Device; meanwhile, the central controller sends data or commands to the addr address through the USB interface so as to realize communication with the fixed device. When the notification is verified later, data transmission is directly performed through the address addr.
In this embodiment, the wireless communication mode is correspondingly provided with a first thread, the wired communication mode is correspondingly provided with a second thread, and when communication is not performed, both the first thread and the second thread are in a blocking state.
Threads typically have 5 states: a create state, a ready state, an operational state, a death state, and a blocking state.
In this embodiment, the corresponding threads may be set for the functional items in the central controller that control the controlled device, for example, a first thread for wireless communication and a second thread for wired communication. After the thread runs, the thread enters a blocking state through a sleep () method, and waits for a user to input a command so as to let the current CPU overhead be given to other threads. The thread in the blocked state has acquired other running resources besides the CPU, and when a certain thread running condition is satisfied, the thread can be awakened to enter the running state through other threads notify ().
Specifically, under the condition that a control command for controlling the controlled equipment is received, when the wired connection with the fixed device is not detected, the first thread is awakened, and the first thread and the fixed device communicate in a wireless communication mode; when the wired connection with the fixed device is detected, the second thread is awakened, and the communication mode with the fixed device is switched to the wired communication mode for communication.
When the central controller detects that the service program does not detect that the access fixing device exists, the detection service program is utilized to enable the USB interface communication thread (second thread) sleep to be in a blocking state, and then the communication thread (first thread) of the WiFi module is awakened through notify to immediately respond to the operation of a user, so that seamless switching is realized. Meanwhile, the fixing device is also connected with the router through the WiFi module, the router waits for receiving the control quantity sent by the central controller, and the central controller receives the state quantity of the fixing device.
When the central controller detects that the service program detects that the peripheral is arranged and the addr of the peripheral is a designated, namely a fixed device, the detection service program is utilized to enable the WiFi module communication thread (first thread) sleep to be in a blocking state, and then the USB communication thread (second thread) is awakened by the notify to immediately respond to the operation of a user, so that seamless switching is realized.
The controlling of the controlled device in this embodiment includes: establishing a message pipeline with the fixing device through wired connection or wireless connection; when a control command for controlling the controlled equipment is received, the control command is sent to the fixing device through the message pipeline, and the fixing device controls the controlled equipment connected with the fixing device by using the control command; and receiving the data of the controlled equipment returned by the fixed device through the message pipeline.
And a message pipeline is established between the central controller (USB host) and the fixing device (USB device), when the central controller is triggered by user behaviors, the central controller sends data to the fixing device through the message pipeline, the fixing device returns corresponding data of the unit to the central controller, and the central controller responds to the user behaviors.
Fig. 4 shows another alternative implementation of the method of this embodiment, taking the fixing device as a base, and the communication interface as a USB interface as an example for explanation. When in first use, a USB driver is preloaded in the fixed device, and when in first power-on, the fixed PID is allocated to the driver by writing the USB driver into a registry (10001). The central controller detects the program service detection voltage, and sends a reset request after waiting for 100 ms.
When not used for the first time, as shown in fig. 4, the method comprises:
in step S401, the central controller detects whether a USB device is connected. If so, step S402 is performed, otherwise detection continues.
In step S402, the central controller sends a frame of authentication command packet to the base.
Step S403, after receiving the instruction packet, the base returns the identity information according to a preset protocol.
In step S404, the central controller verifies the identity information returned by the base, and after the verification is passed, an address is allocated to the base.
In step S405, after the control is triggered by the user, a message pipe is established, and the data packet is sent to the address of the base.
In step S406, the base returns the state quantity of the controlled device to the central controller.
Step S407, detecting whether the central controller is disconnected from the base. If disconnected, the process returns to step S401, and otherwise continues detection.
The present embodiment provides a central controller, which may be used to execute the centralized control method of the foregoing embodiment, as shown in fig. 5, where the central controller includes: a first detection unit 501, a first communication unit 502, and a second communication unit 503.
A first detecting unit 501 for detecting whether a wired connection is established with the fixture.
The first communication unit 502 is configured to communicate with the fixed device using a wireless communication manner to control the controlled device when the wired connection with the fixed device is not detected.
And a second communication unit 503 configured to switch the communication mode with the fixed device to the wired communication mode for performing communication to control the controlled device when the wired connection with the fixed device is detected.
When the establishment of the wired connection is detected, the communication mode is switched to a wired communication mode, such as USB interface communication, to control the controlled device. Because the wired communication mode has the advantage of stable control effect, when the wired connection is established, the wireless control is indicated to have a problem at the moment or the user does not consider factors such as control places, and the like, so that the most stable control mode is selected, and the optimal control effect is obtained.
According to the embodiment, whether the wired connection is established with the fixing device or not is detected, so that a more control mode is selected, and when the establishment of the wired connection is detected, the control mode is seamlessly switched into a wired communication mode, so that the optimal control effect is achieved.
Optionally, the central controller further comprises: the second detection unit is used for detecting whether the wired connection with the fixing device is disconnected after the communication mode of the fixing device is switched to the wired communication mode for communication; and the switching unit is used for switching the communication mode with the fixing device into a wireless communication mode for communication when the wired connection with the fixing device is detected to be disconnected so as to control the controlled equipment.
Optionally, the wireless communication mode is correspondingly provided with a first thread, the wired communication mode is correspondingly provided with a second thread, and when communication is not performed, both the first thread and the second thread are in a blocking state.
Optionally, under the condition of receiving a control command for controlling the controlled device, the first communication unit is further configured to wake up the first thread when no wired connection with the fixed device is detected, and communicate with the fixed device by using a wireless communication manner; the second communication unit is further configured to wake up the second thread when it is detected that the wired connection is established with the fixing device, and switch a communication mode with the fixing device to a wired communication mode for communication.
Optionally, the wired connection is a USB interface connection, and the first detection unit includes: and the detection module is used for detecting whether the USB interface has input voltage or input current.
Optionally, the first detection unit further includes: the judging module is used for judging whether the equipment accessed by the USB interface is the fixing device or not when the USB interface is detected to have input voltage or input current; and the determining module is used for determining to establish wired connection with the fixing device when the equipment accessed by the USB interface is the fixing device.
Optionally, the method further comprises: the establishing unit is used for establishing a message pipeline with the fixed device through the wired connection or the wireless connection; a transmitting unit for transmitting a control command for controlling a controlled device to the fixing device through the message pipe when the control command is received, the fixing device controlling the controlled device connected thereto using the control command; and the receiving unit is used for receiving the data of the controlled equipment returned by the fixing device through the message pipeline.
The functions of each module described in this embodiment may be referred to the above centralized control method, and will not be described herein.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While obvious variations or modifications are contemplated as falling within the scope of the present application.
Claims (19)
1. A centralized control device, comprising:
the device comprises a fixing device, a first wireless communication module and a first communication interface, wherein the fixing device is provided with the first wireless communication module and the first communication interface;
the central controller is provided with a second wireless communication module corresponding to the first wireless communication module and a second communication interface corresponding to the first communication interface;
the central controller can switch a communication mode with the fixing device to control the controlled equipment, wherein the communication mode comprises wireless communication with the first wireless communication module through the second wireless communication module and wired communication with the first communication interface through the second communication interface;
the first communication interface and the second communication interface are USB interfaces, a first resistor is arranged on an anode pin of the USB interface of the central controller, a second resistor is arranged on a cathode pin, and the central controller is used for detecting the level of the anode pin through the first resistor and detecting the level of the cathode pin through the second resistor; the central controller is provided with a USB driver, and the fixing device is preloaded with the USB driver matched with the central controller.
2. The centralized control device of claim 1, wherein the central controller is detachably disposed on the fixture, wherein the central controller communicates with the fixture via wired communication between the second communication interface and the first communication interface when the central controller is disposed on the fixture.
3. The centralized control device of claim 2, wherein when the central controller is detached from the stationary device, the central controller communicates with the stationary device via wireless communication between the second wireless communication module and the first wireless communication module.
4. The central control apparatus according to claim 1, wherein the central controller further comprises: and the fixing device charges the battery through the first communication interface and provides power for the central controller.
5. The central control apparatus according to claim 1, wherein the central controller further comprises: and the control chip is used for sending a control command to the fixing device through the first communication interface so as to control the controlled equipment.
6. The centralized control device of claim 1, wherein the first wireless communication module and the second wireless communication module are both WiFi modules, or are both bluetooth modules, or are both ZigBee modules, or are both NB-I0T modules.
7. The centralized control device of claim 6, wherein the WiFi module on the central controller communicates wirelessly with the WiFi module on the stationary device via a wireless router.
8. The central control device of claim 1, wherein the securing device is powered by a power cord.
9. A control system of an air conditioning unit, comprising: the centralized control apparatus according to any one of claims 1 to 8.
10. A centralized control method, applied to the centralized control apparatus as claimed in any one of claims 1 to 8, comprising:
detecting whether a wired connection is established with the fixing device;
when the wired connection with the fixed device is not detected, the fixed device is communicated with the wireless communication mode to control the controlled equipment;
when the wired connection with the fixing device is detected, the communication mode with the fixing device is switched to be the wired communication mode for communication so as to control the controlled equipment;
the wired connection is USB interface connection, and detecting whether the wired connection is established with the fixing device comprises: detecting whether the USB interface has input voltage or input current; when the USB interface is detected to have input voltage or input current, judging whether equipment accessed by the USB interface is the fixing device or not; when the equipment accessed by the USB interface is the fixing device, determining to establish wired connection with the fixing device; the central controller is provided with a USB driver, and the fixing device is preloaded with the USB driver matched with the central controller.
11. The centralized control method according to claim 10, wherein after switching the communication mode with the fixed device to the wired communication mode for communication, further comprising:
detecting whether a wired connection is disconnected from the fixing device;
when the wired connection with the fixing device is detected to be disconnected, the communication mode with the fixing device is switched to the wireless communication mode for communication so as to control the controlled equipment.
12. The centralized control method of claim 10, wherein the wireless communication mode is provided with a first thread and the wired communication mode is provided with a second thread.
13. The centralized control method as claimed in claim 12, wherein, in the case of receiving a control command for controlling the controlled apparatus,
when the wired connection with the fixed device is not detected, waking up the first thread, and communicating with the fixed device by using a wireless communication mode;
when the wired connection with the fixed device is detected, the second thread is awakened, and the communication mode with the fixed device is switched to be the wired communication mode for communication.
14. The centralized control method as claimed in claim 10, wherein controlling the controlled device comprises:
establishing a message pipe with the fixed device through the wired connection or the wireless connection;
when a control command for controlling the controlled device is received, the control command is sent to the fixing device through the message pipeline, and the fixing device controls the controlled device connected with the fixing device by using the control command;
and receiving the data of the controlled equipment returned by the fixing device through the message pipeline.
15. A central controller for use in a central control apparatus as claimed in any one of claims 1 to 8, the central controller comprising:
the first detection unit is used for detecting whether wired connection is established with the fixing device or not;
the first communication unit is used for communicating with the fixing device in a wireless communication mode to control the controlled equipment when the wired connection with the fixing device is not detected;
the second communication unit is used for switching the communication mode with the fixed device into a wired communication mode for communication when the wired connection with the fixed device is detected to be established so as to control the controlled equipment;
the wired connection is a USB interface connection, and the first detection unit includes:
the detection module is used for detecting whether the USB interface has input voltage or input current;
the judging module is used for judging whether the equipment accessed by the USB interface is the fixing device or not when the USB interface is detected to have input voltage or input current;
and the determining module is used for determining that the wired connection is established with the fixing device when the equipment accessed by the USB interface is the fixing device, the central controller is provided with a USB driver, and the fixing device is preloaded with the USB driver matched with the central controller.
16. The central controller of claim 15, further comprising:
the second detection unit is used for detecting whether the wired connection with the fixing device is disconnected after the communication mode of the fixing device is switched to the wired communication mode for communication;
and the switching unit is used for switching the communication mode with the fixing device into a wireless communication mode for communication when the wired connection with the fixing device is detected to be disconnected so as to control the controlled equipment.
17. The central controller of claim 15, wherein the wireless communication mode is provided with a first thread and the wired communication mode is provided with a second thread.
18. The controller according to claim 17, wherein, in the case of receiving a control command for controlling the controlled device,
the first communication unit is further used for waking up the first thread to communicate with the fixed device in a wireless communication mode when the wired connection with the fixed device is not detected;
the second communication unit is further configured to wake up the second thread when it is detected that the wired connection is established with the fixing device, and switch a communication mode with the fixing device to a wired communication mode for communication.
19. The central controller of claim 15, further comprising:
the establishing unit is used for establishing a message pipeline with the fixed device through the wired connection or the wireless connection;
a transmitting unit for transmitting a control command for controlling a controlled device to the fixing device through the message pipe when the control command is received, the fixing device controlling the controlled device connected thereto using the control command;
and the receiving unit is used for receiving the data of the controlled equipment returned by the fixing device through the message pipeline.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810798853.2A CN108775679B (en) | 2018-07-19 | 2018-07-19 | Centralized control method and device, central controller and control system of air conditioning unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810798853.2A CN108775679B (en) | 2018-07-19 | 2018-07-19 | Centralized control method and device, central controller and control system of air conditioning unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108775679A CN108775679A (en) | 2018-11-09 |
CN108775679B true CN108775679B (en) | 2023-08-15 |
Family
ID=64030104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810798853.2A Active CN108775679B (en) | 2018-07-19 | 2018-07-19 | Centralized control method and device, central controller and control system of air conditioning unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108775679B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109639314A (en) * | 2018-12-28 | 2019-04-16 | 东莞亿动智能科技有限公司 | Communication mode switching method, device, electric plating propulsion, control device and system |
CN110493888A (en) * | 2019-08-26 | 2019-11-22 | 深圳市沐腾科技有限公司 | A kind of dual-module communication system and control method, computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06213499A (en) * | 1993-01-18 | 1994-08-02 | Matsushita Electric Ind Co Ltd | Remote controller for air-conditioning machine |
JP2001112075A (en) * | 1999-10-08 | 2001-04-20 | Mitsubishi Electric Corp | Electric device, power control method for the electric device, and operation command control method for the electric device |
CN205641181U (en) * | 2016-04-06 | 2016-10-12 | 广东美的制冷设备有限公司 | Air conditioner and perpendicular money wall -mounted air -conditioner indoor |
CN107166687A (en) * | 2017-07-10 | 2017-09-15 | 广东美的暖通设备有限公司 | The control assembly and air-conditioning device assembly of air conditioner |
CN208720443U (en) * | 2018-07-19 | 2019-04-09 | 珠海格力电器股份有限公司 | Centralized control device and control system of air conditioning unit |
-
2018
- 2018-07-19 CN CN201810798853.2A patent/CN108775679B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06213499A (en) * | 1993-01-18 | 1994-08-02 | Matsushita Electric Ind Co Ltd | Remote controller for air-conditioning machine |
JP2001112075A (en) * | 1999-10-08 | 2001-04-20 | Mitsubishi Electric Corp | Electric device, power control method for the electric device, and operation command control method for the electric device |
CN205641181U (en) * | 2016-04-06 | 2016-10-12 | 广东美的制冷设备有限公司 | Air conditioner and perpendicular money wall -mounted air -conditioner indoor |
CN107166687A (en) * | 2017-07-10 | 2017-09-15 | 广东美的暖通设备有限公司 | The control assembly and air-conditioning device assembly of air conditioner |
CN208720443U (en) * | 2018-07-19 | 2019-04-09 | 珠海格力电器股份有限公司 | Centralized control device and control system of air conditioning unit |
Also Published As
Publication number | Publication date |
---|---|
CN108775679A (en) | 2018-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112181339B (en) | Data transmission method and device | |
EP3173888B1 (en) | Method for managing household devices | |
CN104574899B (en) | A kind of intelligent control method and its terminal | |
US20210165379A1 (en) | Device control system, method and apparatus, and gateways | |
US7826395B2 (en) | Communication system using zigbee and method of controlling the same | |
CN108012312B (en) | Paged device, paging device and method | |
CN106230671A (en) | Smart home control method and device and terminal | |
CN109151782B (en) | WIFI signal relay method and system based on intelligent household equipment | |
US9917733B2 (en) | Communication device, control method, program product and communication system | |
CN103813039A (en) | Home appliance control method, home server and home appliance control system | |
US9271232B2 (en) | Mobile terminal and power saving method thereof | |
CN108775679B (en) | Centralized control method and device, central controller and control system of air conditioning unit | |
CN105137841A (en) | Remote control method and device based on intelligent socket | |
CN105827023A (en) | Wireless charging method between terminals and terminals | |
CN110992673A (en) | Remote controller, control method thereof, and computer storage medium | |
CN204926478U (en) | Controlling means , control system | |
KR20130108903A (en) | Power sharing apparatus and system using power sharing program installed in mobile terminal | |
CN108092839B (en) | Method and device for establishing network connection | |
CN109245974A (en) | Household electrical appliance distribution method, apparatus and computer readable storage medium | |
CN103926888A (en) | Wireless smart camera system supporting multiple short-range communication protocols and working mode of wireless smart camera system | |
CN114731304A (en) | Remote activation of a wireless service interface of a control device via a radio interface | |
KR101797032B1 (en) | Wireless router device with IoT gateway function | |
CN208720443U (en) | Centralized control device and control system of air conditioning unit | |
US20160142526A1 (en) | Remote monitoring system and remote monitoring method | |
CN107493394B (en) | System and method for controlling Bluetooth equipment by mobile phone through Wi-Fi |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |