CN103235584B - Smart home control method, device, MCU and system - Google Patents
Smart home control method, device, MCU and system Download PDFInfo
- Publication number
- CN103235584B CN103235584B CN201310150829.5A CN201310150829A CN103235584B CN 103235584 B CN103235584 B CN 103235584B CN 201310150829 A CN201310150829 A CN 201310150829A CN 103235584 B CN103235584 B CN 103235584B
- Authority
- CN
- China
- Prior art keywords
- short message
- jack
- mcu
- authorized
- home control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Small-Scale Networks (AREA)
- Selective Calling Equipment (AREA)
Abstract
Description
技术领域 technical field
本发明涉及智能家居控制领域,特别是涉及一种智能家居控制方法、装置、MCU及系统。 The invention relates to the field of smart home control, in particular to a smart home control method, device, MCU and system.
背景技术 Background technique
自从世界上第一幢智能建筑于1984年在美国出现后,智能建筑的发展日益迅猛。目前我国每年竣工的建筑面积约为20亿平方米,预计到2020年,我国竣工的建筑面积将达到300亿平方米,其中智能建筑的产值至少在1至2万亿元以上。 Since the world's first intelligent building appeared in the United States in 1984, the development of intelligent buildings has become increasingly rapid. At present, the construction area completed each year in my country is about 2 billion square meters. It is estimated that by 2020, the construction area completed in my country will reach 30 billion square meters, of which the output value of intelligent buildings will be at least 1 to 2 trillion yuan.
这种情况下,如何实现对智能建筑中各家居的控制成为一个研究热点。现有技术中在实现智能家居控制时,主要是通过物联网技术,将家中的各种设备,如音视频设备、照明系统、窗帘控制系统、空调控制系统、安防系统、数字影视系统等连接到一起,依靠物联网实现对家电、照明和窗帘等家居设备的控制。 In this case, how to realize the control of each home in the intelligent building has become a research hotspot. In the existing technology, when realizing smart home control, various devices in the home, such as audio and video equipment, lighting system, curtain control system, air conditioning control system, security system, digital video system, etc., are connected to the Internet of Things technology. At the same time, rely on the Internet of Things to realize the control of household equipment such as home appliances, lighting and curtains.
但是,发明人在本申请的研究过程中发现,现有技术中实现智能家居控制的方法,需要对各家居设备进行重新设计或者改造,成本高,且实现方式复杂。 However, the inventor found in the research process of this application that the methods for implementing smart home control in the prior art require redesign or modification of each home device, which is costly and complicated to implement.
发明内容 Contents of the invention
有鉴于此,本发明的目的在于提供一种智能家居控制方法、装置、MCU及智能家居控制系统,具体实施方案如下: In view of this, the purpose of the present invention is to provide a smart home control method, device, MCU and smart home control system, the specific implementation is as follows:
一种智能家居控制方法,所述方法应用于MCU,所述MCU与GSM模块相连接,并通过MCU继电器端口分别与多个继电器相连接,所述MCU继电器端口和继电器一一对应,且所述继电器的一端与火线相连接,另一端与插孔一一对应连接,其中,所述智能家居控制方法包括: A smart home control method, the method is applied to an MCU, the MCU is connected to a GSM module, and is respectively connected to a plurality of relays through the MCU relay ports, the MCU relay ports correspond to the relays one by one, and the One end of the relay is connected to the fire wire, and the other end is connected to the jack one by one, wherein the smart home control method includes:
接收GSM模块传输的家居控制短信息,所述家居控制短信息中包括:控制短信息标识、待控制的插孔的标识编码、与所述插孔的标识编码相对应的控制命令,所述控制命令包括打开或关闭命令; Receive the home control short message transmitted by the GSM module, the home control short message includes: the control short message identification, the identification code of the jack to be controlled, and the control command corresponding to the identification code of the jack, the control Commands include open or close commands;
判断所述家居控制短信息对应的短信息发送方是否经过授权; Judging whether the short message sender corresponding to the home control short message is authorized;
在判断得知所述短信息发送方经过授权后,产生与所述控制命令相对应的电平信息,并通过与所述待控制的插孔相对应的MCU继电器端口,将所述电平信息传输至相对应的继电器,以便所述继电器执行相应的断开或闭合操作,实现对家居的控制,其中所述电平信息为低电平信息或高电平信息。 After judging that the sender of the short message is authorized, generate the level information corresponding to the control command, and send the level information through the MCU relay port corresponding to the jack to be controlled The information is transmitted to the corresponding relay, so that the relay performs the corresponding opening or closing operation to realize the control of the home, wherein the level information is low level information or high level information.
优选的,所述将所述电平信息传输至相对应的继电器后,所述智能家居控制方法还包括: Preferably, after the level information is transmitted to the corresponding relay, the smart home control method further includes:
检测各个MCU继电器端口处输出的电平信息; Detect the level information output at each MCU relay port;
根据所述电平信息,生成相应的插孔状态信息,所述插孔状态信息包括:各个插孔的状态,所述各个插孔的标识编码,其中所述插孔的状态包括:接通状态和断开状态; According to the level information, corresponding jack state information is generated, the jack state information includes: the state of each jack, the identification code of each jack, wherein the state of the jack includes: connected state and disconnected state;
将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述短信息发送方。 Transmitting the socket state information to the GSM module, so that the GSM module transmits it to the short message sender.
优选的,所述智能家居控制方法还包括: Preferably, the smart home control method further includes:
接收GSM模块传输的查询短信息,所述查询短信息包括:查询短信息标识,或,所述查询短信息包括:查询短信息标识和待查询的插孔的标识编码; Receive the query short message that GSM module transmits, and described query short message comprises: query short message identification, or, described query short message comprises: query short message identification and the identification code of the jack to be queried;
判断所述查询短信息对应的短信息发送方是否经过授权; Judging whether the short message sender corresponding to the query short message is authorized;
在判断得知所述短信发送方经过授权后,当所述查询短信息包括查询短信息标识时,查询所有MCU继电器端口输出的电平信息,生成相应的包含所有插孔的插孔状态信息;当所述查询短信息包括查询短信息标识和待查询的插孔的标识编码时,获取所述待查询的MCU继电器端口输出的电平信息,并生成相应的包含待查询插孔的插孔状态信息; After judging that the sender of the short message is authorized, when the query short message includes the query short message identification, query the level information output by all MCU relay ports, and generate corresponding jack status information that includes all jacks; When the query short message includes the query short message identification and the identification code of the jack to be queried, obtain the level information output by the MCU relay port to be queried, and generate a corresponding jack state that includes the jack to be queried information;
将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述查询短信息对应的短信息发送方。 Transmitting the jack status information to the GSM module, so that the GSM module transmits it to the short message sender corresponding to the inquiry short message.
优选的,在所述接收GSM模块传输的家居控制短信息或查询短信息之前,所述智能家居控制方法还包括: Preferably, before receiving the home control short message or query short message transmitted by the GSM module, the smart home control method further includes:
接收GSM模块传输的授权短信息,所述授权短信息中包括:授权短信息标识、待授权的短信息发送方的标识以及插座的唯一标识编码; Receive the authorized short message transmitted by the GSM module, which includes: authorized short message identification, the identification of the short message sender to be authorized and the unique identification code of the socket in the described authorized short message;
判断所述授权短信息中包含的所述插座的唯一标识编码,与MCU中预存的插座的唯一标识编码是否相同; Judging whether the unique identification code of the socket contained in the authorized short message is the same as the unique identification code of the socket prestored in the MCU;
在判断得知二者相同的情况下,存储所述待授权的短信息发送方的标识,以便根据所述待授权的短信息发送方的标识,判断接收到的家居控制短信息或查询短信息的短信息发送方是否经过授权。 When judging that the two are the same, store the identifier of the sender of the short message to be authorized, so that according to the identifier of the sender of the short message to be authorized, the received home control short message or query short message is judged Whether the sender of the short message is authorized.
相应的,本发明还公开了一种智能家居控制装置,所述装置应用于MCU,所述MCU与GSM模块相连接,并通过MCU继电器端口分别与多个继电器相连接,所述MCU继电器端口和继电器一一对应,且所述继电器的一端与火线相连接,另一端与插孔一一对应连接,其中,所述智能家居控制装置包括: Correspondingly, the present invention also discloses a smart home control device, the device is applied to an MCU, the MCU is connected to the GSM module, and is respectively connected to a plurality of relays through the MCU relay port, and the MCU relay port and The relays are in one-to-one correspondence, and one end of the relay is connected to the live wire, and the other end is connected to the jack in a one-to-one correspondence, wherein the smart home control device includes:
第一接收模块,用于接收GSM模块传输的家居控制短信息,所述家居控制短信息中包括:控制短信息标识、待控制的插孔的标识编码、与所述插孔的标识编码相对应的控制命令,所述控制命令包括打开或关闭命令; The first receiving module is used to receive the home control short message transmitted by the GSM module. The home control short message includes: the control short message identification, the identification code of the jack to be controlled, and the identification code corresponding to the jack A control command, the control command includes an open or close command;
第一判断模块,用于判断所述家居控制短信息对应的短信息发送方是否经过授权; The first judging module is used to judge whether the short message sender corresponding to the home control short message is authorized;
电平信息输出模块,用于在判断得知所述短信息发送方经过授权后,产生与所述控制命令相对应的电平信息,并通过与所述待控制的插孔相对应的MCU继电器端口,将所述电平信息传输至相对应的继电器,以便所述继电器执行相应的断开或闭合操作,实现对家居的控制,其中所述电平信息为低电平信息或高电平信息。 The level information output module is used to generate level information corresponding to the control command after judging that the sender of the short message is authorized, and through the MCU relay corresponding to the jack to be controlled Port, to transmit the level information to the corresponding relay, so that the relay can perform the corresponding opening or closing operation to realize the control of the home, wherein the level information is low level information or high level information .
优选的,所述智能家居控制装置还包括: Preferably, the smart home control device further includes:
检测模块,用于检测各个MCU继电器端口处输出的电平信息; The detection module is used to detect the level information output at each MCU relay port;
第一状态信息生成模块,用于根据所述电平信息,生成相应的插孔状态信息,所述插孔状态信息包括:各个插孔的状态,所述各个插孔的标识编码,其中所述插孔的状态包括:接通状态和断开状态; The first state information generation module is configured to generate corresponding jack state information according to the level information, the jack state information includes: the state of each jack, the identification code of each jack, wherein the The state of the jack includes: connected state and disconnected state;
第一传输模块,用于将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述短信息发送方。 The first transmission module is used to transmit the socket state information to the GSM module, so that the GSM module can transmit it to the short message sender.
优选的,所述智能家居控制装置还包括: Preferably, the smart home control device further includes:
第二接收模块,用于接收GSM模块传输的查询短信息,所述查询短信息包括:查询短信息标识,或,所述查询短信息包括:查询短信息标识和待查询的插孔的标识编码; The second receiving module is used to receive the query short message transmitted by the GSM module, the query short message includes: query short message identification, or, the query short message includes: query short message identification and the identification code of the jack to be inquired ;
第二判断模块,用于判断所述查询短信息对应的短信息发送方是否经过授权; The second judging module is used to judge whether the short message sender corresponding to the inquiry short message is authorized;
第二状态信息生成模块,用于在判断得知所述短信发送方经过授权后,当所述查询短信息包括查询短信息标识时,查询所有MCU继电器端口输出的电平信息,生成相应的包含所有插孔的插孔状态信息;当所述查询短信息包括查询短信息标识和待查询的插孔的标识编码时,获取所述待查询的MCU继电器端口输出的电平信息,并生成相应的包含待查询插孔的插孔状态信息; The second state information generating module is used to judge that after the short message sender is authorized, when the query short message includes the query short message identification, query the level information output by all MCU relay ports, and generate corresponding information containing The jack status information of all jacks; when the query short message includes the query short message identification and the identification code of the jack to be inquired, obtain the level information output by the MCU relay port to be inquired, and generate corresponding Contains jack status information of the jack to be queried;
第二传输模块,用于将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述查询短信息对应的短信息发送方。 The second transmission module is configured to transmit the jack status information to the GSM module, so that the GSM module can transmit it to the short message sender corresponding to the inquiry short message.
优选的,所述智能家居装置还包括: Preferably, the smart home device also includes:
第三接收模块,用于接收GSM模块传输的授权短信息,所述授权短信息中包括:授权短信息标识、待授权的短信息发送方的标识以及插座的唯一标识编码; The third receiving module is used to receive the authorized short message transmitted by the GSM module, and the authorized short message includes: the authorized short message identification, the identification of the short message sender to be authorized and the unique identification code of the socket;
第三判断模块,用于判断所述授权短信息中的包含的所述插座的唯一标识编码,与MCU中预存的插座的唯一标识编码是否相同; The third judging module is used to judge whether the unique identification code of the socket contained in the authorized short message is the same as the unique identification code of the socket pre-stored in the MCU;
存储模块,用于在判断得知二者相同的情况下,存储所述待授权的短信息发送方的标识,以便根据所述待授权的短信息发送方的标识,判断接收到的家居控制短信息或查询短信息的短信息发送方是否经过授权。 The storage module is used to store the identification of the sender of the short message to be authorized when it is determined that the two are the same, so as to determine whether the received home control short message is based on the identification of the sender of the short message to be authorized. Whether the short message sender of the message or query short message is authorized.
相应的,本发明还公开了一种MCU,包括: Correspondingly, the present invention also discloses an MCU, including:
如上所述的智能家居控制装置。 Smart home controls as above.
相应的,一种智能家居控制系统,包括: Correspondingly, a smart home control system includes:
如上所述的MCU; MCU as above;
与所述MCU相连接的GSM模块; A GSM module connected with the MCU;
通过MCU继电器端口与所述MCU相连接的多个继电器,所述继电器与所述MCU继电器端口一一对应连接,且所述继电器的一端与火线相连接,另一端与相对应的插孔相连接。 A plurality of relays connected to the MCU through the MCU relay port, the relays are connected to the MCU relay ports one by one, and one end of the relay is connected to the fire wire, and the other end is connected to the corresponding jack .
本发明所公开的方案中,远程的用户利用终端产生并传输家居控制短信息,接收到所述家居控制短信息后,判断其对应的短信息发送方是否经过授权;在经过授权的情况下,产生与所述家居控制短信息中包含的控制命令相对应的电平信息,并将所述电平信息传输至待控制的插孔相对应的MCU继电器端口,从而使得所述继电器执行相应的断开或闭合操作,实现对家居的控制。应用本方案所公开的方案实现智能家居的控制时,只需在待控制的家居设备处添置相应的MCU、继电器和GSM模块即可,适用于智能家居中多种电器的随意组合、变换的情况,不需要对家居设备进行重新设计或者改造,成本低廉,实现方式简单,为一种轻量级的通用智能家居的解决方案。 In the solution disclosed by the present invention, the remote user uses the terminal to generate and transmit home control short messages, and after receiving the home control short messages, judges whether the corresponding short message sender is authorized; if authorized, Generate level information corresponding to the control command contained in the home control short message, and transmit the level information to the MCU relay port corresponding to the jack to be controlled, so that the relay performs a corresponding disconnection Open or close operation to realize the control of the home. When using the scheme disclosed in this scheme to realize the control of smart home, it is only necessary to add the corresponding MCU, relay and GSM module to the home equipment to be controlled, which is suitable for the random combination and transformation of various electrical appliances in smart home , does not need to redesign or transform home equipment, is low in cost, and simple in implementation, and is a lightweight general-purpose smart home solution.
附图说明 Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例公开的一种智能家居控制方法的工作流程示意图; FIG. 1 is a schematic workflow diagram of a smart home control method disclosed in an embodiment of the present invention;
图2为本发明实施例公开的又一种智能家居控制方法的工作流程示意图; FIG. 2 is a schematic workflow diagram of yet another smart home control method disclosed in an embodiment of the present invention;
图3为本发明实施例公开的又一种智能家居控制方法的工作流程示意图; Fig. 3 is a schematic workflow diagram of yet another smart home control method disclosed in an embodiment of the present invention;
图4为本发明实施例公开的又一种智能家居控制方法的工作流程示意图; Fig. 4 is a schematic workflow diagram of yet another smart home control method disclosed in an embodiment of the present invention;
图5为本发明实施例公开的一种智能家居控制装置的结构示意图; Fig. 5 is a schematic structural diagram of a smart home control device disclosed in an embodiment of the present invention;
图6为本发明实施例公开的一种智能家居控制系统的结构示意图。 Fig. 6 is a schematic structural diagram of a smart home control system disclosed by an embodiment of the present invention.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
为了解决现有技术中在实现智能家居控制时,所具有的成本高,实现方式复杂的问题,本申请公开了一种智能家居控制方法、装置、MCU和智能家居控制系统。 In order to solve the problems of high cost and complicated implementation methods in the prior art when realizing smart home control, the application discloses a smart home control method, device, MCU and smart home control system.
本发明所公开的智能家居控制方法应用于MCU(MicroControlUnit,微控制单元),其中,所述MCU与GSM模块相连接,并通过MCU继电器端口分别与多个继电器相连接,所述MCU继电器端口和继电器一一对应,并且所述继电器的一端与火线相连接,另一端与插孔一一对应连接,参见图1所示的工作流程示意图,所述智能家居控制方法包括: The smart home control method disclosed by the present invention is applied to MCU (MicroControlUnit, micro control unit), wherein, the MCU is connected with the GSM module, and is respectively connected with a plurality of relays through the MCU relay port, and the MCU relay port and The relays are in one-to-one correspondence, and one end of the relay is connected to the live wire, and the other end is connected to the jack in a one-to-one correspondence. Referring to the schematic diagram of the workflow shown in Figure 1, the smart home control method includes:
步骤S11、接收GSM模块传输的家居控制短信息,所述家居控制短信息中包括:控制短信息标识、待控制的插孔的标识编码、与所述插孔的标识编码相对应的控制命令,所述控制命令包括打开或关闭命令。 Step S11, receiving the home control short message transmitted by the GSM module, the home control short message includes: the control short message identification, the identification code of the jack to be controlled, and the control command corresponding to the identification code of the jack, The control commands include opening or closing commands.
GSM(GlobalSystemofMobilecommunication,全球移动通讯系统)模块,是将GSM射频芯片、基带处理芯片、存储器、功放器件等集成在一块线路板上,具有独立的操作系统、GSM射频处理、基带处理并提供标准接口的功能模块,具有发送SMS(ShortMessageService,短信息服务)的功能。在本申请中,将GSM模块与MCU相连接,GSM模块接收远程的用户通过终端传输的短信息,并将其传输至所述MCU,以便所述MCU根据接收到的短信息执行相应的操作。其中,所述终端可以通过多种形式实现,例如,手机、掌上电脑PDA、计算机等。 GSM (Global System of Mobile communication) module integrates GSM radio frequency chip, baseband processing chip, memory, power amplifier device, etc. on a circuit board, has an independent operating system, GSM radio frequency processing, baseband processing and provides standard interfaces. The function module has the function of sending SMS (ShortMessageService, short message service). In this application, the GSM module is connected with the MCU, and the GSM module receives the short message transmitted by the remote user through the terminal, and transmits it to the MCU, so that the MCU performs corresponding operations according to the received short message. Wherein, the terminal can be realized in various forms, for example, a mobile phone, a PDA, a computer, and the like.
当需要对家居进行控制时,用户通过终端产生家居控制短信息,GSM模块在接收到所述家居控制短信息后,会将其传输至MCU。为了区分所述智能家居控制短信息和其他类型的短信息,在所述家居控制短信息中包括控制短信息标识,其中所述控制短信息标识可为加载在短信息中的字符。另外,在所述家居控制短信息中还包括待控制的插孔的标识编码、与所述插孔的标识编码相对应的控制命令。 When it is necessary to control the home, the user generates a home control short message through the terminal, and the GSM module transmits the home control short message to the MCU after receiving the home control short message. In order to distinguish the smart home control short message from other types of short messages, a control short message identifier is included in the home control short message, wherein the control short message identifier may be a character loaded in the short message. In addition, the home control short message also includes the identification code of the jack to be controlled, and the control command corresponding to the identification code of the jack.
步骤S12、判断所述家居控制短信息对应的短信息发送方是否经过授权,若是,则执行步骤S13的操作,若否,则暂停本次操作,返回步骤S11,等到下一次接收到家居控制短信息后,再执行相应的控制操作。 Step S12, determine whether the short message sender corresponding to the home control short message is authorized, if yes, execute the operation of step S13, if not, suspend this operation, return to step S11, and wait until the next home control short message is received After receiving the information, execute the corresponding control operation.
为了提高家居控制过程中的安全性、可靠性,在接收到所述家居控制短信息后,需要判断短信息发送方是否经过授权,在授权的情况下,继续执行后续的操控。 In order to improve the safety and reliability in the home control process, after receiving the home control short message, it is necessary to determine whether the sender of the short message is authorized, and if authorized, continue to perform subsequent operations.
步骤S13、在判断得知所述短信息发送方经过授权后,输出与所述控制命令相对应的电平信息,并通过与所述待控制的插孔相对应的MCU继电器端口,将所述电平信息传输至相对应的继电器,以便所述继电器执行相应的断开或闭合操作,实现对家居的控制,所述电平信息为高电平信息或低电平信息。 Step S13, after judging that the sender of the short message is authorized, output the level information corresponding to the control command, and pass the MCU relay port corresponding to the jack to be controlled to the The level information is transmitted to the corresponding relay, so that the relay performs a corresponding opening or closing operation to realize the control of the home, and the level information is high level information or low level information.
当产生所述家居控制短信息的短信息发送方经过授权时,MCU根据所述家居控制短信息产生相对应的电平信息。MCU分配一系列的端口作为MCU继电器端口,与继电器相连接。其中,所述继电器通常为电磁继电器,用于实现通过弱电控制强电,当然,也可以为其他形式的继电器,本发明不做限定。根据所述家居控制短信息确定某一待控制的插孔需要打开时,与之相连接的MCU继电器端口输出低电平,接收到低电平信息的继电器断开,从而使得插孔与火线断开,接在插孔之上的家居电器停止工作。当根据所述家居控制短信息确定某一待控制的插孔需要关闭时,与之相连接的MCU继电器端口输出高电平,接收到高电平信息的继电器闭合,此时继电器接通,插孔与火线相连接,插孔之上的电器正常工作。 When the short message sender who generates the home control short message is authorized, the MCU generates corresponding level information according to the home control short message. The MCU allocates a series of ports as MCU relay ports to connect with the relays. Wherein, the relay is usually an electromagnetic relay, which is used to control the strong current through the weak current. Of course, it can also be a relay of other forms, which is not limited in the present invention. According to the home control short message, when it is determined that a jack to be controlled needs to be opened, the MCU relay port connected to it outputs a low level, and the relay receiving the low level information is disconnected, so that the jack is disconnected from the live wire. Turn on, and the household appliances connected to the jack stop working. When it is determined according to the household control short message that a jack to be controlled needs to be closed, the MCU relay port connected to it outputs a high level, and the relay that receives the high level information is closed. At this time, the relay is connected, and the plug The hole is connected to the live wire, and the electrical appliances above the jack work normally.
本发明所公开的步骤S11至步骤S13所公开的方案中,远程的用户利用终端产生并传输家居控制短信息,接收到所述家居控制短信息后,判断其对应的短信息发送方是否经过授权;在经过授权的情况下,产生与所述家居控制短信息中包含的控制命令相对应的电平信息,并将所述电平信息传输至待控制的插孔相对应的MCU继电器端口,从而使得所述继电器执行相应的断开或闭合操作,实现对家居的控制。应用本方案所公开的方案实现智能家居的控制时,只需在待控制的家居设备处添置相应的MCU、继电器和GSM模块即可,适用于智能家居中多种电器的随意组合、变换的情况,不需要对家居设备进行重新设计或者改造,成本低廉,实现方式简单,为一种轻量级的通用智能家居的解决方案。 In the scheme disclosed in step S11 to step S13 disclosed in the present invention, the remote user uses the terminal to generate and transmit the home control short message, and after receiving the home control short message, it is judged whether the corresponding short message sender is authorized ; In the case of authorization, generate the level information corresponding to the control command contained in the home control short message, and transmit the level information to the corresponding MCU relay port of the jack to be controlled, thereby The relay is made to perform a corresponding opening or closing operation, so as to realize the control of the home. When using the scheme disclosed in this scheme to realize the control of smart home, it is only necessary to add the corresponding MCU, relay and GSM module to the home equipment to be controlled, which is suitable for the random combination and transformation of various electrical appliances in smart home , does not need to redesign or transform home equipment, is low in cost, and simple in implementation, and is a lightweight general-purpose smart home solution.
进一步的,参见图2所示的工作流程示意图,在步骤S13中所述的将所述电平信息传输至相对应的继电器后,本发明所公开的智能家居控制方法还包括: Further, referring to the schematic workflow diagram shown in FIG. 2, after the level information is transmitted to the corresponding relay in step S13, the smart home control method disclosed in the present invention further includes:
步骤S14、检测各个MCU继电器端口处输出的电平信息; Step S14, detecting the level information output by each MCU relay port;
步骤S15、根据所述电平信息,生成相应的插孔状态信息,所述插孔状态信息包括:各个插孔的状态,所述各个插孔的标识编码,其中所述插孔的状态包括:接通状态和断开状态; Step S15: Generate corresponding jack status information according to the level information, the jack status information includes: the status of each jack, and the identification code of each jack, wherein the status of the jack includes: ON state and OFF state;
步骤S16、将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述短信息发送方。 Step S16. Transmit the jack status information to the GSM module, so that the GSM module can transmit it to the short message sender.
在根据家居控制短信息实现对家居的控制后,为了明确各个插孔的状态,本发明还包括步骤S14至步骤S15所公开的方案。在该方案中,检测各个MCU继电器端口处输出的电平信息,并根据各个MCU继电器端口对应的插孔的标识编码产生相应的插孔状态信息。其中,所述插孔状态信息包括:各个插孔的状态,与所述各个插孔相对应的插孔的标识编码,所述插孔的状态包括:接通状态和断开状态;例如,当第一MCU继电器端口输出的电平信息为低电平信息,所述第一MCU继电器端口对应的插孔的标识编码为1时,则说明插孔1为断开状态;当第二MCU继电器端口输出的电平信息为高电平信息,所述第二MCU继电器端口对应的插孔的标识编码为2时,说明插孔2为接通状态,产生的插孔状态信息具体可以为【“插孔1”+“断开”;“插孔2”+“接通”】的形式,当然,所述插孔状态信息也可以为其他形式,本发明不做限定。根据插孔状态信息,能够使用户知悉各个家居设备的工作情况。 After realizing the control of the home according to the home control short message, in order to clarify the status of each jack, the present invention also includes the solutions disclosed in steps S14 to S15. In this scheme, the level information output by each MCU relay port is detected, and the corresponding jack status information is generated according to the identification code of the jack corresponding to each MCU relay port. Wherein, the jack state information includes: the state of each jack, and the identification code of the jack corresponding to each jack, and the state of the jack includes: an on state and an off state; for example, when The level information that the first MCU relay port outputs is low-level information, and when the identification code of the jack corresponding to the first MCU relay port is 1, it means that the jack 1 is disconnected; when the second MCU relay port The output level information is high level information. When the identification code of the jack corresponding to the second MCU relay port is 2, it indicates that the jack 2 is in the connected state, and the generated jack state information can be specifically ["plug "hole 1"+"off"; "jack 2"+"connected"], of course, the jack status information may also be in other forms, which are not limited in the present invention. According to the socket status information, the user can be informed of the working conditions of each household device.
进一步的,参见图3所示的工作流程示意图,本发明所公开的智能家居控制方法还包括: Further, referring to the schematic workflow diagram shown in Figure 3, the smart home control method disclosed in the present invention also includes:
步骤S21、接收GSM模块传输的查询短信息,所述查询短信息包括:查询短信息标识,或,所述查询短信息包括:查询短信息标识和待查询的插孔的标识编码。 Step S21: Receive the inquiry short message transmitted by the GSM module, the inquiry short message includes: the inquiry short message identification, or, the inquiry short message includes: the inquiry short message identification and the identification code of the jack to be inquired.
当用户希望得知各家居的工作状态时,会利用终端产生并传输相应的查询短信息。GSM模块在接收到所述查询短消息后,会将其传输至MCU。为了区分所述查询短信息和其他类型的短信息,在所述查询短信息中包括查询短信息标识,其中所述查询短信息标识可为加载在所述查询短信息中的字符。 When the user wants to know the working status of each home, he will use the terminal to generate and transmit corresponding query short messages. After receiving the inquiry short message, the GSM module will transmit it to the MCU. In order to distinguish the query short message from other types of short messages, the query short message includes a query short message identifier, wherein the query short message identifier can be a character loaded in the query short message.
另外,当用户需要知悉所有与插孔相连接的家居设备的工作状态时,所述查询短信息包括查询短信息标识,当用户只需要知悉部分家居设备的工作状态时,所述查询短信息包括:查询短信息标识,以及与上述部分家居设备相对应的待查询的插孔的标识编码。 In addition, when the user needs to know the working status of all household devices connected to the socket, the query message includes the query message identification; when the user only needs to know the working status of some household devices, the query message includes : Query the short message identification, and the identification code of the socket to be queried corresponding to the above-mentioned part of household equipment.
步骤S22、判断所述查询短信息对应的短信息发送方是否经过授权,若是,则执行步骤S23的操作,若否,则暂停本次的查询操作,返回执行步骤S21,再次接收到查询短信息后,则继续执行相应的查询操作。 Step S22, judging whether the short message sender corresponding to the query short message is authorized, if yes, then perform the operation of step S23, if not, then suspend the current query operation, return to execute step S21, and receive the query short message again After that, continue to execute the corresponding query operation.
步骤S23、在判断得知所述短信发送方经过授权后,当所述查询短信息包括查询短信息标识时,查询所有MCU继电器端口输出的电平信息,生成相应的包含所有插孔的插孔状态信息;当所述查询短息包括查询短信息标识和待查询的插孔的标识编码时,获取与所述待查询的插孔相对应的MCU继电器端口输出的电平信息,并生成相应的包含待查询插孔的插孔状态信息。 Step S23, after judging that the sender of the short message is authorized, when the query short message includes the query short message identification, query the level information output by all MCU relay ports, and generate corresponding jacks that include all jacks Status information; when the query short message includes the query short message identification and the identification code of the jack to be queried, obtain the level information output by the MCU relay port corresponding to the jack to be queried, and generate a corresponding Contains the jack status information of the jack to be queried.
所述插孔状态信息中,包括相应的各个插孔的状态,与所述各个插孔相对应的各个插孔的标识编码,其中所述插孔的状态包括:接通状态和断开状态。 The jack status information includes the corresponding status of each jack and the identification code of each jack corresponding to each jack, wherein the status of the jack includes: an on state and an off state.
步骤S24、将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述查询短信息对应的短信息发送方。 Step S24: Transmit the socket status information to the GSM module, so that the GSM module can transmit it to the short message sender corresponding to the inquiry short message.
通过步骤S21至步骤S24的操作,在用户需要知悉家居设备的工作状态时,只需要向GSM模块传输查询短信息即可。MCU在接收到所述查询短信息后,查询相应的MCU继电器端口输出的电平信息,并生成相应的插孔状态信息,通过GSM模块将其传输至用户,从而使用户获悉各个插孔的通断情况,以便获知家居设备的工作状态。 Through the operations from step S21 to step S24, when the user needs to know the working status of the household equipment, he only needs to transmit the inquiry short message to the GSM module. After the MCU receives the query short message, it queries the level information output by the corresponding MCU relay port, and generates the corresponding jack status information, which is transmitted to the user through the GSM module, so that the user can learn the communication status of each jack. In order to know the working status of household equipment.
进一步的,参见图4所示的工作流程示意图,为了提高智能家居控制过程中的安全性和可靠性,在所述接收GSM模块传输的家居控制短信息或查询短信息之前,本发明所公开的智能家居控制方法还包括: Further, referring to the workflow diagram shown in Figure 4, in order to improve the security and reliability in the smart home control process, before receiving the home control short message or query short message transmitted by the GSM module, the Smart home control methods also include:
步骤S31、接收GSM模块传输的授权短信息,所述授权短信息中包括:授权短信息标识、待授权的短信息发送方的标识以及插座的唯一标识编码。 Step S31: Receive the authorization short message transmitted by the GSM module, the authorization short message includes: the authorized short message identifier, the identifier of the sender of the short message to be authorized, and the unique identification code of the socket.
步骤S32、判断所述授权短信息中包含的所述插座的唯一标识编码,与MCU中预存的插座的唯一标识编码是否相同,若是,执行步骤S33的操作,若否,则拒绝本次的授权操作,返回执行步骤S31的操作,以等到下次接收到授权短信息后,再进行授权。 Step S32, judging whether the unique identification code of the socket contained in the authorization short message is the same as the unique identification code of the pre-stored socket in the MCU, if yes, perform the operation of step S33, if not, reject the authorization this time Operation, return to perform the operation of step S31, so as to wait until the authorization short message is received next time, and then authorize.
在MCU中,预先存储有插座的唯一标识编码。另外,所述授权的短信息发送方的标识为能够唯一表示发送方的标识,例如终端的IP地址,当所述终端为手机时,所述发送方的标识可选用手机号码来实现,本发明对此不做限定。 In the MCU, the unique identification code of the socket is stored in advance. In addition, the identifier of the authorized short message sender is an identifier that can uniquely represent the sender, such as the IP address of the terminal. When the terminal is a mobile phone, the identifier of the sender can be realized by using a mobile phone number. The present invention There is no limit to this.
在所述授权短信息中加载插座的唯一标识编码,起到对所述授权短信息的认证判断的作用。在具体执行判断操作时,将所述授权短信息中包含的标识编码与预先存储在所述MCU中的标识编码相对比,当二者相同时,才继续执行之后的操作。 Loading the unique identification code of the socket in the authorized short message plays a role of authentication judgment on the authorized short message. When specifically performing the judgment operation, the identification code contained in the authorization short message is compared with the identification code pre-stored in the MCU, and only when the two are the same, the following operations are continued.
步骤S33、在判断得知二者相同的情况下,存储所述待授权的短信息发送方的标识,以便根据所述待授权的短信息发送方的标识,判断接收到的家居控制短信息或查询短信息的短信息发送方是否经过授权。 Step S33, when it is determined that the two are the same, store the identifier of the short message sender to be authorized, so as to judge whether the received home control short message or Query whether the short message sender of the short message is authorized.
在判断得知所述授权短信息中包含的插座的唯一标识编码与MCU中预存的唯一标识编码相同时,说明所述授权短信息是有效的,则存储所述待授权的短信息发送方的标识,在所述MCU中设置有用户授权列表,将所述待授权的短信息发送方的标识存储至用户授权列表中即可。其中,所述待授权的短信息发送方的标识为能够唯一表示发送方的标识。当所述终端为手机,所述短信息发送方的标识为手机号码时,接收到所述家居控制短信息和查询短信息后,在判断短信息发送方是否经过授权时,检验所述短信息发送方的手机号码是否被存储在MCU中,即可得知所述家居控制短信息或查询短信息是否经过授权。 When judging that the unique identification code of the socket contained in the authorized short message is the same as the prestored unique identification code in the MCU, it means that the authorized short message is valid, and then store the short message sender's address to be authorized. ID, a user authorization list is set in the MCU, and the ID of the short message sender to be authorized is stored in the user authorization list. Wherein, the identifier of the short message sender to be authorized is an identifier that can uniquely represent the sender. When the terminal is a mobile phone, and the identifier of the sender of the short message is a mobile phone number, after receiving the home control short message and the query short message, when judging whether the sender of the short message is authorized, check the short message Whether the sender's mobile phone number is stored in the MCU can determine whether the home control short message or query short message is authorized.
其中所述的“插座的唯一标识编码”和“插孔的标识编码”并不相同。每个插座,俗称接线板,具有唯一的插座唯一标识编码,通常采用较长的字符串,用于进行对短信息发送方进行授权时的验证,判断用户的合法性。在MCU中,预先存储有插座的唯一标识编码。在插座上的每一个插孔,都有一个插孔的标识编码,用于区分和控制不同的插孔,在查询和执行控制操作时使用,通常采用较短的字符。例如,A用户的插座上有四个插孔,该插座的唯一标识编码为“ID123fedsa”四个插孔的标识编码分别为“1”、“2”、“3”和“4”。当A用户需要给该插座发送授权短信息时,所述授权短信息中需要包括:授权短信息标识、待授权的短信息发送方的标识以及插座的唯一标识编码,这种情况下,所述授权短信息通常为【“这是授权短信”+“插座唯一标识编码”+“授权终端号”】的形式,其中,授权终端号即为待授权的短信息发送方的标识,因此当A用户使用的终端为手机,该手机号码为“15088888888”时,则所述授权终端号为:15088888888,发送的授权短信息为【“这是授权短信”+“ID123fedsa”+“15088888888”】时,接收到该授权短信息的GSM模块将其传输至设置在插座中的MCU,MCU在接收到所述授权短信息后,判断接收到的标识编码ID123fedsa与自身预先存储的标识编码相同,则验证通过,将终端号“15088888888”添加至用户授权列表中。若A用户发送的授权短信息为【“这是授权短信”+“IDABCDEFG”+“15088888888”】,MCU接收到该授权短信息后,判断得知其中包含的插座的唯一标识编码与MCU中存储的标识编码不相同,则MCU拒绝此次授权短信息的请求,授权失败。当然,本发明中的授权短信息也可以其他形式实现,本发明不做限定。 The "unique identification code of the socket" and the "identification code of the socket" mentioned therein are not the same. Each socket, commonly known as a wiring board, has a unique code for the unique identification of the socket, usually using a longer character string, which is used to verify the authorization of the sender of the short message and judge the legitimacy of the user. In the MCU, the unique identification code of the socket is stored in advance. Each jack on the socket has a jack identification code, which is used to distinguish and control different jacks, and is used when querying and performing control operations, usually using shorter characters. For example, user A has four jacks on the socket, and the unique identification code of the socket is "ID123fedsa". The identification codes of the four jacks are "1", "2", "3" and "4" respectively. When user A needs to send an authorized short message to the socket, the authorized short message needs to include: the authorized short message identification, the identification of the sender of the short message to be authorized, and the unique identification code of the socket. In this case, the described Authorized short messages are usually in the form of ["This is an authorized short message" + "unique socket identification code" + "authorized terminal number"], where the authorized terminal number is the identification of the sender of the short message to be authorized, so when user A The terminal used is a mobile phone. When the mobile phone number is "15088888888", the authorized terminal number is: 15088888888. When the authorized short message sent is ["This is an authorized short message"+"ID123fedsa"+"15088888888"], receive The GSM module that arrives at this authorized short message transmits it to the MCU that is arranged on the socket, and MCU, after receiving described authorized short message, judges that the identification code ID123fedsa that receives is identical with the identification code that self stores in advance, then verification passes, Add the terminal number "15088888888" to the user authorization list. If the authorized short message sent by user A is ["This is an authorized short message"+"IDABCDEFG"+"15088888888"], after receiving the authorized short message, the MCU judges that the unique identification code of the socket contained in it is the same as that stored in the MCU. If the identification codes are not the same, the MCU rejects the request to authorize the short message, and the authorization fails. Of course, the authorized short message in the present invention can also be implemented in other forms, which is not limited in the present invention.
当A用户发送家居控制短信息时,通常以【“这是控制短信”+“开/关命令”+“插孔编号”】的形式实现,例如,【“这是控制短信”+“开”+“2”】。在接收到所述家居控制短信息后,MCU通过查询用户授权列表,判断短信息发送方是否经过授权,并在经过授权的情况下,向插孔2对应的MCU继电器端口输出高电平信息,以使相应的插孔接通。 When user A sends a home control message, it is usually implemented in the form of ["This is a control message" + "On/Off command" + "Jack number"], for example, ["This is a control message" + "On" + "2"]. After receiving the home control short message, the MCU checks the user authorization list to determine whether the short message sender is authorized, and if authorized, outputs high-level information to the MCU relay port corresponding to jack 2, to connect the corresponding socket.
本发明公开了一种智能家居控制方法,该方法应用于MCU中,且所述MCU与GSM模块相连接,并通过MCU继电器端口分别与多个继电器相连接,其中所述MCU继电器端口和继电器一一对应,且所述继电器的一端与火线相连接,另一端与插孔一一对应连接,本发明所公开的智能家居控制方法中,由GSM模块接收用户发送的短信息,并传输至MCU进行解析处理。其中,所述短信息至少包括三种:授权短信息、家居控制短信息和查询短信息,当接收到所述授权短信息时,检验其中包内含的插座的唯一标识编码是否正确,并在正确的情况下,将所述授权短信息中包含的待授权的短信息发送方的标识存储至MCU的用户授权列表中;当接收到所述控制短信息时,根据所述用户授权列表中存储的短信息发送方的标识,判断所述家居控制短信息对应的短信息发送方是否经过授权,并在授权的情况下,根据所述控制短信息改变MCU继电器端口传输的电平,控制继电器的开闭,实现插孔的接通或断开,从而实现对家居设备的控制,之后检测各个MCU继电器端口处输出的电平信息,产生相应的插孔状态信息并通过GSM模块传输至远程的用户;当接收到所述查询短信息后,根据所述用户授权列表中存储的短信息发送方的标识,判断所述查询短信息对应的短信息发送方是否经过授权,在授权的情况下,查询相应的MCU继电器端口输出的电平信息,生成相应的插孔状态信息,并通过GSM模块传输至远程的用户。 The invention discloses a smart home control method. The method is applied to an MCU, and the MCU is connected to a GSM module, and is connected to a plurality of relays through the MCU relay port, wherein the MCU relay port is connected to a relay One-to-one correspondence, and one end of the relay is connected to the fire wire, and the other end is connected to the jack in a one-to-one correspondence. In the smart home control method disclosed in the present invention, the GSM module receives the short message sent by the user and transmits it to the MCU for execution. Parse processing. Wherein, the short message includes at least three types: authorized short message, home control short message and inquiry short message. Under the correct situation, the identification of the short message sender to be authorized contained in the authorized short message is stored in the user authorization list of the MCU; The identification of the sender of the short message, judge whether the short message sender corresponding to the home control short message is authorized, and in the case of authorization, change the level transmitted by the MCU relay port according to the control short message, and control the power of the relay. Open and close to realize the connection or disconnection of the jack, so as to realize the control of household equipment, and then detect the level information output by each MCU relay port, generate the corresponding jack status information and transmit it to the remote user through the GSM module After receiving the query short message, according to the identifier of the short message sender stored in the user authorization list, judge whether the short message sender corresponding to the query short message is authorized, and in the case of authorization, query The level information output by the corresponding MCU relay port generates the corresponding jack status information, and transmits it to the remote user through the GSM module.
根据本发明所公开的智能家居控制方法,实现对智能家居的控制时,只需在插孔处设置相应的GSM模块、MCU和继电器即可,不需要在对家居设备进行重新设计或改造,接在插孔上的家居设备可任意增减、组合和更换,实现了轻量级的通用智能家居的解决方案。 According to the smart home control method disclosed in the present invention, when realizing the control of the smart home, it is only necessary to set the corresponding GSM module, MCU and relay at the jack, and it is not necessary to redesign or modify the home equipment. The household devices on the jack can be increased, decreased, combined and replaced arbitrarily, realizing a lightweight general smart home solution.
相应的,本发明还公开了一种智能家居控制装置,所述装置应用于MCU,所述MCU与GSM模块相连接,并通过MCU继电器端口分别与多个继电器相连接,所述MCU继电器端口和继电器一一对应,且所述继电器的一端与火线相连接,另一端与插孔一一对应连接,参见图5所示的结构示意图,所述智能家居控制装置包括:第一接收模块11、第一判断模块12和电平信息输出模块13,其中, Correspondingly, the present invention also discloses a smart home control device, the device is applied to an MCU, the MCU is connected to the GSM module, and is respectively connected to a plurality of relays through the MCU relay port, and the MCU relay port and The relays are in one-to-one correspondence, and one end of the relay is connected to the fire wire, and the other end is connected to the jack in a one-to-one correspondence. Referring to the structural diagram shown in FIG. 5, the smart home control device includes: a first receiving module 11, a second A judgment module 12 and a level information output module 13, wherein,
所述第一接收模块11,用于接收GSM模块传输的家居控制短信息,所述家居控制短信息中包括:控制短信息标识、待控制的插孔的标识编码、与所述插孔的标识编码相对应的控制命令,所述控制命令包括打开或关闭命令; The first receiving module 11 is used to receive the home control short message transmitted by the GSM module. The home control short message includes: the control short message identification, the identification code of the jack to be controlled, and the identification of the jack Encoding a corresponding control command, the control command includes an open or close command;
所述第一判断模块12,用于判断所述家居控制短信息对应的短信息发送方是否经过授权; The first judging module 12 is used to judge whether the short message sender corresponding to the home control short message is authorized;
所述电平信息输出模块13,用于在判断得知所述短信息发送方经过授权后,产生与所述控制命令相对应的电平信息,并通过与所述待控制的插孔相对应的MCU继电器端口,将所述电平信息传输至相对应的继电器,以便所述继电器执行相应的断开或闭合操作,实现对家居的控制,其中所述电平信息为低电平信息或高电平信息。 The level information output module 13 is used to generate the level information corresponding to the control command after judging that the sender of the short message is authorized, and through corresponding to the jack to be controlled The relay port of the MCU transmits the level information to the corresponding relay, so that the relay performs the corresponding opening or closing operation to realize the control of the home, wherein the level information is low level information or high level information level information.
本发明所公开的智能家居控制装置,不需要对家居设备进行重新的设计或改造,实现方式简单,成本低,实现了轻量级的通用智能家居的解决方案。 The smart home control device disclosed in the present invention does not require redesign or modification of home equipment, has a simple implementation method and low cost, and realizes a lightweight general smart home solution.
进一步的,本发明所公开的智能家居控制装置还包括:检测模块14、第一状态信息生成模块15和第一传输模块16,其中, Further, the smart home control device disclosed in the present invention also includes: a detection module 14, a first status information generation module 15 and a first transmission module 16, wherein,
所述检测模块14,用于检测各个MCU继电器端口处输出的电平信息; The detection module 14 is used to detect the level information output at each MCU relay port;
所述第一状态信息生成模块15,用于根据所述电平信息,生成相应的插孔状态信息,所述插孔状态信息包括:各个插孔的状态,所述各个插孔的标识编码,其中所述插孔的状态包括:接通状态和断开状态; The first state information generation module 15 is configured to generate corresponding jack state information according to the level information, the jack state information includes: the state of each jack, the identification code of each jack, The state of the jack includes: connected state and disconnected state;
所述第一传输模块16,用于将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述短信息发送方。 The first transmission module 16 is configured to transmit the jack state information to the GSM module, so that the GSM module can transmit it to the short message sender.
进一步的,所述智能家居控制装置还包括:第二接收模块、第二判断模块、第二状态信息生成模块和第二传输模块,其中, Further, the smart home control device further includes: a second receiving module, a second judging module, a second state information generating module and a second transmitting module, wherein,
所述第二接收模块,用于接收GSM模块传输的查询短信息,所述查询短信息包括:查询短信息标识,或,所述查询短信息包括:查询短信息标识和待查询的插孔的标识编码; The second receiving module is used to receive the query short message transmitted by the GSM module, the query short message includes: the query short message identification, or, the query short message includes: the query short message identification and the jack to be queried identification code;
所述第二判断模块,用于判断所述查询短信息对应的短信息发送方是否经过授权; The second judging module is used to judge whether the short message sender corresponding to the inquiry short message is authorized;
所述第二状态信息生成模块,用于在判断得知所述短信发送方经过授权后,当所述查询短信息包括查询短信息标识时,查询所有MCU继电器端口输出的电平信息,生成相应的包含所有插孔的插孔状态信息;当所述查询短信息包括查询短信息标识和待查询的插孔的标识编码时,获取所述待查询的MCU继电器端口输出的电平信息,并生成相应的包含待查询插孔的插孔状态信息; The second state information generating module is used to inquire about the level information output by all MCU relay ports after judging and knowing that the sender of the short message is authorized, and when the query short message includes a query short message identification, to generate a corresponding The jack state information that comprises all jacks; When the query short message includes the query short message identification and the identification code of the jack to be queried, obtain the level information output by the MCU relay port to be queried, and generate Corresponding jack status information including the jack to be queried;
所述第二传输模块,用于将所述插孔状态信息传输至所述GSM模块,以便所述GSM模块将其传输至所述查询短信息对应的短信息发送方。 The second transmission module is configured to transmit the socket status information to the GSM module, so that the GSM module can transmit it to the short message sender corresponding to the inquiry short message.
进一步的,本发明所公开的智能家居装置还包括:第三接收模块、第三判断模块和存储模块,其中, Further, the smart home device disclosed in the present invention also includes: a third receiving module, a third judging module and a storage module, wherein,
所述第三接收模块,用于接收GSM模块传输的授权短信息,所述授权短信息中包括:授权短信息标识、待授权的短信息发送方的标识以及插座的唯一标识编码; The third receiving module is used to receive the authorized short message transmitted by the GSM module, and the authorized short message includes: the authorized short message identification, the identification of the short message sender to be authorized and the unique identification code of the socket;
所述第三判断模块,用于判断所述授权短信息中的包含的所述插座的唯一标识编码,与MCU中预存的插座的唯一标识编码是否相同; The third judging module is used to judge whether the unique identification code of the socket contained in the authorized short message is the same as the unique identification code of the socket pre-stored in the MCU;
所述存储模块,用于在判断得知二者相同的情况下,存储所述待授权的短信息发送方的标识,以便根据所述待授权的短信息发送方的标识,判断接收到的家居控制短信息或查询短信息的短信息发送方是否经过授权。 The storage module is used to store the identification of the sender of the short message to be authorized when it is determined that the two are the same, so as to judge the received home address according to the identification of the sender of the short message to be authorized. Whether the SMS sender of the control SMS or inquiry SMS is authorized.
相应的,本发明还公开了一种MCU,所述MCU包括上述的智能家居控制装置,其中所述智能家居控制装置包括:第一接收模块11、第一判断模块12和电平信息输出模块13,并且,所述智能家居控制装置还可以包括:检测模块14、第一状态信息生成模块15和第一传输模块16,以及第二接收模块、第二判断模块、第二状态信息生成模块、第二传输模块、第三接收模块、第三判断模块和存储模块。 Correspondingly, the present invention also discloses an MCU, which includes the above-mentioned smart home control device, wherein the smart home control device includes: a first receiving module 11, a first judging module 12 and a level information output module 13 , and, the smart home control device may also include: a detection module 14, a first state information generation module 15 and a first transmission module 16, and a second receiving module, a second judgment module, a second state information generation module, a second The second transmission module, the third receiving module, the third judging module and the storage module.
相应的,本发明还公开了一种智能家居控制系统,参见图6公开的结构示意图,所述智能家居控制系统包括:如上所述的MCU1,与所述MCU相连接的GSM模块2,以及多个继电器3。 Correspondingly, the present invention also discloses a smart home control system, referring to the structural schematic diagram disclosed in FIG. a relay3.
其中,所述继电器3通过MCU继电器端口与所述MCU1相连接,且所述继电器3与所述MCU继电器端口一一对应连接,所述继电器3的一端与火线相连接,另一端与相对应的插孔相连接。 Wherein, the relay 3 is connected to the MCU1 through the MCU relay port, and the relay 3 is connected to the MCU relay port one by one, one end of the relay 3 is connected to the fire wire, and the other end is connected to the corresponding socket connected.
所述MCU1预先分配有与GSM模块2相连接的GSM端口PortGSM,通过PortGSM实现了MCU1与GSM模块2之间的通信,用于解析所述GSM模块2传输的短信息,并根据所述短信息进行处理,输出相应的电平信息,实现对继电器3的控制,并用于编辑插孔状态信息,将其传输至GSM模块2。 The MCU1 is pre-distributed with the GSM port PortGSM connected to the GSM module 2, and the communication between the MCU1 and the GSM module 2 is realized by the PortGSM, which is used to analyze the short message transmitted by the GSM module 2, and according to the short message process, output the corresponding level information, realize the control of the relay 3, and use it to edit the status information of the jack, and transmit it to the GSM module 2.
同时,MCU1预先分配有与继电器3相连接的MCU继电器端口PortControl,通过PortControl,MCU1根据输出的电平信息实现对继电器3通断的控制,从而实现对家居设备的控制。 At the same time, the MCU1 is pre-assigned with the MCU relay port PortControl connected to the relay 3. Through the PortControl, the MCU1 realizes the on-off control of the relay 3 according to the output level information, thereby realizing the control of the household equipment.
所述继电器3通常为电磁继电器,与MCU1通过PortControl实现连接,并根据所述PortControl输出的电平信息,执行相应的断开或闭合操作,从而控制插孔与火线之间的通断,实现对与插孔相连接的家居设备的控制。 The relay 3 is usually an electromagnetic relay, which is connected to the MCU1 through the PortControl, and performs a corresponding opening or closing operation according to the level information output by the PortControl, thereby controlling the on-off between the jack and the live wire, and realizing the Control of household devices connected to the jack.
本发明所公开的智能家居控制系统,集成在接线插座中,通过GSM模块实现与远程的用户的通信,并通过MCU解析接收到的短信息,根据所述短信息控制所述继电器的通断,实现对家居设备的控制。在这个过程中,不需要对家居设备进行重新的设计与改造,实现方式简洁,成本低,具有广阔的应用前景。 The smart home control system disclosed by the present invention is integrated in the wiring socket, realizes the communication with the remote user through the GSM module, and analyzes the received short message through the MCU, and controls the on-off of the relay according to the short message, Realize the control of household equipment. In this process, there is no need to redesign and remodel the household equipment, the implementation method is simple, the cost is low, and it has broad application prospects.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。 Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。 Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。 In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。 The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,RandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。 If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disk or optical disk, and other media that can store program codes.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。 The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310150829.5A CN103235584B (en) | 2013-04-26 | 2013-04-26 | Smart home control method, device, MCU and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310150829.5A CN103235584B (en) | 2013-04-26 | 2013-04-26 | Smart home control method, device, MCU and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103235584A CN103235584A (en) | 2013-08-07 |
| CN103235584B true CN103235584B (en) | 2016-02-10 |
Family
ID=48883630
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310150829.5A Active CN103235584B (en) | 2013-04-26 | 2013-04-26 | Smart home control method, device, MCU and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103235584B (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105988373A (en) * | 2016-07-17 | 2016-10-05 | 太原科技大学 | Bluetooth intelligent home power supply management system on Android APP and control method thereof |
| CN106646021B (en) * | 2016-10-19 | 2019-09-20 | 青岛海信移动通信技术股份有限公司 | A kind of Kato detection method and device |
| CN108900940B (en) * | 2018-06-21 | 2020-06-16 | 珠海市杰理科技股份有限公司 | Audio input circuit of direct coupling MCU direct push earphone |
| CN110597205B (en) * | 2019-09-16 | 2023-02-03 | 上海庆科信息技术有限公司 | Control method and device of intelligent power strip, processor and intelligent power strip |
| CN113391559A (en) * | 2021-06-30 | 2021-09-14 | 青岛海信智慧生活科技股份有限公司 | Smart home equipment control method and terminal equipment |
| CN114719396B (en) * | 2022-03-17 | 2024-12-24 | 北京小米移动软件有限公司 | Air conditioning control method and device |
| CN117555309B (en) * | 2024-01-12 | 2024-03-29 | 北京中航泰瑞电子技术有限公司 | Multi-way switch control optimization method and system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1892719A (en) * | 2005-07-01 | 2007-01-10 | 海尔集团公司 | Method and apparatus for controlling domestic electric appliance using short message |
| CN201307685Y (en) * | 2008-09-26 | 2009-09-09 | 鲁东大学 | Intelligent power socket based on short message service (SMS) control |
| CN101616381A (en) * | 2008-06-23 | 2009-12-30 | 中国移动通信集团重庆有限公司 | A remote control system and method based on short message |
| CN102355644A (en) * | 2011-10-17 | 2012-02-15 | 张光前 | Method based on short message remote control power converter and device |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201021531A (en) * | 2008-11-20 | 2010-06-01 | Wistron Corp | Method and related apparatus for managing short messages in a mobile communication system |
| KR101590915B1 (en) * | 2009-03-18 | 2016-02-02 | 엘지전자 주식회사 | Mobile terminal, communication system and loss mode management method using the same |
-
2013
- 2013-04-26 CN CN201310150829.5A patent/CN103235584B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1892719A (en) * | 2005-07-01 | 2007-01-10 | 海尔集团公司 | Method and apparatus for controlling domestic electric appliance using short message |
| CN101616381A (en) * | 2008-06-23 | 2009-12-30 | 中国移动通信集团重庆有限公司 | A remote control system and method based on short message |
| CN201307685Y (en) * | 2008-09-26 | 2009-09-09 | 鲁东大学 | Intelligent power socket based on short message service (SMS) control |
| CN102355644A (en) * | 2011-10-17 | 2012-02-15 | 张光前 | Method based on short message remote control power converter and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103235584A (en) | 2013-08-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103235584B (en) | Smart home control method, device, MCU and system | |
| CN105471686B (en) | Terminal control method, device and system | |
| Shahriyar et al. | Remote controlling of home appliances using mobile telephony | |
| CN105931330A (en) | Intelligent unlocking method and intelligent lock | |
| CN204719514U (en) | A smart home system capable of conditional control | |
| US20160132029A1 (en) | Method for configuring and controlling smart home products | |
| CN205121192U (en) | Novel intelligent house control system | |
| CN111586105A (en) | Automatic network distribution method for intelligent equipment and intelligent equipment | |
| WO2016169231A1 (en) | Method and system for building steady piconet based on bluetooth | |
| CN103716161B (en) | It is capable of the method and device of smart machine certification in server of remote control | |
| US20210352764A1 (en) | Provisioning a smart device in an existing secure network without using a cloud service | |
| WO2016180091A1 (en) | Network access method and device | |
| WO2021121372A1 (en) | Method for implementing control of wireless passive switch, wireless passive switch, and proxy node | |
| CN110045705B (en) | Intelligent home control method, device and system adopting heterogeneous wireless network | |
| CN105099839A (en) | Intelligent socket and networking method and system, wireless gateway and pairing method | |
| CN103713605A (en) | Intelligent control platform and method | |
| CN104185180A (en) | Method for networking of gateway device and node devices | |
| CN105892298A (en) | Vehicle-mounted terminal, road side device and intelligent home system | |
| CN205332544U (en) | Gas equipment control system | |
| CN105137777A (en) | Pairing method and pairing device for wireless intelligent home equipment | |
| CN104298179B (en) | Smart switch, smart control network and smart control method | |
| CN117351687A (en) | Wireless control system and method | |
| CN103731936A (en) | Sensor gateway device, explicit description generation equipment and method for explicit description generation equipment | |
| CN204631580U (en) | Home wireless monitoring and management system based on ZigBee | |
| KR100550774B1 (en) | Reservation information processing device of mobile home network system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |