CN114253143A - Load device control method, device and system, electronic device and storage medium - Google Patents

Load device control method, device and system, electronic device and storage medium Download PDF

Info

Publication number
CN114253143A
CN114253143A CN202011014179.8A CN202011014179A CN114253143A CN 114253143 A CN114253143 A CN 114253143A CN 202011014179 A CN202011014179 A CN 202011014179A CN 114253143 A CN114253143 A CN 114253143A
Authority
CN
China
Prior art keywords
load
instruction
equipment
control
target load
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.)
Pending
Application number
CN202011014179.8A
Other languages
Chinese (zh)
Inventor
黄灿武
游延筠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202011014179.8A priority Critical patent/CN114253143A/en
Publication of CN114253143A publication Critical patent/CN114253143A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The embodiment of the application provides a load equipment control method, a device and a system, electronic equipment and a computer storage medium, wherein the load equipment control method comprises the steps of obtaining a control instruction; under the condition that the contact of the on-off device is closed, a wireless instruction for controlling the corresponding opening or closing of one or more target load devices is sent to one or more target load devices according to the control instruction; in this process, the contacts of the switching device are always closed. The electronic equipment directly controls the load equipment according to the control instruction under the condition that the contact of the on-off device is closed, and the contact of the on-off device can be kept in a normally closed state by shielding the control function of the control instruction on the closing or opening of the contact of the on-off device of the electronic equipment, so that the situation that the load equipment is in an offline uncontrolled state after the load equipment is closed due to the fact that the contact of the on-off device of the electronic equipment is opened when the load equipment is controlled to be closed is avoided.

Description

