Invention content
In order to overcome above-mentioned deficiency in the prior art, the purpose of the present invention is to provide a kind of home equipment control methods
And device, to simplify the operating process of batch control device.
To achieve the goals above, the technical solution that present pre-ferred embodiments use is as follows:
In a first aspect, the embodiment of the present invention provides a kind of home equipment control method, it is applied to home equipment control device,
The home equipment control device is connected with home equipment and control switch communication respectively, the method includes:
It obtains the facility information of newly added equipment and has been connected to the facility information of the existing device of home equipment control device;
According to device class information and the facility information of the newly added equipment and existing device, judge in the existing device
With the presence or absence of with the associated equipment of newly added equipment;
When there is equipment associated with newly added equipment in the existing device, detect whether configured with described for controlling
Control with the associated equipment of newly added equipment switchs;
If configured with being switched for controlling the control with the associated equipment of newly added equipment, the newly added equipment is associated with
It switchs to the control, the newly added equipment is controlled by control switch;
It is switched if being not configured with for controlling the control with the associated equipment of newly added equipment, creates a control switch
The newly added equipment and its associate device are controlled.
Further, in embodiments of the present invention, described according to device class information and the newly added equipment and existing to set
Standby facility information, judge in the existing device with the presence or absence of with the associated equipment of newly added equipment, including:
The facility information for parsing the newly added equipment and existing device obtains the product of the newly added equipment and existing device
Identification code;
According to the product ID of the newly added equipment and existing device judge in the existing device with the presence or absence of with it is new
The equipment for adding standby identical category;
When the equipment of category identical as newly added equipment being not present in the existing device, according to device class information and institute
The product ID for stating newly added equipment and existing device judges in the existing device with the presence or absence of default with newly added equipment satisfaction
The equipment of class condition.
Further, it is described in the existing device exist equipment associated with newly added equipment when, detect whether to configure
The control control with the associated equipment of newly added equipment is useful for switch, including:
When there is the equipment of category identical as newly added equipment in the existing device, detect whether configured with for controlling
The control of the equipment of the category identical as newly added equipment switchs;
When there is the equipment with the default class condition of newly added equipment satisfaction in the existing device, detect whether to be configured with
It is switched for controlling the control for meeting the equipment for presetting class condition with newly added equipment.
Further, in embodiments of the present invention, if it is described configured with for control it is described with newly added equipment is associated sets
The newly added equipment is associated with control switch, is controlled to the newly added equipment by control switch by standby control switch
System, including:
It, will be described when detecting the control switch configured with the equipment for controlling the category identical as newly added equipment
Newly added equipment is associated with the control switch of the equipment for controlling the category identical as newly added equipment;
It is switched configured with the control for controlling the equipment for meeting default class condition with newly added equipment detecting
When, the newly added equipment is associated with and is opened for controlling the control for meeting the equipment for presetting class condition with newly added equipment
It closes.
Further, in embodiments of the present invention, if it is described be not configured with it is described associated with newly added equipment for controlling
The control of equipment switchs, then creates a control switch and control the newly added equipment and its associate device, including:
It is detecting the presence of the equipment of category identical as newly added equipment but is being not configured with for controlling described and newly added equipment
When the control switch of the equipment of identical category, a control switch is created for controlling the newly added equipment and its with category equipment;
Detect the presence of meet with newly added equipment preset the equipment of class condition but be not configured with for control it is described with
When newly added equipment meets the control switch for the equipment for presetting class condition, a control switch is created for controlling the newly added equipment
And meet the equipment for presetting class condition with newly added equipment.
Optionally, in embodiments of the present invention, the control switch includes first state and the second state, and the method is also
Including:
Detect the state change of the control switch;
When detecting that the state of the control switch changes, according to the Status Change signal pair of the control switch
The home equipment of the control switch management carries out mode adjustment.
Further, described when detecting that the state of the control switch changes, according to the control switch
Status Change signal carries out mode adjustment to the home equipment of the control switch management, including:
When detecting that the state of the control switch is changed to the second state by first state, the control switch is controlled
The home equipment of management is changed to second mode by first mode;
When it is first state that the state for detecting the control switch is by the second Status Change, the control switch is controlled
The home equipment of management is changed to first mode by second mode.
Optionally, in embodiments of the present invention, the method further includes:
It detects whether configured with the master switch for controlling all home equipments;
If being not configured with the master switch for controlling all home equipments, create a master switch to all home equipments into
Row control.
Further, the master switch includes first state and the second state, and the method further includes:
Detect the state change of the master switch;
When detecting that the state of the master switch changes, according to the Status Change signal of the master switch to described
All home equipments of master switch management carry out mode adjustment.
Second aspect, the embodiment of the present invention also provide a kind of home equipment control device, are managed for home equipment control,
The home equipment control device is connected with home equipment and control switch communication respectively, the home equipment control device packet
It includes:
Acquisition module, facility information for obtaining newly added equipment and has been connected to the existing of home equipment control device and sets
Standby facility information;
Judgment module judges for the facility information according to device class information and the newly added equipment and existing device
It whether there is and the associated equipment of newly added equipment in the existing device;
Detection module detects whether to configure when for there is equipment associated with newly added equipment in the existing device
The control control with the associated equipment of newly added equipment is useful for switch;
Relating module, for when configured with being switched for controlling the control with the associated equipment of newly added equipment, inciting somebody to action
The newly added equipment is associated with control switch;
Creation module, for be not configured with switched for controlling the control with the associated equipment of newly added equipment when,
The control for controlling the newly added equipment and its associate device is created to switch;
Control module, for being set to the household of the control switch management according to the Status Change signal of the control switch
It is standby to be controlled.
In terms of existing technologies, the invention has the advantages that:
Home equipment control method and device provided in an embodiment of the present invention by when adding newly added equipment according to newly-increased
It whether there is in the facility information and device class information automatic decision existing device of equipment and existing device and newly added equipment
Associated equipment, and when judgement has equipment associated with newly added equipment, the newly added equipment is associated with for controlling automatically
Under the control switch with the associated equipment of newly added equipment, or one is automatically created for controlling the newly added equipment and its pass
The control switch for joining equipment, greatly simplifies the operating process that batch controls home equipment.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is implemented
The component of example can be arranged and be designed with a variety of different configurations.
Therefore, below the detailed description of the embodiment of the present invention to providing in the accompanying drawings be not intended to limit it is claimed
The scope of the present invention, but be merely representative of the present invention selected embodiment.Based on the embodiments of the present invention, this field is common
All other embodiment that technical staff is obtained without creative efforts belongs to the model that the present invention protects
It encloses.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.
Below in conjunction with the accompanying drawings, it elaborates to some embodiments of the present invention.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
Referring to Fig. 1, a kind of block diagram of the control device 100 provided for present pre-ferred embodiments.The control
Control equipment 100 may include home equipment control device 70, memory 111, storage control 112 and processor 113.
The memory 111, storage control 112 and 113 each element of processor are directly or indirectly electrical between each other
Connection, to realize the transmission or interaction of data.For example, these elements can pass through one or more communication bus or letter between each other
Number line, which is realized, to be electrically connected.The home equipment control device 70 may include it is at least one can be with software or firmware
(firmware) form is stored in the memory 111 or is solidificated in the operating system of the control device 100
Software function module in (operating system, OS).The processor 113 is deposited for executing in the memory 111
The executable module of storage, such as software function module included by the home equipment control device 70 and computer program etc..
Wherein, the memory 111 may be, but not limited to, random access memory (Random AcceSS
Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable
Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only
Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only
Memory, EEPROM) etc..Wherein, memory 111 is for storing program, the processor 113 after receiving and executing instruction,
Execute described program.The processor 113 and other possible components can control the access of memory 111 in the storage
It is carried out under the control of device 112.
The processor 113 may be a kind of IC chip, the processing capacity with signal;It can also be general place
Manage device, including central processing unit (Central ProceSSing Unit, CPU), network processing unit (Network
ProceSSor, NP) etc.;It can also be digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array
Arrange (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components etc., Ke Yishi
Now or execute the embodiment of the present invention in disclosed each method, step and logic diagram.
It should be understood that structure shown in FIG. 1 is only schematic diagram, the control device 100 may also include than institute in Fig. 1
Show more either less components or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 may be used firmly
Part, software or combinations thereof are realized.
First embodiment
Referring to Fig.2, the embodiment of the present invention provides a kind of home equipment control method, the method is applied to shown in Fig. 1
Home equipment control device 70, this method includes:
Step S10 obtains the facility information of newly added equipment and has been connected to the existing device of home equipment control device 70
Facility information.
In the present embodiment, the home equipment control device 70 is for controlling smart home device, step S10
Described in facility information may include the brand of equipment, PPID (Product Part Identification, product identification
Code), type, model etc., and the facility information can be embodied in the form of code or others.
The home equipment control device 70 can be by any one in the communication modes such as WiFi, ZigBEE, bluetooth
Or a variety of established with smart home device communicates connection.When user adds newly added equipment, by the way that the home equipment is controlled
Device 70 is established to communicate to connect with home equipment and can obtain the facility information of newly added equipment and have been connected to the home equipment
The existing device information of control device 70.
It should be noted that the home equipment control device 70 can pass through, but it is not limited to above-mentioned several communication sides
Formula establishes communication connection with home equipment.
Step S20, according to device class information and the facility information of the newly added equipment and existing device, judge described in
Have in equipment and whether there is and the associated equipment of newly added equipment.
In the present embodiment, communication connection is established in household plant control unit 70 and home equipment, and get and newly establish
After the facility information of standby facility information and existing device, by the facility information to the newly added equipment and existing device into
Row parsing, obtains the product ID of newly added equipment and existing device, then by believing the product ID and device class
Breath is compared, and whether there is in the existing device for judging to have been connected to the home equipment control device 70 and newly added equipment
Associated equipment.
Specifically, in embodiments of the present invention, the device class information may include following two association situations:
1. in existing device in the presence of category identical as newly added equipment equipment (such as:Existing device is bedside lamp A, is increased newly
Equipment is bedside lamp B);
2. the equipment that category identical as newly added equipment is not present in existing device, but exist and meet default point with newly added equipment
Class condition equipment (such as:Existing device is television set, and newly added equipment is set-top box).
When whether there is equipment associated with newly added equipment during the home equipment control device 70 judges existing device,
Any one that need to only meet in the above association situation can determine that in the existing device in the presence of with newly added equipment is associated sets
It is standby.Specifically, if meet it is above-mentioned the first association situation, using the equipment of category identical as newly added equipment in existing device as
The associate device of newly added equipment;It is default by meeting with newly added equipment in existing device if meeting above-mentioned second of association situation
Associate device of the equipment of class condition as newly added equipment.Wherein, the device class information can according to user demand into
The self-defined setting of row, as long as the equipment for meeting same control condition can be according to user demand as default class condition
Carry out device class information setting.
Optionally, in embodiments of the present invention, can also increase before the step S20 judge newly added equipment whether be
High frequency uses the step of equipment, and above-mentioned steps S20 is then executed under the premise of judging that newly added equipment uses equipment for high frequency, from
And low frequency is avoided to use the unnecessary switch of hold facility, reducing to a certain degree, using for the switch controlling device 70 is difficult
Degree.
Step S30 is detected whether when there is equipment associated with newly added equipment in the existing device configured with being used for
The control control with the associated equipment of newly added equipment switchs.
In the present embodiment, when household plant control unit 70 judge have been established communication connection existing device in exist with
When the associated equipment of newly added equipment, home equipment control device 70 is detected whether automatically configured with for controlling the newly added equipment
And its control switch of associate device.
Specifically, in embodiments of the present invention, when the equipment that there is category identical as newly added equipment in the existing device
When, detect whether the control switch configured with the equipment for controlling the category identical as newly added equipment;It existing is set when described
It is standby it is middle exist when meeting the equipment for presetting class condition with newly added equipment, detect whether configured with for control it is described with newly establish
The standby control switch for meeting the equipment for presetting class condition.
Step S40, if configured with being switched for controlling the control with the associated equipment of newly added equipment, it will be described newly-increased
Equipment is associated with control switch, is controlled the newly added equipment by control switch.
In the present embodiment, if S30 is detected configured with use the home equipment control device 70 through the above steps
When controlling the control switch of the newly added equipment and its associate device, the newly added equipment is associated with control switch automatically
Under, the newly added equipment is controlled by control switch.
Specifically, when detecting that the control configured with the equipment for controlling the category identical with newly added equipment switchs
When, the control that the newly added equipment is associated with to the equipment for controlling the category identical as newly added equipment switchs.Work as detection
When to configured with being switched for controlling the control for meeting the equipment for presetting class condition with newly added equipment, newly established described
Standby be associated with switchs for controlling the control for meeting the equipment for presetting class condition with newly added equipment.
Step S50 switchs for controlling the control with the associated equipment of newly added equipment if being not configured with, creates one
Control switch controls the newly added equipment and its associate device.
In the present embodiment, if detect the presence of with the associated equipment of newly added equipment but be not configured with for control newly establish
Standby and its associate device control switchs, then the home equipment control device 70 in addition newly added equipment and detects existing set
In standby there are equipment associated with it after, automatically create a control switch for controlling the newly added equipment and its associate device.
Specifically, it is detecting the presence of the equipment of category identical as newly added equipment but is being not configured with described and new for controlling
When adding the control switch of the equipment of standby identical category, a control switch is created for controlling the newly added equipment and its same category
Equipment.
Detect the presence of meet with newly added equipment preset the equipment of class condition but be not configured with for control it is described with
When newly added equipment meets the control switch for the equipment for presetting class condition, a control switch is created for controlling the newly added equipment
And meet the equipment for presetting class condition with newly added equipment.
After creating the control switch for controlling the newly added equipment and its associate device, you can switched to institute by the control
It states newly added equipment and its associate device carries out switch control.
Further, refering to Fig. 3, in embodiments of the present invention, control switch includes first state and the second state,
The method further includes:
Step S60, the state change of detection control switch.
Step S61 becomes when detecting that the state of the control switch changes according to the state of the control switch
More signal carries out mode adjustment to the home equipment of the control switch management.
In the present embodiment, the home equipment control device 70 can detect the state change of the control switch in real time,
When household plant control unit 70 detects that the state of the control switch changes, automatically according to the control switch
Status Change signal carries out batch mode adjustment to the home equipment of control switch management.
Specifically, in the present embodiment, when household plant control unit 70 detects that the state of the control switch occurs
When variation, mode adjustment is carried out to the home equipment of the control switch management according to the Status Change signal of the control switch
When, the step S61 is specifically included:
Sub-step S62 controls institute when detecting that the state of the control switch is changed to the second state by first state
The home equipment for stating control switch management is changed to second mode by first mode.
Sub-step S63 controls institute when it is first state that the state for detecting the control switch is by the second Status Change
The home equipment for stating control switch management is changed to first mode by second mode.
In embodiments of the present invention, the first state and the second state of the control switch should understand that switch in order to control
Different working condition such as starts and closes, can be controlled by the same switch, can also pass through two different switches
It is respectively controlled.The first mode and the different working modes that second mode is home equipment, the control switch is to family
The pattern for occupying equipment is adjusted, and can be referred to the operating mode of switching home equipment, such as the brightness of adjustment lamps and lanterns, can also be referred to
Switching to home equipment open/close state.
Specifically, in embodiments of the present invention, when household plant control unit 70 detects the state of control switch by opening
When Status Change is off status, all devices for automatically controlling control switch management are closed.If control switch management is set
The standby middle equipment in the presence of being currently closed, the then state that the equipment being closed is switched in this secondary control become
Without action when more, when next secondary control on off state changes, the working condition of the home equipment is synchronous with control switch.
Further, when household plant control unit 70 detects that the state of control switch is changed to open state by off status
When, it when control effect and open state are changed to off status similarly, herein will be without repeating.
It should be noted that in embodiments of the present invention, the Status Change of the control switch can pass through, but be not limited to
The modes such as touch panel operation signal, push button signalling or mouse click signal are realized.
Referring to Fig. 4, optionally, in embodiments of the present invention, the method further includes:
Step S70 is detected whether configured with the master switch for controlling all home equipments.
Step S71 creates a master switch to all families if being not configured with the master switch for controlling all home equipments
Equipment is occupied to be controlled.
In order to realize all home equipments of a key control while realizing batch control associate device, returned convenient for user
A family or key opens or closes all home equipments when leaving home, in a preferred embodiment of the present invention, the home equipment control dress
Setting 70 can also detect whether automatically configured with the master switch for controlling all home equipments.The home equipment control device
70 detect be not configured with the master switch for controlling all home equipments when, according to user demand create a master switch to institute
There is the home equipment with the home equipment control device 70 communication connection to be controlled.
Further, in embodiments of the present invention, when the state for equipment working state and control switch or master switch occur
When inconsistent, user can make the control switch or master switch pipe by operating the control switch or master switch twice in succession
The all devices of reason are synchronous on off state.
Refering to Fig. 5, optionally, in embodiments of the present invention, the master switch includes first state and the second state, described
Method further includes:
Step S80 detects the state change of the master switch.
Step S81 believes when detecting that the state of the master switch changes according to the Status Change of the master switch
Number mode adjustment is carried out to all home equipments of the master switch management.
In embodiments of the present invention, the home equipment control device 70 can also detect the state of master switch in real time, main
When occupying plant control unit 70 and detecting that the state of master switch changes, home equipment control device 70 is according to the master switch
Status Change signal carries out operating mode adjustment to all home equipments of the master switch management.
Specifically, in the present embodiment, when household plant control unit 70 detects that the state of the master switch becomes
Change, when carrying out mode adjustment to all home equipments of the master switch management according to the Status Change signal of the master switch,
The step S81 is specifically included:
Sub-step S82 controls the master switch management when detecting that master switch is changed to the second state by first state
All home equipments second mode is changed to by first mode.
Sub-step S83 controls the master switch management when it is first state to detect master switch by the second Status Change
All home equipments first mode is changed to by second mode.
In the present embodiment, the specific control principle of the master switch is identical as the control switch, herein also no longer into
Row repeats.
Second embodiment
Referring to Fig. 6, the embodiment of the present invention also provides a kind of home equipment control device 70, it to be used for home equipment control pipe
Reason, the home equipment control device 70 are connected with home equipment and control switch communication respectively, the home equipment control dress
Setting 70 includes:
Acquisition module 700, facility information for obtaining newly added equipment and has been connected to home equipment control device 70
The facility information of existing device;
Judgment module 701 is sentenced for the facility information according to device class information and the newly added equipment and existing device
Break the existing device in whether there is and the associated equipment of newly added equipment;
Detection module 702 detects whether to match when for there is equipment associated with newly added equipment in the existing device
It is equipped with and is switched for controlling the control with the associated equipment of newly added equipment;
Relating module 703, for when configured with being switched for controlling the control with the associated equipment of newly added equipment,
The newly added equipment is associated with control switch;
Creation module 704, for being not configured with for controlling the control switch with the associated equipment of newly added equipment
When, it creates the control for controlling the newly added equipment and its associate device and switchs;
Control module 705, the family for switching management to the control according to the Status Change signal of the control switch
Equipment is occupied to be controlled.
It should be noted that the device and method disclosed by embodiments of the present invention, it can also be by another way
It realizes.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing show basis
The device of multiple embodiments of the present invention, the architecture, function and operation in the cards of method and computer program product.
In this regard, each box in flowchart or block diagram can represent a part for a module, section or code, the mould
A part for block, program segment or code includes one or more executable instructions for implementing the specified logical function.Also it answers
When note that at some as in the realization method replaced, the function of being marked in box can also be to be different from being marked in attached drawing
The sequence of note occurs.For example, two continuous boxes can essentially be basically executed in parallel, they sometimes can also be by opposite
Sequence execute, this is depended on the functions involved.It is also noted that each box in block diagram and or flow chart and
The combination of box in block diagram and or flow chart can use the dedicated hardware based system of function or action as defined in executing
It unites to realize, or can realize using a combination of dedicated hardware and computer instructions.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point, can also be modules individualism, can also two or more modules be integrated to form an independent part.
In conclusion the embodiment of the present invention provides a kind of home equipment control method and device.The method and device are logical
Cross facility information and device class information automatic decision when adding newly added equipment according to newly added equipment and existing device
Have in equipment with the presence or absence of with the associated equipment of newly added equipment, and judgement exist equipment associated with newly added equipment when, automatically
The newly added equipment is associated under the control switch for controlling described and the associated equipment of newly added equipment, or automatically creates one
Control for controlling the newly added equipment and its associate device switchs, and greatly simplifies the operation that batch controls home equipment
Flow.In addition, home equipment control method and device provided in an embodiment of the present invention can also automatically create use according to user demand
In the master switch for controlling all home equipments in batches so that all home equipments of a key control are more convenient.
It these are only the preferred embodiment of the present invention, be not intended to restrict the invention, for those skilled in the art
For member, the invention may be variously modified and varied.Any modification made by all within the spirits and principles of the present invention,
Equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.