Load device control method, device and system, electronic device and storage medium
Technical Field
The present disclosure relates to the field of electronic circuit technologies, and in particular, to a method, an apparatus, and a system for controlling a load device, an electronic device, and a computer-readable storage medium.
Background
The intelligent home is a trend of an information-oriented society, the existing intelligent home devices generally adopt a remote control technology, all the intelligent home devices are accessed to the same gateway or router through a panel switch to realize a networking function so as to carry out remote control, and keys of the panel switch also support manual operation starting or disconnection under a subscriber line.
However, the known panel switch and the corresponding load device are usually connected in series in the circuit, and when the panel switch is turned off by the key operation of the panel switch, the power supply of the load device is cut off, so that the load device is in an off-line and uncontrollable state, and the remote control cannot be started, thereby causing troubles to users.
Disclosure of Invention
In order to solve the existing technical problems, the application provides a load device control method, a device and a system, an electronic device and a computer readable storage medium, which can be more intelligent and ensure that the load device can be in a controlled state.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a load device control method, which is applied to an electronic device, and includes:
acquiring a control instruction;
under the condition that the contact of the on-off device is closed, a wireless instruction for controlling the corresponding opening or closing of the target load equipment is sent to one or more target load equipment according to the control instruction; in this process, the contacts of the switching device are always closed.
In a second aspect, an embodiment of the present application further provides a load device control apparatus, including:
the acquisition module is used for acquiring a control instruction;
the transmitting module is used for transmitting a wireless instruction for controlling the corresponding opening or closing of one or more target load devices to one or more target load devices according to the control instruction under the condition that the contact of the on-off device is closed; in this process, the contacts of the switching device are always closed.
In the above embodiment, when the electronic device obtains the control instruction, the load device is directly controlled according to the control instruction under the condition that the contact of the on-off device is closed, and the contact of the on-off device of the electronic device can be kept in a normally closed state by shielding the control function of closing or opening the contact of the on-off device of the electronic device by the control instruction, so that the situation that the load device is in an offline uncontrolled state after being closed due to the fact that the contact of the on-off device of the electronic device is opened when the load device is controlled to be closed is avoided, and the load device can be ensured to be in a controlled state of remote control.
In a third aspect, the present application further provides a load device control method, including:
sending a wireless instruction for controlling the load equipment to be turned on or turned off to at least one load equipment;
judging whether the load equipment is successfully started or closed according to the wireless instruction;
and returning to the step of sending a wireless instruction for controlling the load equipment to be opened or closed to at least one load equipment under the condition that the action of opening or closing the load equipment fails and the current failure times are within a set range.
In a fourth aspect, the present application further provides a load device control apparatus, including:
the instruction module is used for sending a wireless instruction for controlling the load equipment to be turned on or turned off to at least one load equipment;
the action module is used for judging whether the load equipment successfully executes the opening or closing action according to the wireless instruction;
and the returning module is used for returning the step of sending the wireless instruction for controlling the load equipment to be opened or closed to at least one load equipment under the condition that the action of opening or closing the load equipment fails and the current failure times are within a set range.
In the above embodiment, the contacts of the on-off device of the electronic device may be kept in a normally closed state, and the load device is controlled to execute a corresponding action by sending a wireless instruction for controlling the load device to be turned on or turned off to the load device, and the electronic device may monitor whether the execution action of the load device is successful after receiving the wireless instruction, and may repeatedly send the wireless instruction to the load device within a set range for a plurality of times when the action is failed, so as to ensure that the load device can be accurately controlled by the electronic device.
In a fifth aspect, an embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, and when the computer program is executed by the processor, the electronic device implements the load device control method according to any embodiment of the present application.
In a sixth aspect, an embodiment of the present application further provides a load device control system, including a load device and the electronic device according to any embodiment of the present application, where the electronic device establishes a communication connection with the load device, and the electronic device is configured to correspondingly control an on or off state of at least one of the load devices.
In a seventh aspect, an embodiment of the present application further provides a load device control system, including the electronic device, the gateway, and the terminal device described in any embodiment of the present application, where the electronic device and the terminal device establish a communication connection through the gateway, and the electronic device is used to correspondingly control at least one load device.
In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the load device control method according to any embodiment of the present application is implemented.
The electronic device, the load device control system, and the computer-readable storage medium provided in the embodiments of the present application are respectively used to implement the load device control method provided in the embodiments of the present application, have the same technical effects as the load device control method, and are not described herein again to avoid repetition.
Drawings
FIG. 1 is a schematic diagram of a load device control system in an embodiment of the present application;
fig. 2 is a schematic diagram of an alternative application scenario of the load device control system in the embodiment of the present application;
FIG. 3 is a flow chart of a control method for an overload apparatus in an embodiment of the present application;
FIG. 4 is a flow chart of a load device control method in another embodiment of the present application;
FIG. 5 is a flow chart of a load device control method in yet another embodiment of the present application;
FIG. 6 is a flow chart of a load device control method according to yet another embodiment of the present application;
FIG. 7 is a schematic diagram of a load device control apparatus according to an embodiment of the present application;
FIG. 8 is a flow chart of a load device control method in another embodiment of the present application;
FIG. 9 is a flow chart of a load device control method in yet another embodiment of the present application;
FIG. 10 is a schematic view of a load device control apparatus according to another embodiment of the present application;
FIG. 11 is a diagram of an electronic device according to an embodiment of the present application;
FIG. 12 is a schematic view of an electronic device according to another embodiment of the present application;
FIG. 13 is a flow chart of an alternative embodiment of an overload apparatus control method;
fig. 14 is a flowchart of an overload device control method in another alternative embodiment.
Detailed Description
The technical solution of the present application is further described in detail with reference to the drawings and specific embodiments of the specification.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of implementations of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In the description of the present application, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present application and simplifying the description, but do not indicate or imply that the referred device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be construed as limiting the present application. In the description of the present application, "a plurality" means two or more unless otherwise specified.
In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, an electronic device 10 according to an embodiment of the present disclosure includes an on/off device 12, a processor 13, a memory (not shown), and a local button 11. The electronic device 10 is used for correspondingly controlling at least one load device 30, and the contact of the on-off device 12 can be in a normally closed state to keep the load device 40 in a normal power supply state. The memory stores a computer program, and the processor 13 executes a relevant control operation when executing the computer program stored in the memory. When the electronic device performs opening or closing control on the load device 40, the load device 30 may be opened or closed by operating the local key 11 or the load device 30 may be opened or closed by remote operation through the terminal device 20, the processor 13 obtains a control instruction for the load device 30, determines whether a contact of the on-off device 12 of the electronic device 10 is currently closed, and sends a wireless instruction for controlling the target load device 30 to be correspondingly opened or closed to the target load device 30 according to the control instruction under the condition that it is determined that the contact of the on-off device 12 is closed, so as to correspondingly control the target load device 30 to be opened or closed. The processor 13 obtains a current state of the target load device 30 after performing an action according to the wireless instruction, and reports the current state to a cloud, and/or reports the current state of the electronic device 10 to the cloud. The target load device 30 is a load device corresponding to a currently issued control instruction, and the target load device 30 and the electronic device 10 are in the same gateway. The processor 13 may be a main controller, such as a Micro Controller Unit (MCU), including an Analog to digital converter (ADC). The electronic device 10 may be various switches and sockets, and the on-off device 12 is a key component for implementing the on or off of the electronic device 10, for example, the on-off device 12 may be a relay in a typical embodiment.
Optionally, the electronic device 10 is a panel switch. The load devices 30 may be one or more, and are connected in series with the panel switches in a control loop, respectively. Please refer to fig. 2, which is a schematic circuit diagram of the panel switch correspondingly controlling two load devices. Optionally, the local key 11 may be an elastic mechanical switch, and if the load device is turned on or turned off by operating the local key 11, the processor 13 detects the elastic mechanical switch, and when a pressing operation on the elastic mechanical switch is detected, and when a current state of the corresponding load device 30 is an on state, the processor 13 acquires a turn-off control instruction according to the pressing operation; when the pressing operation on the elastic mechanical switch is detected, and when the current state of the corresponding load device 30 is the off state, the processor 13 acquires the opening control instruction according to the pressing operation. The load device may be turned on or off through remote operation of the terminal device 20, where an application client for remotely controlling the load device 30 is installed on the terminal device 20, and the terminal device 20 detects a touch operation on an open key or a close key in a control interface of the application, and correspondingly sends a control instruction to the processor 13 of the panel switch according to the touch operation.
In the above embodiment, the electronic device 10 makes the control command for the load device and the closing or opening control of the contacts of the on-off device 12 of the electronic device 10 independent from each other, and the contacts of the on-off device 12 can be kept in a normally closed state, so as to avoid that when the load device 30 is controlled to be closed, the contacts of the on-off device 12 of the electronic device 10 are opened, which results in an uncontrolled state after the load device is closed.
Fig. 3 is an internet of things system composed of electronic devices, a gateway 53, a server 52, a terminal device 51 and the like. This thing networking system includes: terminal device 51, server 22, gateway 53, electronic device 54, and router 55. The terminal device 51 may be any device having communication and storage functions, such as: the smart phone, the desktop computer, the notebook computer, the tablet computer or other smart communication devices with network connection functions. The server 52 may be a network access server, a database server, a cloud server, or the like. Optionally, the gateway 53 may be built based on a ZigBee protocol, and the electronic device 54 may be a device added in the gateway 53 in advance, for example, the electronic device 54 may be a device in a suite to which the gateway belongs when the gateway 53 leaves a factory; or a device subsequently connected to the gateway 53 by a user operation.
Optionally, a client capable of managing the smart home is installed in the terminal device 51, where the client may be an application client (such as a mobile phone APP) or a web page client, and is not limited herein.
Alternatively, the electronic device 54 may establish a network connection with the gateway 53 based on the ZigBee protocol, thereby joining the ZigBee network.
Both the gateway 53 and the terminal device 51 may be connected to a router 55, and may be connected to the ethernet through the router 55, and the router 55 may be connected to the server through a wired or wireless communication connection. For example, the gateway 53 and the terminal device 51 may store the acquired information in the server 52. Optionally, the terminal device 51 may also establish a network connection with the server 52 through 2G/3G/4G/5G, WiFi, so as to obtain data sent by the server 52.
Optionally, the local area network path shown in fig. 3 indicates that the terminal device 51, the router 55, the gateway 53, and the electronic device 54 are in the same local area network, and the wide area network path indicates that the electronic device 54, the gateway 53, the router 55, and the cloud 52 are in the same wide area network. When the terminal device 51 is in the same local area network as the router 55 and the gateway 53, the terminal device 51 may interact with the gateway 53 and the electronic device 54 connected to the gateway 53 through a local area network path as shown in fig. 3; the gateway 53 and the electronic device 54 connected to the gateway 53 may also interact through a wide area network path as shown in fig. 3. When the terminal device 51 is not in the same local area network as the router 55 and the gateway 53, the terminal device 51 may interact with the gateway 53 and the electronic device 54 connected to the gateway 53 through a wide area network path as shown in fig. 3. The internet of things system can further realize the control of turning on or off the internet of things load devices within the range of the local area network or correspondingly connected with the local area network through the electronic device 54.
The load devices may include, but are not limited to, smart home products such as smart light fixtures, automatic curtains, air conditioners, and the like.
Referring to fig. 4, an embodiment of the present application provides a load device control method, which is applied to the electronic device shown in fig. 1, where the load device control method includes, but is not limited to, S101, S103, and S105, and is specifically described as follows:
s101, acquiring a control instruction.
The electronic equipment acquires the control instruction may be that the electronic equipment detects a touch operation of a user on a local key, and acquires a control instruction for controlling the load equipment to be opened or closed according to the touch operation; or the terminal device detects touch operation of an open key or a close key in a control interface of an application program, correspondingly sends an open or close control instruction to the electronic device according to the touch operation, and the electronic device acquires the control instruction from the terminal device.
Optionally, the electronic device may include a first operating mode and a second operating mode, where in the first operating mode, the processor detects a touch operation on a local key, acquires a first control instruction for controlling the load device to be turned on or turned off according to the touch operation, and sends a wireless instruction for controlling the load device to be turned on or turned off correspondingly to the corresponding load device according to the first control instruction; in a second working mode, the processor detects that touch operation is carried out on a local key, acquires a second control instruction for controlling the contact of the on-off device to be closed or opened according to the touch operation, and correspondingly controls the contact of the on-off device to be closed or opened according to the second control instruction. In this embodiment, before the obtaining the control instruction, the method further includes: and acquiring a mode selection instruction, and switching to a target working mode according to the mode selection instruction.
As another optional implementation manner, the electronic device may form different control instructions according to different operations on the local key, the processor detects a click touch operation on the local key, acquires a first control instruction for controlling the load device to be turned on or turned off according to the click touch operation, and sends a wireless instruction for controlling the load device to be turned on or turned off correspondingly to the corresponding load device according to the first control instruction; the processor detects double-click touch operation on a local key, acquires a second control instruction for controlling the on-off device to be closed or opened according to the double-click touch operation, and correspondingly controls the on-off device to be closed or opened according to the second control instruction.
Optionally, the terminal device may provide, through a control interface of the application program, a first group of on keys and off keys for controlling the load device to be turned on or off, and a second group of on keys and off keys for controlling the contacts of the on-off device to be turned on or off, respectively. The method comprises the steps that the terminal equipment receives touch operation of a user on a first group of opening keys and closing keys through a control interface of the application program, sends a first control instruction for controlling the opening or closing of load equipment to the electronic equipment according to the touch operation, and the electronic equipment acquires the first control instruction from the terminal equipment; and the terminal equipment receives touch control operation of a user on the second group of opening keys and closing keys through a control interface of the application program, sends a second control instruction for controlling the on-off of the contact of the on-off device to the electronic equipment according to the touch control operation, and the electronic equipment acquires the second control instruction from the terminal equipment.
S105, under the condition that the contact of the on-off device is closed, sending a wireless instruction for controlling the corresponding opening or closing of one or more target load devices to one or more target load devices according to the control instruction; in this process, the contacts of the switching device are always closed.
The electronic equipment sends a wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction under the condition that the contact of the on-off device is determined to be closed, optionally, the control instruction for controlling the load equipment is independent from the control of the contact of the on-off device, and the contact of the on-off device can be in a normally closed state so as to keep the load equipment in a continuous controlled state. The control instruction refers to a control instruction received by the electronic device from the terminal device or a control instruction obtained according to touch operation of the local key, and the target load device refers to a load device which corresponds to the control instruction and is associated with the electronic device. The target load device and the electronic device are in the same gateway, and the wireless instruction for controlling the target load device to be correspondingly turned on or off may be a zigbee control command sent by the electronic device to the target load device.
The process refers to a process in which after the electronic device acquires the control instruction, the target load device is controlled according to the control instruction until a control result of the target load device is obtained. The determining in this process mainly includes two aspects, and in the first aspect, for example, the corresponding on or off success of the target load device is controlled according to the control instruction, in this process, after the electronic device acquires the control instruction, a wireless instruction for controlling the corresponding on or off of the one or more target load devices is sent to the target load device, and the target load device correspondingly completes an on or off action according to the wireless instruction. In a second aspect, taking the case that the control of the target load device according to the control instruction fails to be correspondingly turned on or turned off as an example, the method includes three cases: in case 1, the above-mentioned process refers to a process in which, after the electronic device obtains a control instruction, a wireless instruction for controlling the corresponding on or off of the one or more target load devices is sent to the target load devices, and the target load devices unsuccessfully complete corresponding on or off actions according to the wireless instruction; case 2, if the target load device does not successfully complete the control result of the corresponding opening or closing action according to the wireless instruction, the method further includes repeating multiple times of sending the wireless instruction to the target load device according to a preset requirement, and multiple times of sending the wireless instruction to enable the target load device to successfully complete the corresponding opening or closing action, in this process, after the electronic device receives the control instruction, multiple times of sending the wireless instruction for controlling the corresponding opening or closing of the one or more target load devices to the target load device until the target load device correspondingly completes the opening or closing action according to the multiple times of wireless instruction; or in case 3, before the target load device does not successfully complete the control result of the corresponding opening or closing action according to the wireless instruction, the method further includes repeating multiple times of sending the wireless instruction to the target load device according to a preset requirement, and the multiple times of sending the wireless instruction still does not enable the target load device to successfully complete the corresponding opening or closing action, where in the process, the step is that after receiving the control instruction, the electronic device sends multiple times of wireless instructions to the target load device, where the wireless instructions are used to control the one or more target load devices to be correspondingly opened or closed, and the target load device fails to successfully complete the corresponding opening or closing action according to the multiple times of wireless instructions. For the case 3 of the second aspect, after the process, the electronic device controls the contacts of the on-off device to open according to the control command.
Optionally, the electronic device may include multiple paths of controls, each path of control may include one or more load devices, and the on/off control instruction received by the electronic device may be for one of the paths of control corresponding to the load device. If the electronic device comprises three local keys, the load devices corresponding to the first local key are the load device 1 and the load device 2; the load device corresponding to the second local key is the load device 3; the load devices associated with the third local key are load device 4, load device 5 and load device 6. The electronic device may obtain an on/off control instruction according to a pressing operation on the third local key, and send a corresponding on/off control command to target load devices associated with the third local key, that is, the load device 4, the load device 5, and the load device 6, according to the on/off control instruction when the contact of the on/off device is closed.
Optionally, the electronic device may also include one or more load devices that are controlled in a unified manner, and after receiving the control instruction, the electronic device uniformly sends a corresponding control command for turning on or turning off the target load device, that is, all the load devices associated with the electronic device, according to the control instruction. For example, the electronic device includes a local key, the load devices associated with the local key include a load device 1, a load device 2, a load device 3, a load device 4, a load device 5, and a load device 6, the electronic device may obtain a control instruction for controlling the load device to be turned on or turned off according to a touch operation on the local key, and send a corresponding turn-on or turn-off control instruction to a target load device, that is, the load device 1, the load device 2, the load device 3, the load device 4, the load device 5, and the load device 6, according to the control instruction under a condition that a contact of the on-off device is closed. As another optional specific example, the electronic device is a dual-key panel switch, and includes a local key a and a local key B, the load device associated with the local key a includes a load device 1, the load device associated with the local key B includes a load device 2, the electronic device may acquire a control instruction for controlling the load device 1 to be turned on or turned off according to a touch operation on the local key a, and send a corresponding on or off control instruction to a target load device, that is, the load device 1, according to the control instruction under a condition that a contact of the on-off device is closed.
In the above embodiment, when the electronic device obtains the control instruction, whether the contact of the on-off device of the electronic device is currently closed is judged, and the load device is directly controlled according to the control instruction under the condition that the contact of the on-off device is closed, so that the contact of the on-off device can be kept in a normally closed state by shielding the control function of closing or opening the contact of the on-off device of the electronic device by the control instruction, thereby avoiding that the load device is in an offline uncontrolled state after being closed due to the fact that the contact of the on-off device of the electronic device is opened when the load device is controlled to be closed, and ensuring that the load device can be in a controlled state of remote control.
In some embodiments, referring to fig. 5, before S105, the method further includes: s103, judging whether the contact of the on-off device of the electronic equipment is closed currently.
After the electronic equipment receives the control instruction, whether the contact of the on-off device is closed or not is detected, and if the contact of the on-off device is closed at present, the load equipment is in a power supply state and is in a controlled state. The electronic equipment judges whether the contact of the on-off device is closed currently or not so as to ensure that the subsequent control steps of the load equipment can be executed. Optionally, whether the contact of the on-off device of the electronic device is closed may also be determined by the electronic device according to the current state of the contact of the on-off device stored inside, or by the on-off device actively sending information capable of representing the current state of the contact to the electronic device.
In some embodiments, the load device control method further includes:
and S104, controlling the contact of the on-off device to be closed under the condition that the contact of the on-off device is determined to be opened.
The electronic equipment acquires a control instruction, detects whether a contact of the on-off device is closed currently before sending a control instruction for controlling the target load equipment to be correspondingly opened or closed to the target load equipment according to the control instruction, and controls the contact of the on-off device to be closed under the condition that the contact of the on-off device is determined to be opened so as to ensure that the target load equipment is in a state of keeping power supply and being controlled.
In this embodiment, in the process that the electronic device controls the target load device according to the control instruction, by detecting the state of the contact of the on-off device, when the contact of the on-off device is disconnected, the contact of the on-off device is firstly controlled to be closed, so as to avoid that the power supply of the target load device is cut off and the target load device is in an offline state due to the disconnection of the on-off device of the electronic device, and thus, the remote control of the target load device can still be realized.
In some embodiments, the S101, acquiring a control instruction, includes: receiving a pressing instruction of a mechanical switch;
the S105, under the condition that the contact of the on-off device is closed, sending a wireless instruction for controlling the one or more target load devices to be correspondingly turned on or off to the one or more target load devices according to the control instruction, includes: and under the condition that the current mode is determined to be the wireless mode, controlling the contact of the on-off device to be closed according to the control instruction, and after the contact of the on-off device is closed, sending a wireless instruction for controlling one or more target load devices to be correspondingly opened or closed to one or more target load devices according to the control instruction.
When the electronic equipment detects the pressing operation of the local key, the electronic equipment receives a pressing instruction of the mechanical switch. The wireless mode is that the electronic device establishes communication connection with the intelligent load device through the gateway, and the electronic device can communicate data with the intelligent load device through the gateway or directly communicate data with the intelligent load device. After the electronic equipment receives a pressing instruction of the mechanical switch, the contact of the on-off device is controlled to be closed according to the control instruction to ensure that the target load equipment is switched to a controlled state, and then a wireless instruction is sent to the target load equipment according to the control instruction to correspondingly control the target load equipment to be opened or closed, so that the control of the target load equipment is not influenced by the contact of the on-off device to be opened or closed accurately in time.
In some embodiments, the sending, to the target load device according to the control instruction, a wireless instruction for controlling the target load device to turn on or off correspondingly includes:
acquiring the current working state of the target load equipment;
and generating a wireless instruction opposite to the current working state of the target load equipment according to the current working state of the target load equipment.
The control instruction may be an instruction sent by the terminal device to the electronic device according to the operation of the user on the touch key for controlling the target load device, or may be an instruction acquired by the electronic device according to the touch operation of the user on the local key. Optionally, the local key may be an elastic mechanical switch, or the touch key on the terminal device may be a single control key, the user acquires a control instruction every time the user presses the local key or every time the user touches the touch key, and after receiving the control instruction, the electronic device generates a wireless instruction opposite to the current working state of the target load device according to the current working state of the target load device. And if the current working state of the current load equipment is on, and the electronic equipment receives the control instruction, generating a wireless instruction for controlling the target load equipment to be off.
In this embodiment, the control instruction is intelligently determined to be an opening instruction or a closing instruction according to the current working state of the target load device, so that the number of keys for controlling the load device can be reduced, and the control operation is simplified.
In some embodiments, S105, when the contact of the on-off device is closed, after sending a wireless instruction to a target load device according to the control instruction, the wireless instruction controlling the target load device to be correspondingly turned on or off, further includes:
and S107, acquiring the current state of the target load equipment after the action is executed according to the wireless instruction, reporting the current state of the target load equipment after the action is executed according to the wireless instruction to a cloud end, and/or reporting the current state of the electronic equipment to the cloud end.
And the target load equipment receives the wireless instruction sent by the electronic equipment and executes corresponding action according to the wireless instruction. Optionally, each target load device is generally controlled in multiple ways, such as by an operation key of the target load device itself, by a local key of the electronic device, or by a remote control of the terminal device, so that when there are multiple target load devices associated with the electronic device, there may be inconsistency between current states of the multiple target load devices. The electronic equipment acquires a control instruction, and under the condition that the contact of the on-off device is determined to be closed, the electronic equipment uniformly sends an opening or closing wireless instruction to the target load equipment according to the control instruction, and the target load equipment executes switching or does not execute switching according to the current state of the target load equipment according to the opening or closing wireless instruction, so that the current state of the target load equipment after executing action according to the wireless instruction is consistent with the target control state of the wireless instruction.
Wherein the target control state of the control instruction may be determined according to the following manner:
firstly, a control interface of an application program of the terminal device correspondingly comprises an opening key for respectively controlling the load device to be opened and a closing key for controlling the load device to be closed, an opening control instruction or a closing control instruction is sent according to touch operation of a user on the opening key or the closing key, and the electronic device correspondingly sends a wireless instruction with an opening target control state or a wireless instruction with a closing target control state to the target load device according to the control instruction.
Secondly, the local key may be an elastic mechanical switch, or the touch key on the terminal device may be a single control key, the user acquires a control instruction every time the user presses the local key or every time the user touches the touch key, and after the electronic device receives the control instruction every time, the electronic device generates a wireless instruction opposite to the current working state according to the current working state of the electronic device, that is, generates a wireless instruction with a target control state opposite to the current working state of the electronic device. Taking the target load devices correspondingly associated with the electronic devices as examples, including the load device 1, the load device 2 and the load device 3, wherein the current state of the load device 1 is the on state, the current states of the load devices 2 and 3 are the off states, and at this time, the current state of the electronic equipment is the opening state, when the electronic equipment acquires a control instruction, under the condition that the contact of the on-off device is determined to be closed, a closed wireless command is uniformly sent to the target load equipment according to the control command and the working state of the on-off device as an opening state, the load device 1 is switched from an on state to an off state according to the wireless instruction, and the load devices 2 and 3 do not execute switching according to the wireless instruction, so that the current states of the target load device after executing actions according to the wireless instruction are both in the off state.
And thirdly, the local key can be an elastic mechanical switch, or the touch key on the terminal device can be a single control key, the user acquires a control instruction every time the user presses the local key or touches the touch key every time, and after the electronic device receives the control instruction every time, the electronic device generates a wireless instruction opposite to the current working state of the target load device according to the current working state of the target load device, namely, generates a wireless instruction opposite to the current working state of the target load device in the target control state. Still taking the example that the target load device corresponding to the electronic device includes the load device 1, the load device 2, and the load device 3, where the current state of the load device 1 is an open state, and the current states of the load device 2 and the load device 3 are closed states, at this time, when the electronic device obtains a control instruction once, and under a condition that it is determined that the contacts of the on-off device are closed, a wireless instruction for controlling the target load device to switch is uniformly sent to the target load device according to the control instruction, where the load device 1 switches from the open state to the closed state according to the wireless instruction, and the load device 2 and the load device 3 switch to the open state according to the wireless instruction, and it is ensured that the current states after the target load device performs an action according to the wireless instruction are both opposite to the previous states.
The current state of the electronic device and the current state of the corresponding load device may remain the same. When the load devices corresponding to the electronic device are more than one and the states of the plurality of load devices are inconsistent, if any one of the load devices is in the open state, the current state of the electronic device is in the open state, otherwise, the current state of the electronic device is in the closed state.
In the above embodiment, when the electronic device obtains the control instruction, it is determined whether the contact of the on-off device of the electronic device is currently closed, and under the condition that the contact of the on-off device is closed, the load device is directly controlled according to the control instruction, and by shielding the control function of the control instruction on the closing or opening of the contact of the on-off device of the electronic device, the contact of the on-off device can be kept in a normally closed state, so as to avoid that the load device is in an offline uncontrolled state after being closed due to the opening of the contact of the on-off device of the electronic device when the load device is controlled to be closed, and ensure that the load device can be in a controlled state of remote control; the contact of the on-off device of the electronic equipment can be kept in a normally closed state, and after the electronic equipment controls the load equipment, the current state of the load equipment and/or the current state of the electronic equipment is acquired and reported to the cloud so as to ensure that the current state of the load equipment can be accurately acquired before the load equipment is controlled, so that the load equipment can be more intelligently and accurately in a remote controlled state.
Optionally, referring to fig. 6, when the contact of the on-off device is closed, after the wireless instruction for controlling the target load device to be correspondingly turned on or turned off is sent to the target load device according to the control instruction, the method includes:
s1061, judging whether the target load equipment successfully executes the corresponding action according to the wireless instruction;
and S1062, when the target load device fails to execute the corresponding action and the current failure times are within the set range, returning to the step of sending a wireless instruction for controlling the corresponding on or off of the target load device to the target load device according to the control instruction.
The electronic equipment judges whether the target load equipment successfully executes the corresponding action according to the wireless instruction, if the target load equipment fails to execute the corresponding action, the step of sending the wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction is returned, and the steps are repeated in such a way, so that the accuracy of the control of the target load equipment can be improved by monitoring the action execution condition of the target load equipment and performing repeated control under the condition of unsuccessful execution. By recording the times of failure of executing the action by the target load equipment and setting one of the conditions of repeated control under the condition that the failure times are unsuccessful in executing the action on the target load equipment within the set range, the situation that the cycle times are excessive or errors occur can be avoided from being circulated all the time, and the control efficiency can be improved while the accuracy of controlling the target load equipment is ensured.
Taking the set range as three times as an example, the electronic device judges whether the target load device successfully executes the corresponding action according to the wireless instruction, if the action is unsuccessful, the current failure frequency is recorded as one time, the step of sending a wireless instruction for controlling the corresponding opening or closing of the target load device to the target load device according to the control instruction is returned, and the wireless instruction for controlling the corresponding opening or closing of the target load device is sent to the target load device again; the electronic equipment judges whether the target load equipment successfully executes the corresponding action according to the wireless instruction again, if the action is still unsuccessful, the current failure frequency is recorded as two times, the step of sending the wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction is returned again, and the wireless instruction for controlling the corresponding opening or closing of the target load equipment is sent again to the target load equipment; and repeating the steps until the electronic equipment judges that the target load equipment successfully executes the corresponding action according to the wireless instruction or the current failure times exceed three times.
Optionally, the step S1061 of determining whether the target load device successfully executes the corresponding action according to the wireless instruction includes:
receiving a response instruction returned by the target load equipment according to the wireless instruction, and judging whether the target load equipment successfully executes the corresponding action according to the wireless instruction according to the response instruction;
determining that the target load equipment fails to execute the corresponding action under the condition that a response instruction returned by at least one target load equipment is not received;
and under the condition that a response instruction returned by each target load device is received, determining that the target load devices execute the corresponding action successfully.
The response instruction may refer to a message indicating that the receiving is successful, which is returned to the electronic device after the target load device receives the wireless instruction sent by the electronic device. Taking zigbee communication between the electronic device and the target load device as an example, the electronic device may send a zigbee wireless command to the target load device, and the target load device returns a zigbee application layer message acknowledgement message (ACK) after receiving the wireless command. After the electronic equipment sends out the wireless command, whether all the target load equipment replies the response command is judged, if all the target load equipment replies the response command, the control is considered to be successful, and the target load equipment executes the corresponding action successfully; if any one of all the target load devices does not reply the response instruction, the current control is not successful, and the target load devices fail to execute the corresponding action.
In some embodiments, when the contacts of the on-off device are closed, after sending a wireless instruction for controlling the target load device to be correspondingly turned on or off to the target load device according to the control instruction, the method includes:
and S1063, sending a contact opening instruction to the on-off device to control the contact opening of the on-off device under the condition that the target load equipment fails to execute the corresponding action and the current failure frequency exceeds a set range.
The electronic equipment judges whether the target load equipment successfully executes the corresponding action according to the wireless instruction, if the target load equipment fails to execute the corresponding action, the step of sending the wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction is returned, and the steps are repeated in such a way, so that the accuracy of the control of the target load equipment can be improved by monitoring the action execution condition of the target load equipment and performing repeated control under the condition of unsuccessful execution. The method can avoid the situation that the cycle times are excessive or errors occur by recording the times of action failure executed by the target load equipment and setting one of conditions for repeated control under the situation that the action failure executed by the target load equipment is unsuccessful within a set range of the failure times, and when the times of action failure executed by the target load equipment exceeds the set range, the contact of the on-off device is controlled to be disconnected, the power supply of the target load equipment is cut off, and at the moment, if the current control instruction to the target load equipment is a closing control instruction, the contact of the on-off device is controlled to be disconnected, so that the control target of closing the target load equipment is achieved; if the control instruction to the target load equipment is a starting control instruction, the current state of the target load equipment can be uniformly reset to be a closed state by disconnecting the contact of the on-off device, which is equivalent to automatic error repair, and the target load equipment can be accurately and effectively controlled by the electronic equipment according to the next control instruction.
In some embodiments, when the contacts of the on-off device are closed, after sending a wireless instruction for controlling the target load device to be correspondingly turned on or off to the target load device according to the control instruction, the method includes:
s1064, determining, when the target load device successfully executes the corresponding action, a current state of the target load device according to at least one of the following:
determining the current state of the target load equipment according to the control instruction;
receiving the current state obtained by the gateway from the corresponding target load equipment, wherein the target load equipment is determined by the gateway according to the incidence relation between the electronic equipment and the load equipment;
and receiving the current state sent by the target load equipment according to the incidence relation between the electronic equipment and the load equipment.
The obtaining, by the electronic device, the current state of the target load device may include multiple modes.
In the first mode, in the case that the electronic device judges that the target load device successfully executes the corresponding action, if the electronic equipment sends a zigbee wireless instruction to the target load equipment according to the control instruction, the target load equipment returns an ACK response instruction after receiving the zigbee wireless instruction, when the electronic equipment receives the ACK response instructions returned by all the target load equipment, then it represents that the target load device executes the corresponding action successfully, at this time, the current state of the target load device can be determined according to the target control state of the control instruction, for example, the target control state of the control instruction is on, determining that the current states of the target load devices are all open states according to the control instruction, if the target control state of the control instruction is closed, determining that the current states of the target load equipment are all closed states according to the control instruction.
In a second manner, the electronic device obtains the current state of the target load device from the gateway. Optionally, the terminal device may obtain a mapping relationship between the electronic device and the load device according to a configuration of a user, to form an association relationship between the electronic device and the load device, the terminal device sends and stores the association relationship between the electronic device and the load device to the gateway, and when the gateway receives a current state reported by a certain load device, the gateway sends the current state of the load device to the corresponding electronic device according to the association relationship between the electronic device and the load device. After a user configures the mapping relation between the electronic equipment and the plurality of load equipment through the terminal equipment, the first path controls the corresponding associated load equipment 1 and the load equipment 2; the second path control corresponds to the associated load device 3; for example, the third path of control corresponds to the associated load device 4, the load device 5, and the load device 6, the gateway stores the association relationship between the electronic device and the load device, after the electronic device sends an instruction command to the target load device, that is, the load device 1 and the load device 2, according to the on/off control instruction of the first path of control, the load device 1 and the load device 2 report the current state to the gateway after performing an action according to the control command, and the gateway obtains the current state of the load device 1 and the load device 2, and may determine the electronic device corresponding to the load device 1 and the load device 2 according to the association relationship between the electronic device and the load device, and send the current state of the load device 1 and the load device 2 to the corresponding electronic device.
In a third mode, the electronic device obtains its current state from the target load device. Optionally, the terminal device may obtain a mapping relationship between the electronic device and the load device according to a configuration of a user, to form an association relationship between the electronic device and the load device, the terminal device sends the association relationship between the electronic device and the load device to the gateway, the gateway informs each load device of a corresponding relationship between the load device and the electronic device, the load device records the association relationship between itself and the electronic device, and when a current state of the load device changes, directly reports the current state to the corresponding electronic device according to the recorded association relationship between itself and the electronic device. The load device records the association relationship between itself and the electronic device by setting an attribute value, and when the corresponding attribute value of the load device changes, the load device actively sends the attribute value to the corresponding electronic device, thereby completing the report of the current state.
The mode of the electronic device for acquiring the current state of the target load device can be one or a combination of multiple modes, and the current state of the target load device can be accurately acquired in time, so that the current state of the target load device can be accurately known before the target load device is remotely controlled, and the accuracy of remote control is effectively guaranteed.
In some embodiments, the obtaining the control instruction comprises:
detecting touch operation on the electronic equipment, judging whether the touch operation is a first preset operation for controlling the on/off of load equipment or not according to the touch operation, and acquiring a control instruction according to the first preset operation; and/or the presence of a gas in the gas,
and receiving a control instruction sent by the terminal equipment.
The electronic equipment comprises a local key, and different preset operations applied to the local key can be preset to correspond to different control instructions. For example, taking the first preset operation as the single touch operation applied to the local key as an example, the application of the single touch operation to the local key may be preset to correspond to a control instruction for controlling the target load device. And when the electronic equipment detects that the single touch operation is applied to the local key, the electronic equipment correspondingly acquires a control instruction for controlling the target load equipment to be turned on or turned off.
The terminal device may provide different control keys through a control interface of the application program, and the user may touch or click different control keys to send corresponding control instructions, for example, the terminal device provides an open key and a close key for controlling the target load device to open or close through the control interface of the application program, and when the terminal device detects a touch operation of the user on the open key and the close key, the terminal device correspondingly sends a control instruction for controlling the target load device to open or close to the electronic device, and the electronic device receives the control instruction sent by the terminal device.
In this embodiment, a local key of the electronic device may send a control instruction to the load device when receiving a preset operation, or a control interface of the terminal device may send a control instruction to the load device through a preset open key or close key, so as to shield a control function of the control instruction on closing or opening of a contact of an on-off device of the electronic device, so that the contact of the on-off device may be kept in a normally closed state, thereby avoiding an offline uncontrolled state after the load device is closed due to opening of the contact of the on-off device of the electronic device when the load device is controlled to be closed, and ensuring that the load device may be in a controlled state of remote control.
In some embodiments, the load device control method further includes:
detecting touch operation on the electronic equipment, judging whether the touch operation is a second preset operation for controlling the contact of the on-off device to be disconnected or not according to the touch operation, and acquiring a control instruction for controlling the contact of the on-off device to be disconnected according to the second preset operation; and/or receiving a control instruction which is sent by terminal equipment and used for controlling the disconnection of the contact of the on-off device;
and controlling the contact of the on-off device to be disconnected according to the control instruction of the contact disconnection of the on-off device.
The electronic equipment comprises a local key, and different preset operations applied to the local key can be preset to correspond to different control instructions. For example, taking the second preset operation as an example of applying a double-click touch operation to the local key, the application of the double-click touch operation to the local key may be preset to correspond to a control instruction for controlling the contact of the on-off device to be turned off. And when the electronic equipment detects that the double-click touch operation is applied to the local key, the electronic equipment correspondingly acquires a control instruction for controlling the contact of the on-off device to be disconnected.
The terminal device can provide different control keys through the control interface of the application program, and a user can touch or click different control keys to send corresponding control instructions, for example, the terminal device provides a restart key for the disconnection of the contact of the on-off device through the control interface of the application program, when the terminal device detects that the user performs touch operation on the restart key, the terminal device correspondingly sends a control instruction for controlling the disconnection of the contact of the on-off device to the electronic device, and the electronic device receives the control instruction for controlling the disconnection of the contact of the on-off device, which is sent by the terminal device.
In this embodiment, the local key of the electronic device may send the disconnection control instruction to the contact of the on-off device when receiving the second preset operation, or the control interface of the terminal device may send the disconnection control instruction to the contact of the on-off device through a preset restart key, so as to meet the control requirements of the user in different application scenarios.
In some embodiments, the load device control method further includes:
displaying the current state of the target load device; and/or the presence of a gas in the gas,
and determining the current state of the electronic equipment according to the current state of the target load equipment, and controlling an indication module to send out corresponding indication information.
The electronic device may include a display module, the display module may include a display screen, and the electronic device may display the current state of the target load device through the display module so as to facilitate viewing. Optionally, the electronic device determines the current state of the electronic device according to the current state of the target load device, where the current state of the electronic device is consistent with the current state of the load device when the electronic device corresponds to one associated load device; when the electronic device is provided with a plurality of corresponding associated load devices, if the current state of any one of the load devices is the on state, the current state of the electronic device is the on state, otherwise, the current state of the electronic device is the off state. The display module can comprise an indicator light, the electronic device obtains the current state of the target device, determines the current state of the electronic device according to the current state of the target load device, and controls the indicator light to perform corresponding display, so that the current state of the target load device can be intuitively known according to the indicator light.
Referring to fig. 7, in an exemplary embodiment, the load device control apparatus may be implemented by a processor. The load device control apparatus includes an obtaining module 141, configured to obtain a control instruction; the transmitting module 143 is configured to transmit a wireless instruction for controlling the target load devices to be correspondingly turned on or turned off to one or more target load devices according to the control instruction when the contacts of the on-off device are closed; in this process, the contacts of the switching device are always closed.
In some embodiments, the sending module 143 is further configured to control the contact of the on/off device to be closed if it is determined that the contact of the on/off device is opened.
In some embodiments, the obtaining module 141 is configured to receive a pressing instruction of a mechanical switch; the sending module 143 is configured to, when it is determined that the current mode is the wireless mode, control the closing of the contact of the on-off device according to the control instruction, and send, according to the control instruction, a wireless instruction for controlling the corresponding turning on or off of the one or more target load devices to the one or more target load devices after the closing of the contact of the on-off device.
In some embodiments, the sending module 143 is further configured to obtain a current working state of the target load device; and generating a wireless instruction opposite to the current working state of the target load equipment according to the current working state of the target load equipment.
In some embodiments, the system further includes a reporting module, configured to acquire a current state of the target load device after performing an action according to the wireless instruction, and report the current state of the target load device after performing the action according to the wireless instruction to a cloud, and/or report the current state of the electronic device to the cloud.
In some embodiments, the system further includes a repeated execution module, configured to determine whether the target load device executes the corresponding action according to the wireless instruction successfully; and returning to the step of sending a wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction under the condition that the target load equipment fails to execute the corresponding action and the current failure times are within a set range.
In some embodiments, the repeated execution module is specifically configured to receive a response instruction returned by the target load device according to the wireless instruction, and determine, according to the response instruction, whether the target load device executes the corresponding action according to the wireless instruction successfully; determining that the target load equipment fails to execute the corresponding action under the condition that a response instruction returned by at least one target load equipment is not received; and under the condition that a response instruction returned by each target load device is received, determining that the target load devices execute the corresponding action successfully.
In some embodiments, the repeated execution module is further configured to send a contact opening instruction to the on-off device to control the opening of the contact of the on-off device when the target load device fails to execute the corresponding action and the current failure frequency exceeds a set range.
In some embodiments, the reporting module is specifically configured to, when the target load device successfully executes the corresponding action, determine the current state of the target load device according to at least one of the following: determining the current state of the target load equipment according to the control instruction; receiving the current state obtained by the gateway from the corresponding target load equipment, wherein the target load equipment is determined by the gateway according to the incidence relation between the electronic equipment and the load equipment; and receiving the current state sent by the target load equipment according to the incidence relation between the electronic equipment and the load equipment.
In some embodiments, the obtaining module 141 is specifically configured to detect a touch operation on the electronic device, determine whether the touch operation is a first preset operation for controlling turning on/off of a load device according to the touch operation, and obtain a control instruction according to the first preset operation; and/or receiving a control instruction sent by the terminal equipment.
In some embodiments, the obtaining module 141 is further configured to detect a touch operation on the electronic device, determine whether the touch operation is a second preset operation for controlling the disconnection of the contact of the on-off device according to the touch operation, and obtain a control instruction for controlling the disconnection of the contact of the on-off device according to the second preset operation; and/or receiving a control instruction which is sent by terminal equipment and used for controlling the disconnection of the contact of the on-off device; and controlling the contact of the on-off device to be disconnected according to the control instruction of the contact disconnection of the on-off device.
In an embodiment, the system further includes a display module, configured to display the current state of the target load device; and/or determining the current state of the electronic equipment according to the current state of the target load equipment, and controlling an indication module to send out corresponding indication information.
It should be noted that: in the process of controlling the load device by shielding the control function of sending the control command to the load device to control the contacts of the on-off device, the load device control device provided in the above embodiment is exemplified by the division of the program modules, and in practical application, the processing may be distributed to different program modules as needed, that is, the internal structure of the device may be divided into different program modules to complete all or part of the processing described above. In addition, the load device control apparatus and the load device control method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Referring to fig. 8, a load device control method according to another embodiment of the present application is applied to an electronic device, and the load device control method includes, but is not limited to, S201, S203, and S205, which are specifically described as follows:
s201, sending a wireless instruction for controlling the load equipment to be turned on or turned off to at least one load equipment.
The at least one load device refers to one or more load devices which are associated with the electronic device and can be switched on and off correspondingly according to a control command of the electronic device. The load device and the electronic device may be in the same gateway, and the electronic device may be wirelessly connected to the electronic device through the gateway, and send the wireless instruction to the corresponding load device through the gateway, or directly send the wireless instruction to the corresponding load device.
S203, judging whether the load equipment successfully performs the opening or closing action according to the wireless command.
And S205, when the action of opening or closing the load equipment fails and the current failure frequency is within a set range, returning to the step of sending a wireless instruction for controlling the opening or closing of the load equipment to at least one load equipment.
In the above embodiment, the electronic device determines whether the load device successfully executes the corresponding action according to the wireless instruction, and if the load device fails to execute the corresponding action, returns to the step of sending the wireless instruction for controlling the load device to be correspondingly turned on or off according to the control instruction, and repeats the steps, so that the accuracy of controlling the load device can be improved by monitoring the action execution condition of the load device and performing repetitive control when the execution is unsuccessful. By recording the times of failure of the load equipment in executing the action and setting one of the conditions that the failure times are in the set range and the repeated control is carried out under the condition that the action of the load equipment is not successful, the situation that the cycle times are too large or the cycle times are wrong can be avoided from being carried out all the time, and the control efficiency can be improved while the accuracy of the control over the load equipment is ensured.
In some embodiments, the step S203 of determining whether the action of the load device performing the turning on or off according to the wireless instruction is successful includes:
receiving a response instruction returned by the at least one load device according to the wireless instruction;
if a response instruction returned by one or more load equipment is not received, determining that the action of opening or closing the load equipment fails;
and under the condition that a response instruction returned by each load device is received, determining that the action of opening or closing the load devices is successful.
The response instruction may be a message indicating that the receiving is successful, which is returned to the electronic device after the load device receives the wireless instruction sent by the electronic device. Taking zigbee communication between the electronic device and the load device as an example, the electronic device may send a zigbee wireless command to the load device, and the load device returns a zigbee application layer message acknowledgement message (ACK) after receiving the wireless command. After the electronic equipment sends out the wireless command, whether all corresponding load equipment reply the response command or not is judged, if all corresponding load equipment reply the response command, the control is considered to be successful, and the load equipment executes the corresponding action successfully; if any one of all the load devices does not reply the response instruction, the current control is not successful, and the load device fails to execute the corresponding action.
Referring to fig. 9, in some embodiments, after determining whether the action of turning on or off the load device according to the wireless command is successful, the step S203 further includes:
s204, when the target load equipment fails to execute the corresponding action and the current failure frequency exceeds a set range, sending a contact opening instruction to the on-off device to control the contact of the on-off device to be opened; or the like, or, alternatively,
and S206, under the condition that the target load device successfully executes the corresponding action, acquiring the current state of the target load device after the action is executed according to the wireless instruction, and reporting the current state of the target load device after the action is executed according to the wireless instruction to a cloud end, and/or reporting the current state of the electronic device to the cloud end.
The electronic equipment can avoid continuous circulation under the condition of excessive circulation times or errors by recording the times of failure of action execution of the load equipment and setting the failure times in a set range as one of conditions for repeated control under the condition of unsuccessful action execution of the load equipment, and when the times of failure of corresponding action execution of the load equipment exceed the set range, the contact of the on-off device is controlled to be disconnected, the power supply of the load equipment is cut off, and at the moment, if the current control instruction to the load equipment is a closing control instruction, the contact of the on-off device is controlled to be disconnected, so that the control target of closing the load equipment is achieved; if the control instruction to the load equipment is a starting control instruction, the current state of the load equipment can be uniformly reset to be a closed state by disconnecting the contact of the on-off device, which is equivalent to automatic error repair, and the electronic equipment is ensured to be accurate and effective when controlling the load equipment according to the next control instruction.
In some embodiments, the sending of the wireless instruction to the at least one load device to control the load device to turn on or off includes:
acquiring a control instruction for controlling the on or off of the at least one load device, and detecting the current state of a contact of an on-off device of the electronic equipment based on the control instruction;
under the condition that the contact of the on-off device is opened, the contact is controlled to be closed;
and under the condition that the contact of the on-off device is closed, generating a wireless instruction opposite to the current working state of the at least one load device according to the control instruction, or generating a wireless instruction opposite to the current working state of the on-off device according to the control instruction, and sending the wireless instruction to the at least one load device.
In the above embodiment, the control instruction may be that the electronic device detects a touch operation of a user on a local key, and acquires a control instruction for controlling the load device to be turned on or turned off according to the touch operation; or the terminal device detects touch operation of an open key or a close key in a control interface of an application program, correspondingly sends an open or close control instruction to the electronic device according to the touch operation, and the electronic device acquires the control instruction from the terminal device. The electronic equipment obtains a control instruction, before a control instruction for controlling the corresponding opening or closing of the load equipment is sent to the load equipment according to the control instruction, whether a contact of the on-off device is closed or not is detected, the contact of the on-off device is controlled to be closed under the condition that the contact of the on-off device is determined to be opened, and the load equipment is in a power supply state and is in a controlled state under the condition that the contact of the on-off device is closed. The electronic equipment judges whether the contact of the on-off device is closed currently or not so as to ensure that the follow-up control on the load equipment can be accurately and effectively executed.
And after receiving the control instruction, the electronic equipment generates a wireless instruction opposite to the current working state of the load equipment according to the current working state of the load equipment. If the current working state of the load equipment is on at present, and the electronic equipment receives the control instruction, a wireless instruction for controlling the load equipment to be off is generated. And generating a wireless instruction opposite to the current working state of the electronic equipment according to the current state of the electronic equipment, wherein if the current working state of the electronic equipment is on and the electronic equipment receives the control instruction, the wireless instruction for controlling the load equipment to be off is generated. The control instruction is intelligently determined to be an opening instruction or a closing instruction according to the current working state of the target load equipment or the current working state of the electronic equipment, so that the number of keys for controlling the load equipment can be reduced, and the control operation is simplified.
Referring to fig. 10, another aspect of the present application provides a load device control apparatus, which may be implemented by a processor in an exemplary embodiment. The load device control apparatus includes an instruction module 241, configured to send a wireless instruction to at least one load device to control the load device to turn on or turn off; an action module 242, configured to determine whether the load device successfully performs an opening or closing action according to the wireless instruction; a returning module 243, configured to, when the action of turning on or off the load device fails and the current failure frequency is within a set range, return to the step of sending the wireless instruction for controlling turning on or off the load device to at least one load device.
In some embodiments, the action module 242 is configured to receive a response command returned by the at least one load device according to the wireless command; if a response instruction returned by one or more load equipment is not received, determining that the action of opening or closing the load equipment fails; and under the condition that a response instruction returned by each load device is received, determining that the action of opening or closing the load devices is successful.
In some embodiments, the action module 242 is further configured to send a contact opening instruction to the on-off device to control the opening of the contact of the on-off device when the target load device fails to perform the corresponding action and the current failure frequency exceeds a set range; or, the processing unit is further configured to, when the target load device successfully executes the corresponding action, obtain a current state of the target load device after executing the action according to the wireless instruction, and report the current state of the target load device after executing the action according to the wireless instruction to a cloud, and/or report the current state of the electronic device to the cloud.
In some embodiments, the instruction module 241 is further configured to obtain a control instruction for controlling the at least one load device to be turned on or off, and detect a current state of a contact of an on/off device of the electronic device based on the control instruction; under the condition that the contact of the on-off device is opened, the contact is controlled to be closed; and under the condition that the contact of the on-off device is closed, generating a wireless instruction opposite to the current working state of the at least one load device according to the control instruction, or generating a wireless instruction opposite to the current working state of the on-off device according to the control instruction, and sending the wireless instruction to the at least one load device.
It should be noted that: in the process of implementing intelligent control on the load device, the load device control apparatus provided in the above embodiment is only illustrated by dividing the above program modules, and in practical applications, the above processing may be distributed to different program modules as needed, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the above-described processing. In addition, the load device control apparatus and the load device control method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Referring to fig. 11, an optional hardware structure diagram of the electronic device 10 provided in this embodiment is shown, where the electronic device 10 includes a processor 13 and a memory 14, the memory 14 is used for storing various types of data to support an operation of a load device control apparatus, and stores a computer program for implementing the load device control method provided in any embodiment of this application, and when the computer program is executed by the processor, the steps of the load device control method provided in any embodiment of this application are implemented, and the same technical effects can be achieved, and are not repeated here to avoid repetition. The electronic equipment can be an intelligent switch, an intelligent socket and other electronic products for realizing the on-off control of the loop in which the electronic equipment is located.
Please refer to fig. 12, which is a block diagram of a hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 12, the electronic device is a panel switch 64. Among them, the panel switch 64 may generate a relatively large difference due to different configurations or performances, and may include one or more processors 64a (CPUs) (the processor 64a may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 64b for storing the data 1400, one or more storage media 1600 (such as one or more mass storage devices) for storing the application 1500 or the data 1400, a relay J, and a mechanical switch K. The processor 64a is respectively connected with the relay J, the mechanical switch K, the memory 64b and the storage medium 1600; memory 64b and storage medium 1600 may be transient or persistent storage. The program stored in the storage medium 1600 may include one or more modules, each of which may include a series of instruction operations for a server. Further, the processor 64a may be configured to communicate with the storage medium 1600 to execute a series of instruction operations in the storage medium 1600 on the switch 64.
When the mechanical switch K is pressed, the processor 64a receives a pressed signal command, the relay J is a controlled switch and is connected to the control end of the processor 64a, the processor 64a can output a control signal through the control end to control the opening and closing of the relay J, the relay J is connected to the main circuit, the main circuit is connected to a power supply and a controlled device, and the power supply can be 220V mains supply.
The panel switch 64 may also include one or more internal power supplies 1000, one or more wired or wireless network interfaces 1100, one or more input-output interfaces 1200, and/or one or more operating systems 1300, such as Windows server, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The input output interface 1200 may be used to receive or transmit data 1400 via a network. Specific examples of such networks may include wireless networks provided by the communications provider of the switch 64. In one example, the i/o interface 1200 includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the internet. In one example, the input/output interface 1200 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner. It will be understood by those skilled in the art that the structure shown in fig. 12 is merely illustrative and is not intended to limit the structure of the panel switch 64 described above. For example, the panel switch 64 may also include more or fewer components than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
On another aspect of the embodiments of the present application, a load device control system is further provided, including any of the electronic devices described in any of the embodiments of the present application, where the electronic device is in communication with the load device, and the electronic device is configured to correspondingly control an on or off state of at least one of the load devices.
The electronic equipment is further used for acquiring the on or off state of the load equipment, and under the condition that the number of the load equipment is one, the on or off state of an indicator light of the electronic equipment is consistent with the on or off state of the load equipment; and under the condition that the number of the load equipment is multiple, when any one load equipment is in an on state, the indicator light of the electronic equipment is in an on state, otherwise, the indicator light of the electronic equipment is in an off state.
The load device control system further comprises a gateway, wherein the electronic device establishes communication connection with the load device through the gateway, and the electronic device is further configured to acquire an on or off state of the load device and report the on or off state of the load device to the gateway.
In the above load device control system, the electronic device is used to implement the load device control method provided in any embodiment of the present application, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
In another aspect of the embodiments of the present application, a load device control system is further provided, including any one of the electronic devices, the gateway, and the terminal device described in the present application, where the electronic device and the terminal device establish a communication connection through the gateway, and the electronic device is configured to correspondingly control at least one load device.
Optionally, the terminal device is configured to obtain a configuration instruction, determine, according to the configuration instruction, an association relationship between the electronic device and the load device, and send the association relationship to the gateway;
and the gateway acquires the current state of the target load equipment according to the incidence relation and sends the current state to the corresponding electronic equipment, and/or the gateway sends a subscription instruction to the target load equipment according to the incidence relation, controls the target load equipment to send the current state of the target load equipment to the corresponding electronic equipment according to the subscription instruction, and/or determines the current state of the target load equipment according to the control instruction.
The user may use the terminal device to configure the corresponding relationship between the electronic device and the load device, for example, the terminal device may obtain a configuration instruction input by the user through a configuration page of the application program, determine, according to the configuration instruction, an association relationship between the electronic device and the load device, and send the association relationship to the gateway. The configuration instruction comprises information which is used by the electronic device to control the load devices correspondingly, or information which is used by each control in the multi-path control of the electronic device to control the load devices respectively. And the terminal equipment sends the incidence relation between the electronic equipment and the load equipment to the gateway so as to subscribe the current state information of the target load equipment through the gateway or directly subscribe the current state information of the target load equipment to the corresponding target load equipment through the gateway. Optionally, the electronic device may also determine the current state of the target load device directly according to a wireless instruction sent to the target load device after receiving the control instruction.
In the above load device control system, the electronic device is used to implement the load device control method provided in any embodiment of the present application, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the foregoing working mode configuration method and the foregoing switch control method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
In order to understand the load device control method provided in the present application more completely, please refer to fig. 13, an electronic device is taken as a panel switch, the panel switch and a corresponding load device are in the same Zigbee gateway, the corresponding load device includes a load device 1 and a load device 2, and the panel switch and the load device perform selective specific exemplary description by taking Zigbee wireless communication as an example.
S11, the terminal equipment sends a control instruction for controlling the on/off of the target load equipment to the panel switch; the target load devices include a load device 1 and a load device 2.
S12, the panel switch acquires an opening/closing control instruction and detects whether the contact of the on-off device is in a closed state;
if the contact of the on-off device is open, S121 is executed, and if the contact of the on-off device is closed, S122 is executed.
S121, controlling the contact of the on-off device to be closed;
s122, sending a zigbee control command to the target load equipment;
s13, after receiving the zigbee control command, the target load equipment returns an ACK response instruction;
s14, the panel switch judges whether all the target load devices return an ACK response instruction; i.e. whether both load device 1 and load device 2 have returned an ACK response instruction.
If the ACK response commands returned by all the target load devices are successful, the control is performed, and steps S15, S161, and S162 are executed; if the panel switch does not receive the ACK response command returned by any target load equipment, executing S17 and S18;
s15, the panel switch reports the current state to the gateway;
s161, the target load device reports the respective current state to the gateway, and/or S162, the target load device reports the respective current state to the panel switch; namely, the load devices 1 and 2 report the current state to the gateway and/or the panel switch.
S17, resending the zigbee control command to the target load device, and if the command is resent for three times and an ACK response command returned by any one of the target load devices is not received, failing to control;
and S18, the panel switch controls the contact of the on-off device to be opened.
Steps S15, S161, S162 are executed again.
The panel switch can directly control the load equipment through the terminal equipment, the terminal equipment sends a control instruction for controlling the load equipment, and the contact of the on-off device can be kept in a normally closed state, so that the situation that the load equipment is in an offline uncontrolled state after being closed due to the fact that the contact of the on-off device of the electronic equipment is disconnected when the load equipment is controlled to be closed is avoided, and the load equipment can be ensured to be in a controlled state of remote control. When the panel switch is in the condition that the contact of the on-off device is disconnected, if a user wants to remotely and directly control the load equipment through the terminal equipment, the contact of the on-off device is firstly controlled to be closed, and then a corresponding on/off control command is sent to the load equipment according to the obtained on/off control command for controlling the load equipment to be directly controlled, so that the load equipment can be intelligently switched to an effective controlled state.
Please refer to fig. 14, which is a specific example illustration of another optional load device control method, where an electronic device is used as a panel switch, the panel switch and a corresponding load device are in the same Zigbee gateway, the panel switch includes two local keys, the load device corresponding to the local key is a load device 1, the load device corresponding to the local key 2 is a load device 2 and a load device 3, and the panel switch and the load device communicate wirelessly through Zigbee.
S21, the electronic equipment detects the preset operation of the local key 2 and obtains a control instruction for controlling the on/off of the target load equipment; the target load devices include a load device 2 and a load device 3.
S22, the panel switch acquires an opening/closing control instruction and detects whether the contact of the on-off device is in a closed state;
if the contact of the on-off device is open, S221 is executed, and if the contact of the on-off device is closed, S222 is executed.
S221, controlling the contact of the on-off device to be closed;
s222, sending a zigbee control command to the target load equipment;
s23, after receiving the zigbee control command, the target load equipment returns an ACK response instruction;
s24, the panel switch judges whether all the target load devices return an ACK response instruction; i.e. whether both load device 2 and load device 3 returned an ACK response instruction.
If the ACK response commands returned by all the target load devices are successful, the control is performed, and steps S25, S261, and S262 are executed; if the panel switch does not receive the ACK response command returned by any target load equipment, executing S27 and S28;
s25, the panel switch reports the current state to the gateway;
s261, the target load devices report respective current states to the gateway, and/or S262, the target load devices report respective current states to the panel switch; namely, the load devices 2 and 3 report the current state to the gateway and/or the panel switch.
S27, resending the zigbee control command to the target load device, and if the command is resent for three times and an ACK response command returned by any one of the target load devices is not received, failing to control;
and S28, the panel switch is disconnected to the contact of the on-off control device.
Steps S25, S261, S262 are executed again.
The panel switch can directly control the load equipment according to the local key, the local key of the panel switch is operated to send a control instruction for controlling the load equipment, and the contact of the on-off device of the electronic equipment can be kept in a normally closed state by shielding the on/off control instruction and performing a closing or opening control function on the contact of the on-off device of the electronic equipment, so that the situation that the load equipment is in an offline uncontrolled state after being closed due to the fact that the contact of the on-off device of the electronic equipment is opened when the load equipment is controlled to be closed is avoided, and the load equipment can be ensured to be in a controlled state of remote control. When the panel switch is in the condition that the contact of the on-off device is disconnected, if a user wants to directly control the load equipment through remote control or local key operation, the contact of the on-off device is controlled to be closed, and then a corresponding on/off control command is sent to the load equipment according to the obtained on/off control command for controlling the load equipment to be directly controlled, so that the load equipment can be intelligently switched to an effective controlled state.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (25)

1. A load device control method is applied to electronic equipment and is characterized by comprising the following steps:
acquiring a control instruction;
under the condition that the contact of the on-off device is closed, a wireless instruction for controlling the corresponding opening or closing of one or more target load devices is sent to one or more target load devices according to the control instruction; in this process, the contacts of the switching device are always closed.
2. The load device control method according to claim 1, further comprising:
and controlling the contact of the on-off device to be closed under the condition that the contact of the on-off device is determined to be opened.
3. The load device control method according to claim 1, wherein the obtaining the control instruction includes: receiving a pressing instruction of a mechanical switch;
the sending of a wireless instruction for controlling the corresponding opening or closing of one or more target load devices to the one or more target load devices according to the control instruction under the condition that the contact of the on-off device is closed comprises:
and under the condition that the current mode is determined to be the wireless mode, controlling the contact of the on-off device to be closed according to the control instruction, and after the contact of the on-off device is closed, sending a wireless instruction for controlling one or more target load devices to be correspondingly opened or closed to one or more target load devices according to the control instruction.
4. The load device control method of claim 1, wherein the sending a wireless command to a target load device to control the target load device to turn on or off, respectively, according to the control command comprises:
acquiring the current working state of the target load equipment;
and generating a wireless instruction opposite to the current working state of the target load equipment according to the current working state of the target load equipment.
5. The load device control method according to claim 1, wherein after transmitting a wireless command for controlling the target load device to be correspondingly turned on or off to the target load device according to the control command in a case where the contact of the on-off device is closed, the method further comprises:
and acquiring the current state of the target load equipment after the action is executed according to the wireless instruction, reporting the current state of the target load equipment after the action is executed according to the wireless instruction to a cloud end, and/or reporting the current state of the electronic equipment to the cloud end.
6. The load device control method according to claim 1, wherein after transmitting a wireless command for controlling the target load device to be correspondingly turned on or off to the target load device according to the control command in a case where the contact of the on-off device is closed, the method further comprises:
judging whether the target load equipment successfully executes the corresponding action according to the wireless instruction;
and returning to the step of sending a wireless instruction for controlling the corresponding opening or closing of the target load equipment to the target load equipment according to the control instruction under the condition that the target load equipment fails to execute the corresponding action and the current failure times are within a set range.
7. The load device control method according to claim 6, wherein the determining whether the target load device performs the corresponding action according to the wireless instruction is successful comprises:
receiving a response instruction returned by the target load equipment according to the wireless instruction, and judging whether the target load equipment successfully executes the corresponding action according to the wireless instruction according to the response instruction;
determining that the target load equipment fails to execute the corresponding action under the condition that a response instruction returned by at least one target load equipment is not received;
and under the condition that a response instruction returned by each target load device is received, determining that the target load devices execute the corresponding action successfully.
8. The load device control method according to claim 6, further comprising:
and sending a contact opening instruction to the on-off device to control the contact opening of the on-off device under the condition that the target load equipment fails to execute the corresponding action and the current failure frequency exceeds a set range.
9. The load device control method according to claim 6, further comprising:
determining the current state of the target load device according to at least one of the following conditions under the condition that the target load device successfully executes the corresponding action:
determining the current state of the target load equipment according to the control instruction;
receiving the current state obtained by the gateway from the corresponding target load equipment, wherein the target load equipment is determined by the gateway according to the incidence relation between the electronic equipment and the load equipment;
and receiving the current state sent by the target load equipment according to the incidence relation between the electronic equipment and the load equipment.
10. The load device control method according to any one of claims 1 to 9, wherein the acquiring the control instruction includes:
detecting touch operation on the electronic equipment, judging whether the touch operation is a first preset operation for controlling the on/off of load equipment or not according to the touch operation, and acquiring a control instruction according to the first preset operation; and/or the presence of a gas in the gas,
and receiving a control instruction sent by the terminal equipment.
11. The load device control method according to any one of claims 1 to 9, further comprising:
detecting touch operation on the electronic equipment, judging whether the touch operation is a second preset operation for controlling the contact of the on-off device to be disconnected or not according to the touch operation, and acquiring a control instruction for controlling the contact of the on-off device to be disconnected according to the second preset operation; and/or receiving a control instruction which is sent by terminal equipment and used for controlling the disconnection of the contact of the on-off device;
and controlling the contact of the on-off device to be disconnected according to the control instruction of the contact disconnection of the on-off device.
12. The load device control method according to any one of claims 1 to 9, further comprising:
displaying the current state of the target load device; and/or the presence of a gas in the gas,
and determining the current state of the electronic equipment according to the current state of the target load equipment, and controlling an indication module to send out corresponding indication information.
13. A load device control method, comprising:
sending a wireless instruction for controlling the load equipment to be turned on or turned off to at least one load equipment;
judging whether the load equipment is successfully started or closed according to the wireless instruction;
and returning to the step of sending a wireless instruction for controlling the load equipment to be opened or closed to at least one load equipment under the condition that the action of opening or closing the load equipment fails and the current failure times are within a set range.
14. The method for controlling the load device according to claim 13, wherein the determining whether the load device performs the turning on or turning off according to the wireless command is successful comprises:
receiving a response instruction returned by the at least one load device according to the wireless instruction;
if a response instruction returned by one or more load equipment is not received, determining that the action of opening or closing the load equipment fails;
and under the condition that a response instruction returned by each load device is received, determining that the action of opening or closing the load devices is successful.
15. The method as claimed in claim 13, wherein after determining whether the load device successfully performs the turning on or turning off according to the wireless command, the method further comprises:
when the target load equipment fails to execute corresponding actions and the current failure frequency exceeds a set range, sending a contact opening instruction to the on-off device to control the contact of the on-off device to be opened; or the like, or, alternatively,
and under the condition that the target load equipment successfully executes the corresponding action, acquiring the current state of the target load equipment after the action is executed according to the wireless instruction, reporting the current state of the target load equipment after the action is executed according to the wireless instruction to a cloud end, and/or reporting the current state of the electronic equipment to the cloud end.
16. The load device control method of claim 13, wherein the sending the wireless instruction to the at least one load device to control the load device to turn on or off comprises:
acquiring a control instruction for controlling the on or off of the at least one load device, and detecting the current state of a contact of an on-off device of the electronic equipment based on the control instruction;
under the condition that the contact of the on-off device is opened, the contact is controlled to be closed;
and under the condition that the contact of the on-off device is closed, generating a wireless instruction opposite to the current working state of the at least one load device according to the control instruction, or generating a wireless instruction opposite to the current working state of the on-off device according to the control instruction, and sending the wireless instruction to the at least one load device.
17. A load device control apparatus, characterized by comprising:
the acquisition module is used for acquiring a control instruction;
the transmitting module is used for transmitting a wireless instruction for controlling the corresponding opening or closing of one or more target load devices to one or more target load devices according to the control instruction under the condition that the contact of the on-off device is closed; in this process, the contacts of the switching device are always closed.
18. A load device control apparatus, characterized by comprising:
the instruction module is used for sending a wireless instruction for controlling the load equipment to be turned on or turned off to at least one load equipment;
the action module is used for judging whether the load equipment successfully executes the opening or closing action according to the wireless instruction;
and the returning module is used for returning the step of sending the wireless instruction for controlling the load equipment to be opened or closed to at least one load equipment under the condition that the action of opening or closing the load equipment fails and the current failure times are within a set range.
19. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, the computer program, when executed by the processor, implementing a load device control method as claimed in any one of claims 1 to 16.
20. A load device control system, comprising load devices and an electronic device according to claim 19, said electronic device establishing a communication connection with said load devices, said electronic device being adapted to control the on or off state of at least one of said load devices, respectively.
21. The load device control system according to claim 20, wherein the electronic device is further configured to acquire an on or off state of the load device, and in a case where the number of the load devices is one, the on or off state of an indicator light of the electronic device is consistent with the on or off state of the load device; and under the condition that the number of the load equipment is multiple, when any one load equipment is in an on state, the indicator light of the electronic equipment is in an on state, otherwise, the indicator light of the electronic equipment is in an off state.
22. The load device control system according to claim 20, wherein the load device control system further comprises a gateway, the electronic device establishes a communication connection with the load device through the gateway, and the electronic device is further configured to acquire an on or off state of the load device and report the on or off state of the load device to the gateway.
23. A load device control system, comprising an electronic device according to claim 19, a gateway and a terminal device, wherein a communication connection is established between the electronic device and the terminal device through the gateway, and the electronic device is used for correspondingly controlling at least one load device.
24. The load device control system according to claim 23, wherein the terminal device is configured to obtain a configuration instruction, determine an association relationship between the electronic device and the load device according to the configuration instruction, and send the association relationship to the gateway;
and the gateway acquires the current state of the target load equipment according to the incidence relation and sends the current state to the corresponding electronic equipment, and/or the gateway sends a subscription instruction to the target load equipment according to the incidence relation, controls the target load equipment to send the current state of the target load equipment to the corresponding electronic equipment according to the subscription instruction, and/or determines the current state of the target load equipment according to the control instruction.
25. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the load device control method according to any one of claims 1 to 16.
CN202011014179.8A 2020-09-24 2020-09-24 Load device control method, device and system, electronic device and storage medium Pending CN114253143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011014179.8A CN114253143A (en) 2020-09-24 2020-09-24 Load device control method, device and system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011014179.8A CN114253143A (en) 2020-09-24 2020-09-24 Load device control method, device and system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114253143A true CN114253143A (en) 2022-03-29

Family

ID=80789937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011014179.8A Pending CN114253143A (en) 2020-09-24 2020-09-24 Load device control method, device and system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114253143A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807788A (en) * 2016-03-09 2016-07-27 广州极飞电子科技有限公司 Unmanned aerial vehicle monitoring method, system, unmanned aerial vehicle and ground station
CN106774210A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 A kind of smart jack, appliance control system and smart jack control method
CN107454563A (en) * 2017-09-08 2017-12-08 歌尔科技有限公司 A kind of Bluetooth communication method, device and bluetooth equipment
CN109062068A (en) * 2018-08-17 2018-12-21 成都欧远信电子科技有限公司 Family's electricity consumption monitoring system based on wireless transmission
CN208489468U (en) * 2018-06-21 2019-02-12 广州中安电工高新科技股份有限公司 A kind of battery saving arrangement and socket
CN110136421A (en) * 2019-06-27 2019-08-16 河南正实物联科技有限公司 A kind of remote control method and remote controler
CN110661685A (en) * 2019-08-22 2020-01-07 深圳绿米联创科技有限公司 Information feedback method and device, electronic equipment and storage medium
CN111208787A (en) * 2019-12-23 2020-05-29 深圳绿米联创科技有限公司 Device state determination method and device, electronic device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807788A (en) * 2016-03-09 2016-07-27 广州极飞电子科技有限公司 Unmanned aerial vehicle monitoring method, system, unmanned aerial vehicle and ground station
CN106774210A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 A kind of smart jack, appliance control system and smart jack control method
CN107454563A (en) * 2017-09-08 2017-12-08 歌尔科技有限公司 A kind of Bluetooth communication method, device and bluetooth equipment
CN208489468U (en) * 2018-06-21 2019-02-12 广州中安电工高新科技股份有限公司 A kind of battery saving arrangement and socket
CN109062068A (en) * 2018-08-17 2018-12-21 成都欧远信电子科技有限公司 Family's electricity consumption monitoring system based on wireless transmission
CN110136421A (en) * 2019-06-27 2019-08-16 河南正实物联科技有限公司 A kind of remote control method and remote controler
CN110661685A (en) * 2019-08-22 2020-01-07 深圳绿米联创科技有限公司 Information feedback method and device, electronic equipment and storage medium
CN111208787A (en) * 2019-12-23 2020-05-29 深圳绿米联创科技有限公司 Device state determination method and device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN105897860B (en) Network device and information processing method
US11881992B2 (en) Intelligent plug-and-play point-to-multipoint internet of things (IoT) platform and method of managing and using the same
CN105652676B (en) A kind of intelligent home appliance remote control system and control method
EP1402101B1 (en) Service system for electric home appliances and method thereof
CN103838155A (en) Family security control method, family server and security control system
CN109753034B (en) Control method, control device, electronic equipment and storage medium
CN103237056A (en) Equipment terminal, control terminal, server and equipment terminal controlling method
CN103813039A (en) Home appliance control method, home server and home appliance control system
CN110427220B (en) Configuration method and device of device command, electronic device and storage medium
CN111542130A (en) Method and device for controlling household appliance and terminal equipment
CN112511392B (en) Intelligent home network Combo equipment gateway selection method and control system
US10489055B2 (en) Z-wave controller shift in thermostats
CN108039990B (en) Household appliance operation method and system, household appliance and computer readable storage medium
CN106411574B (en) Management control method and device
JP6798035B2 (en) How to realize value-added services, equipment, and cloud servers
CN114253143A (en) Load device control method, device and system, electronic device and storage medium
CN111866827A (en) Bluetooth device state detection method and device, electronic device and medium
CN114253141B (en) Load device control method, device and system, electronic device and storage medium
JP4931659B2 (en) Home appliance network system
EP4068726A1 (en) Method and device for preventing erroneous erasure of data, and storage medium and product
CN113965460B (en) Method and device for preventing error reset, intelligent device and storage medium
CN114078661B (en) Zero-crossing on-off action time adjustment method and device, electronic equipment and storage medium
CN114253142B (en) Mode configuration method, mode control method, mode configuration device, mode control system, mode configuration equipment and medium
WO2015062139A1 (en) Data transmission method and apparatus, and electronic device
CN114900846A (en) Device display state updating method and device, electronic device and storage medium

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