CN109471371A - A kind of intelligent home control system based on Zigbee - Google Patents

A kind of intelligent home control system based on Zigbee Download PDF

Info

Publication number
CN109471371A
CN109471371A CN201811613942.1A CN201811613942A CN109471371A CN 109471371 A CN109471371 A CN 109471371A CN 201811613942 A CN201811613942 A CN 201811613942A CN 109471371 A CN109471371 A CN 109471371A
Authority
CN
China
Prior art keywords
control module
control
communication terminal
administrative center
mobile communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811613942.1A
Other languages
Chinese (zh)
Inventor
张玲丽
李雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN201811613942.1A priority Critical patent/CN109471371A/en
Publication of CN109471371A publication Critical patent/CN109471371A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of intelligent home control systems based on Zigbee, include: intelligent radio administrative center, lighting control module, airconditioning control module, curtain control module, home theater control module, security protection control module, Zigbee transceiver module, camera and wireless communication module;Zigbee transceiver module is used to realize the intelligent radio administrative center data communication between lighting control module, airconditioning control module, curtain control module, home theater control module and security protection control module respectively by zigbee communication mode;Camera connects intelligent radio administrative center, for acquiring the image in house;Wireless communication module is used to connect by the way of wireless communication with mobile communication terminal.The present invention has multiple control modules, and control function is complete, and multiple contextual models are provided in intelligent radio administrative center, convenient to use, as soon as a contextual model only need to be selected, can control multiple smart homes simultaneously.

Description

A kind of intelligent home control system based on Zigbee
Technical field
The present invention relates to smart home fields, more specifically to a kind of Intelligent housing system based on Zigbee System.
Background technique
Intelligent domestic is built upon the generation information technologies such as technology of Internet of things, service computing technique, cloud computing technology On the basis of, and these technologies are organically combined, realize the function of intelligent domestic.In user to quality of life, inhabitation Under the new situation, Household informationization inevitably becomes the weight in social informatization process for condition and acquisition of information urgent need Want component part.
Family is the basic unit for constituting society, to realize the informationization of society, should realize the informationization of household first; The informationization of household is only realized, qualified informationized society could be constructed.In recent years, many knowledgeable people recognize The importance of Household information, and consider as an important research and development direction.The realization of Household information is Premised on perfect smart home system, the Informational Trend of domestic environment is irreversible.However, existing smart home Control system system be for when aspect is designed, such as only for lamps and lanterns, only for curtain, without smart home Control system is integrally designed, and single design is unable to satisfy the growth requirement of smart home.
Summary of the invention
The targeted technical problem of the present invention is that in the prior art, single smart home design is unable to satisfy intelligent family The technological deficiency of the growth requirement in residence, the technical solution adopted by the present invention to solve the technical problems are: constructing one kind and be based on The intelligent home control system of Zigbee includes:
Intelligent radio administrative center;
Lighting control module, for carrying out brightness regulation to lamps and lanterns;
Airconditioning control module, for the adjusting to carrying out for warm refrigeration;
Curtain control module, for controlling the folding condition of curtain;
Home theater control module, for controlling the broadcast state and broadcasting content of home theater;
Security protection control module, for the grade for placing deployment to be arranged;
Zigbee transceiver module is separately connected intelligent radio administrative center, lighting control module, airconditioning control module, window Curtain control module, home theater control module and security protection control module, for realizing intelligent nothing by zigbee communication mode Wire management center respectively with lighting control module, airconditioning control module, curtain control module, home theater control module and peace Data communication between anti-control module;
Camera connects intelligent radio administrative center, for acquiring the image in house;
Wireless communication module, for being connect by the way of wireless communication with mobile communication terminal.
In the intelligent home control system of the invention based on Zigbee, the Zigbee transceiver module passes through CC2430 Chip realizes that intelligent radio administrative center is realized by S3C2440 chip based on ARM920T kernel.
Have in the intelligent home control system of the invention based on Zigbee, in the intelligent radio administrative center more Kind of contextual model, under every kind of contextual model, lighting control module, airconditioning control module, curtain control module, home theater control Module and security protection control module control the preset state that corresponding equipment is in a kind of respectively, are in which kind of preset state Update is configured under corresponding contextual model to be connected to intelligent radio administrative center by mobile communication terminal.
In the intelligent home control system of the invention based on Zigbee, pass through the mobile communication terminal and the nothing The communication of line communication module sends unlatching and pass of the control instruction to the realization of intelligent radio administrative center to lamps and lanterns everywhere in house Control is closed, in combination with the correlation function of scene control module, realizes that once touching operation can be realized multi-way light scene Conversion adjusts the brightness of corresponding light in house, to cooperate various contextual models by the dimming function of lighting control module Setting.
In the intelligent home control system of the invention based on Zigbee, pass through the mobile communication terminal and the nothing The communication of line communication module can pass through remote real-time monitoring situation within doors on a mobile communication terminal;When owner leaves home or goes home, It is deployed troops on garrison duty safely by intelligent radio administrative center by the control security protection control module of scenery control and is withdrawn a garrison with safety, or All predeterminable areas in house are carried out by the control security protection control module of scenery control by intelligent radio administrative center Deployment carries out safe deployment to specified region, when region inner sensor of deploying troops on garrison duty detects security risk, intelligent radio management The client that center is installed on the mobile communication terminal, which sends warning notice while controlling security protection control module, issues acousto-optic Alarm, user need to stop the sound-light alarm of intelligent radio administrative center using pre-set password, if client is not opened It opens, then sends short message and multimedia message screenshot to phone number bound in the mobile communication terminal, user is notified to log in as early as possible Alarm is checked or eliminated to client.
In the intelligent home control system of the invention based on Zigbee, the home theater control module is specifically used for Mobile communication terminal control to audio and video player;Mobile communication terminal starting LAN services link in intelligent radio management After the heart, home theater control module can automatic surface sweeping currently whether there is audio and video player to link to intelligent radio administrative center, such as Fruit has, and mobile communication terminal can be connected with audio and video player automatically when starting media control option, to audio-visual broadcasting The function choosing-item of device carries out mobile communication terminal manipulation, meanwhile, the media resource in mobile communication terminal passes through LAN sharing To intelligent radio administrative center, to be played in high-definition audio and video player.
It further include socket control module in the intelligent home control system of the invention based on Zigbee, it is described Zigbee transceiver module is connected between socket control module and intelligent radio administrative center, in intelligent radio administrative center Socket control instruction control under control socket on-off, socket conducting when, can be other equipment power supply, otherwise can not For other equipment power supply;Wherein, there are a variety of contextual models, the mobile communication terminal connects in the intelligent radio administrative center It is connected to the intelligent radio administrative center to be configured contextual model, to preset the socket control instruction of socket or described Socket control instruction derives from the mobile communication terminal.
In the intelligent home control system of the invention based on Zigbee, curtain control module includes three curtain function Can: curtain opening, curtain closure and curtain are stopped in the position that user needs;The control of client in mobile communication terminal Control instruction is sent to intelligent radio administrative center, then intelligent radio administrative center control curtain control module carries out curtain Control, with following buttons in client: releasing the button including curtain, close push button and pause button;Wherein open Or closure is that one click movement rear curtain is automatically continuously completed, until curtain is closed completely or fully opens;In stop A certain position curtain when be connected to open or close order when, still execute to fully opening or closed state.
In the intelligent home control system of the invention based on Zigbee, intelligent radio administrative center is received by Zigbee Send out module to each control module send data application layer data frame structure be comprising field successively are as follows: header, data Length, routing address, device type, sub- device number, order data;Wherein, header indicates the beginning of data message frame, and data are long Degree indicates the byte number of entire data frame, and routing address function is selected routing, based on the different location of network deployment, The routing for selecting link-quality good carries out the transmission of data packet, and device type represents the type of control module, and sub- device number is intelligence The address uniquely distributed by equipment in energy house control system, passes through device type field and sub- device number two are believed Breath, it will be able to determine some equipment in current system;Order data is for encapsulating specific control command.
In the intelligent home control system of the invention based on Zigbee, contextual model includes mode of leaving home and mould of being in Formula;The mobile communication terminal is equipped with client, and client can obtain at regular intervals determines in the mobile communication terminal The location information of position device positioning, and location information and the location information of preset family are compared, if the two is consistent, it is judged as Otherwise home mode is the mode of leaving home, the mobile communication terminal sends contextual model selection instruction according to comparing result and controls Intelligent radio administrative center is in corresponding contextual model, and subsequent not retransmit new transmission contextual model selection instruction straight To when judging that contextual model sends change according to the comparison.
Implement the intelligent home control system of the invention based on Zigbee, has the advantages that the present invention has Multiple control modules, control function is complete, and the present invention is provided with multiple contextual models in intelligent radio administrative center, uses It is convenient and efficient, as soon as a contextual model only need to be selected, it can control multiple smart homes simultaneously.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is the schematic diagram of one embodiment of intelligent home control system based on Zigbee;
Fig. 2 is action diagram of the JNI in Android hierarchical structure;
Fig. 3 is the data structure diagram that JNINativeMethod list item records function name and function pointer in JNI;
Fig. 4 is the partial code figure that SerialPort.java file is created and write under src catalogue;
Fig. 5 is the partial code figure that concrete mode is encapsulated in loaded library;
Fig. 6 is that mobile communication terminal receives intelligent radio administrative center messaging protocol parsing schematic diagram.
Specific embodiment
For a clearer understanding of the technical characteristics, objects and effects of the present invention, now control attached drawing is described in detail A specific embodiment of the invention.
It is the schematic diagram of one embodiment of intelligent home control system based on Zigbee with reference to Fig. 1, Fig. 1.In the present embodiment In, being somebody's turn to do the intelligent home control system based on Zigbee includes:
Intelligent radio administrative center;Intelligent radio administrative center is realized by S3C2440 chip based on ARM920T kernel;
Lighting control module, for carrying out brightness regulation to lamps and lanterns;
Airconditioning control module, for the adjusting to carrying out for warm refrigeration;
Curtain control module, for controlling the folding condition of curtain;
Home theater control module, for controlling the broadcast state and broadcasting content of home theater;
Security protection control module, for the grade for placing deployment to be arranged;
Zigbee transceiver module is separately connected intelligent radio administrative center, lighting control module, airconditioning control module, window Curtain control module, home theater control module and security protection control module, for realizing intelligent nothing by zigbee communication mode Wire management center respectively with lighting control module, airconditioning control module, curtain control module, home theater control module and peace Data communication between anti-control module;Zigbee transceiver module is realized by CC2430 chip;
Camera connects intelligent radio administrative center, and for acquiring the image in house, the image of acquisition can be by following Wireless communication module is sent to mobile communication terminal, and user can check house by the client installed in mobile communication terminal Interior image;
Wireless communication module, for being connect by the way of wireless communication with mobile communication terminal.
There are a variety of contextual models, under every kind of contextual model, lighting control module, air-conditioning control in intelligent radio administrative center Molding block, curtain control module, home theater control module and security protection control module control corresponding equipment respectively and are in one The preset state of kind is to be connected to intelligent radio administrative center right by mobile communication terminal in which kind of preset state Update is configured under the contextual model answered.
It is communicated by the mobile communication terminal with the wireless communication module, sends control instruction to intelligent radio management Center realizes that the open and close to lamps and lanterns everywhere in house control, real in combination with the correlation function of scene control module Now once touching operation can be realized the conversion of multi-way light scene, by the dimming function of lighting control module, adjust house The brightness of interior corresponding light, so that various contextual models be cooperated to be arranged.
It is communicated by the mobile communication terminal with the wireless communication module, it on a mobile communication terminal can be by long-range Monitor situation within doors in real time;When owner leaves home or goes home, pacified by intelligent radio administrative center by the control of scenery control Anti- control module is withdrawn a garrison to be deployed troops on garrison duty safely with safety, or is pacified by intelligent radio administrative center by the control of scenery control Anti- control module carries out deployment to all predeterminable areas in house or carries out safe deployment to specified region, in deployment region When sensor detects security risk, the client that intelligent radio administrative center installs on the mobile communication terminal sends police It accuses notice while controlling security protection control module and issue sound-light alarm, user need to stop intelligent radio using pre-set password The sound-light alarm of administrative center is sent if client is not opened to phone number bound in the mobile communication terminal Short message and multimedia message screenshot notify user to log in client as early as possible and check or eliminate alarm.
The home theater control module is specifically used for controlling the mobile communication terminal of audio and video player;Mobile communication is whole End starting LAN services link to intelligent radio administrative center after, home theater control module can automatic surface sweeping currently whether have Audio and video player links to intelligent radio administrative center, if so, mobile communication terminal is when starting media control option It can be connected automatically with audio and video player, mobile communication terminal manipulation is carried out to the function choosing-item of audio and video player, meanwhile, it is mobile Media resource in communication terminal passes through LAN sharing to intelligent radio administrative center, to broadcast in high-definition audio and video player It puts.
It further include socket control module in the intelligent home control system of the invention based on Zigbee, it is described Zigbee transceiver module is connected between socket control module and intelligent radio administrative center, in intelligent radio administrative center Socket control instruction control under control socket on-off, socket conducting when, can be other equipment power supply, otherwise can not For other equipment power supply;Wherein, there are a variety of contextual models, the mobile communication terminal connects in the intelligent radio administrative center It is connected to the intelligent radio administrative center to be configured contextual model, to preset the socket control instruction of socket or described Socket control instruction derives from the mobile communication terminal.
Curtain control module includes three curtain functions: curtain opening, curtain closure and curtain are in the position that user needs Set stop;The control of client in mobile communication terminal is sent to control instruction to intelligent radio administrative center, then intelligence Wireless management center controls the control that curtain control module carries out curtain, has following buttons: opening including curtain in client Open button, close push button and pause button;Wherein closure or openness are that one click movement rear curtain is automatically continuously completed, Until curtain is closed completely or fully opens;In rest on the curtain of a certain position when be connected to open or close order when, according to It so executes to fully opening or closed state.
Contextual model includes leave home mode and home mode;The mobile communication terminal is equipped with client, and client can be every Every certain time obtain the positioning device in the mobile communication terminal positioning location information, and location information with it is preset The location information comparison of family, if the two is consistent, is judged as home mode, is otherwise the mode of leaving home, the mobile communication terminal Contextual model selection instruction control intelligent radio administrative center, which is sent, according to comparing result is in corresponding contextual model, and after It is continuous not retransmit new transmission contextual model selection instruction until when judging that contextual model sends change according to the comparison.
The transmission format protocol of wireless management terminal
In current smart home various product and system, agreement majority used by network communication part is TCP and UDP. However, TCP and UDP be it is distinguishing, TCP has lasting connection attribute, and UDP does not have connection attribute then, meanwhile, UDP It is a kind of insecure transport protocol.But UDP has the fast feature of transmission speed, and TCP removes the category for having persistence connection Outside property, also has the characteristic based on data stream transmitting.Studies have shown that for each control module involved in smart home, Using ZigBee technology progress information transmission is small with data volume, transmission information is short, use and transmits data volume minority according to reliably Property require low factor, therefore, udp protocol will be more suitable for as logical based on mobile communication terminal intelligent home control system Believe agreement.
Although the development speed of current smart home is very fast, unified data transmission standard is not formed always.It is each Product and system carry out the customed of communication protocol all because of the different function demand of respective system.Applying ZigBee technology When being communicated, as the following table 1 is intelligent radio administrative center to each control module send data application layer data frame knot Structure.Their each fields are described as follows.
1 intelligent radio management center application layer data frame structure of table
Header: being fixed as two byte of 0x66 and 0xAD, indicates the beginning of data message frame;
Data length: indicating the byte number of entire data frame, to order data section the last byte since header 0x Summation;
Routing address: major function is to be selected routing (to need when placing signal repeater, be otherwise intelligent nothing Wire management center), based on the different location of network deployment, the routing for selecting link-quality good carries out the transmission of data packet;
Device type: representing the type of control module, such as 0xF4, indicates intelligent curtain control module;
Sub- device number: this field is by intelligent home control system being uniquely address that equipment is distributed, as long as tool For two information of device type field and sub- device number, we just can determine some equipment in current system.(such as: Order data is sent to bedroom curtain controller XX corresponding to curtain control module 0xF4), it is effectively accurate convenient for control information Control correlation module and equipment;
Order data: encapsulating specific control command, convey the correspondence controlling terminal of corresponding control module receive data it After need to carry out which operation.
It is transmitted based on JNI mobile communication terminal and Zigbee module (transceiver module) data
Mobile communication terminal device based on android system uses Java language for the exploitation of application layer, and it is counted Belong to the bottom of system according to layer and logical layer, identical as the Linux kernel heart, core code is C language.This relates to bilingual Complete the interaction problems of identical function module.Code corresponding to user's operation is realized by Java language, and is completed corresponding Data transfer activity caused by function, which then needs to be converted into C language, to be operated.Conversely, when received data information needs When showing on interface, data code needs to be converted to Java code by C language code.Therefore, Java language and C language to be solved Data transmission problems, it is necessary to use JNI technology.
JNI full name is Java Native Interface, mainly realizes the function that Java is locally called.JNI technology is good Good realizes Java to the interaction problems of other language calls, is able to carry out the flexible calling of such as C, C++ Native language. Meanwhile the C that can also make of JNI technology or C Plus Plus is formed by class libraries to Java language or function is called.JNI exists Effect in Android hierarchical structure is as shown in Figure 2.
There are mainly two types of for the usage mode of JNI technology: mode one, loads JNI library;Mode two registers JNI function. The detailed process of mode one is as follows:
(1) JNI layers of dynamic base load are completed by System.loadLibrary (xxx_jni);
(2) system executes the current command, and makes expansion modification to library name automatically;
(3) when loading JNI layers of dynamic base, relevant specific function --- JNI_ in system meeting auto-call library OnLoader()。
Mode two, i.e. registration JNI function, find the function name of required Native level by two ways;One kind is Using the Javah tool of Java, Java file is compiled as .class class library files by addressee, by .class class library files Analysis generates .h file, and .h file just includes the objective function name converted.Second, JNINativeMethod list item in JNI Function name and function pointer are recorded, specific data structure is as shown in Figure 3:
Wherein:
(1) function name of Name:Java;
(2) Signature: the parameter and return value of function;
(3) fnPtr: the pointer of record Native layer functions.
The communication protocol design of mobile communication terminal intelligent radio administrative center therewith
Mobile communication terminal sends corresponding letter to intelligent radio administrative center immediately after being proved to be successful login The main contents of breath, information are bind request, and information format is as shown in table 2.
2 mobile communication terminal of table requests room information frame format to intelligent radio administrative center
In table 2, frame head is room query mark, and 2529 in ZigBeeID be No. ZigBee of mobile communication terminal.Intelligence After energy wireless management center receives request, all room informations can be fed back to mobile communication terminal device.Wherein, it specifically returns The type of the frame returned is 0x21.Mobile communication terminal, while can be to intelligent nothing in addition to it can select corresponding room The room that user is registered in wire management center, after user selectes room, mobile communication terminal is sent out to intelligent radio administrative center The related registration information of equipment is sent to request, request format is as shown in table 3.
3 mobile communication terminal of table requests registration facility information frame format to intelligent radio administrative center
The association requests that frame head 0x04 representative mobile communication terminal shown in table 3 is sent to intelligent radio administrative center are note Volume solicited message, the content for including in the frame originating point information of return are 0x05.Intelligent radio administrative center receives mobile communication end After holding the solicited message sended over, two motion flows will be executed:
1) transmission request currently will be returned in the relevant information of all devices of intelligent radio administrative center registration Mobile communication terminal device;
2) according to the content of return, home equipment included in content is shown in corresponding mobile communication terminal user On interactive interface.
The fitment being shown on corresponding mobile communication terminal interactive interface all has two kinds of selection form, point It Wei not home equipment configuration and home equipment control.The command format of home equipment control is as shown in table 4.
4 mobile communication terminal of table controls information frame format to intelligent radio administrative center sending device
Intelligent radio administrative center is packaged after receiving above data, forms the data lattice as shown in table 4-4 Formula is accurately sent to equipment belonging to corresponding control module, completes mobile communication terminal to the control flow of home equipment. In table 4,0x06 representative controls a certain household equipment.When intelligent radio administrative center receives what mobile communication terminal was sent After controlling information request, relevant device of control can be requested to execute corresponding control action it, after executing control action, meeting The status information of current device is obtained, and is back to corresponding mobile communication terminal device, is shown to user.At this point, transmitted Status information frame head be 0x07.
Mobile communication terminal is supplied to two kinds of configuration selections of user in terms of the configuration towards the home equipment bound Mode is respectively as follows: pattern configurations and room configuration, and the specific format of configuration order is as shown in table 5 and table 6.
5 mobile communication terminal of table is to intelligent radio administrative center sending device room configuration information frame format
6 mobile communication terminal of table is to intelligent radio administrative center sending device pattern configurations information frame format
In table 5, the configuration information in room where 0x08 describes current device, corresponding is specific room number Code.In table 6, first frame position data 0x10 represents the current configuration mode of relevant device, this value will be configured to correspondence Identifier mode under.It, can be to wireless end after intelligent radio administrative center receives the configuration request of mobile communication terminal End sends room configuration information and pattern configurations information, information frame head are respectively 0x09 and 0x11.Pass through side described above Formula may be implemented according to room configuration and pattern configurations, by mobile communication terminal to corresponding room and equipment wherein included It is controlled accordingly.The related data in the room from mobile communication terminal to intelligent radio administrative center and scheme control that are sent from The format of information is as shown in table 7 and table 8.
7 mobile communication terminal of table sends room to intelligent radio administrative center and controls information frame format
8 mobile communication terminal of table controls information frame format to intelligent radio administrative center sending mode
In table 7,0x12, which represents, controls all devices in corresponding group of associated room number, reaches and matches in advance The kilter set.0x14 shown in table 8, representative control all devices inside group corresponding to associative mode number, Reach preconfigured kilter.By the above-mentioned means, disposably achieving the effect that Context-Aware Services.Intelligent radio After administrative center receives these information, all home equipments under associated room or mode will be controlled accordingly, to make These equipment are obtained to achieve the effect that meet the requirements.In addition, intelligent radio administrative center can will own under associated room or mode For the status information feedback of home equipment to mobile communication terminal, corresponding information frame head is 0x13 and 0x15.
The Design of Serial Communication of mobile communication terminal and Zigbee module
In terms of data communication, more common communication mechanism is the communication of serial mode.And the data of ZigBee module are logical Also it is serial port used by letter mechanism, is accessed using C language.However, the Android of mobile communication terminal The realization program of platform application layer is generally adopted by Java language, at this point, program is directly to carry out to corresponding hardware Operation.Here, it is necessary to can realize the operation to hardware by means of JNI.The presence of NDK provides understanding for this problem Certainly scheme.NDK, full name are Native Development Kit, i.e. ecosystem development kit, are issued by Google Android , C language may be implemented, the serial ports of Java language is called, vice versa, to realize so-called serial communication.Serial ports is logical Shown in believing that specific step is as follows:
(1) JNI Interface design realizes Native method using C language;
(2) corresponding dynamic link library is generated;
(3) dynamic link library generated is stored in Android engineering;
(4) it compiles and runs engineering Android and generate .apk file.
It should be noted that needing to complete AndroidNDK exploitation before carrying out the corresponding exploitation of serial data transmission Environment is built;Then, it needs to create corresponding Development Engineering under the exploitation environment and can realize corresponding function.Make After creating an Android engineering with Android NDK, it can divide comprising the file directory of two generations under engineering catalogue file Not are as follows: jni catalogue and src catalogue, wherein jni catalogue is for storing the relevant file of C language;And src catalogue then contains need The Java language associated documents in the C language library to be called.
It realizes that JNI interface calls, needs to create and write under src catalogue SerialPort.java file, crucial generation Code Fig. 4.
Wherein, C language dynamic base is loaded by System.loadLibrary (" serial_port ");All marks The method for having native keyword is nation method;Concrete mode is encapsulated in loaded library.The stream that code specifically executes Journey is as follows:
1) this document will automatically generate corresponding to .class file after saving in Eclipse;
2) by executing javah-classpath.-jni com.home.SerialPort order .class file is compiled It is translated into C header file.
3) C file com_home_SerialPort.c of the same name is created, in this document, realizes corresponding header file All statements and function.
4) Android.mk file is created under jni catalogue, i.e. the Makefile file of local c program, file is mainly interior Hold such as Fig. 5.
On the basis of the above, libjni.so dynamic library file is generated by executing ndk-build order.Executing life Before order, need to store com_home_SerialPort.c and com_home_SerialPort.h file to specified directory (JNI) in catalogue;Then the library file of generation is placed into the correspondence catalogue of Android engineering, by Android engineering text Part is parsed, and corresponding apk file is generated.It realizes that the local of JNI calls, needs two above file to cooperate jointly, will give birth to At dynamic library file and apk file simultaneously be installed in Android platform, application serial communication can be realized.
During actual realization, user's interactive mode of serial communication is realized by button, after trigger button, Corresponding order is sent to serial ports, the serial communication with ZigBee can be completed.
Next, will illustrate how mobile communication terminal parses its information received from intelligent radio administrative center herein. Its specific parsing schematic diagram is as shown in Figure 6.
It will be appreciated from fig. 6 that mobile communication terminal will receive 7 kinds of information.After mobile communication terminal receives these information, it is necessary to These information are parsed, before parsing, need to judge the frame head of information.Frame head is 0x21, shows that information is intelligent radio The response that administrative center requests mobile communication terminal about room unit registration information.At this time, it may be necessary to based on room request letter The frame format of breath is parsed.Room frame format is as shown in table 9.
The received room information frame format of 9 mobile communication terminal of table
Information frame head be 0x05 information, show information be intelligent radio administrative center send about all home equipments Registration information.At this time, it may be necessary to which the frame format based on facility registration information parses these information, the frame format of facility information such as table Shown in 10.Mobile communication terminal can parse and obtain device name according to received facility registration information frame format, will be specific Facility information shown by user interface.
The received facility information frame format of 10 mobile terminal of table
Information frame head is 0x07, and representative has the transmission of intelligent radio administrative center, and characterization information is in the data of equipment state Hold;At this point, system can parse currently received message according to the frame format of the agreement of device status information defined.Equipment shape The frame format of state information is as shown in table 11.Mobile communication terminal parses the current state information of relevant device according to the format, And it will be shown on the interface of mobile communication terminal.
The received device status information frame format of 11 mobile communication terminal of table
Certainly, information frame head be 0x10 and 0x11, show information be intelligent radio administrative center send about room The information of configuration and the information of pattern configurations.At this point, system needs to configure according to the room in intelligent radio administrative center and mould Formula configuration data frame format is parsed, their frame format structure such as table 12
Shown in 13.After the parsing of above-mentioned frame format, mobile communication terminal can show the configuration of relevant room and Pattern configurations information.
The received room configuration information frame format of 12 mobile communication terminal of table
The received pattern configurations information frame format of 13 mobile communication terminal of table
Similarly, information frame head is 0x13 and 0x15, and representing the information has the transmission of intelligent radio administrative center, and
The content of transmission is the related data of room information.At this point, needing after system receives the information according to intelligent radio
Room state and room mode data frame table in administrative center are parsed, corresponding frame format such as 14 He of table 15
It is shown.After the parsing of these frame formats, the related status information and pattern information in room will be shown in movement It is logical
Believe in terminal.
The received room status information frame format of 14 mobile communication terminal of table
The received mode state information frame format of 15 mobile communication terminal of table
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of intelligent home control system based on Zigbee, characterized by comprising:
Intelligent radio administrative center;
Lighting control module, for carrying out brightness regulation to lamps and lanterns;
Airconditioning control module, for the adjusting to carrying out for warm refrigeration;
Curtain control module, for controlling the folding condition of curtain;
Home theater control module, for controlling the broadcast state and broadcasting content of home theater;
Security protection control module, for the grade for placing deployment to be arranged;
Zigbee transceiver module is separately connected intelligent radio administrative center, lighting control module, airconditioning control module, curtain control Molding block, home theater control module and security protection control module, for realizing intelligent radio pipe by zigbee communication mode Reason center respectively with lighting control module, airconditioning control module, curtain control module, home theater control module and security protection control Data communication between molding block;
Camera connects intelligent radio administrative center, for acquiring the image in house;
Wireless communication module, for being connect by the way of wireless communication with mobile communication terminal.
2. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that the Zigbee is received Hair module realizes that intelligent radio administrative center is realized by S3C2440 chip based on ARM920T kernel by CC2430 chip.
3. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that the intelligent radio There are a variety of contextual models in administrative center, under every kind of contextual model, lighting control module, airconditioning control module, curtain control Module, home theater control module and security protection control module control the preset state that corresponding equipment is in a kind of respectively, It which kind of preset state to be that intelligent radio administrative center is connected under corresponding contextual model by mobile communication terminal in It is configured update.
4. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that pass through the movement Communication terminal is communicated with the wireless communication module, is sent control instruction and is realized to intelligent radio administrative center to each in house Locate the open and close control of lamps and lanterns, in combination with the correlation function of scene control module, realization once touches operation can be real The conversion of existing multi-way light scene adjusts the brightness of corresponding light in house by the dimming function of lighting control module, thus Various contextual models are cooperated to be arranged.
5. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that pass through the movement Communication terminal is communicated with the wireless communication module, can pass through remote real-time monitoring situation within doors on a mobile communication terminal;? When owner leaves home or goes home, safety is carried out by the control security protection control module of scenery control by intelligent radio administrative center Deployment is withdrawn a garrison with safety, or passes through the control security protection control module of scenery control in house by intelligent radio administrative center All predeterminable areas carry out deployment or carry out safe deployment to specified region, detect security risk in deployment region inner sensor When, the client that intelligent radio administrative center installs on the mobile communication terminal sends warning notice while controlling security protection control Molding block issues sound-light alarm, and user need to stop the sound-light alarm of intelligent radio administrative center using pre-set password, If client is not opened, short message and multimedia message screenshot are sent to phone number bound in the mobile communication terminal, is led to Know that user logs in client as early as possible and checks or eliminate alarm.
6. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that the home theater Control module is specifically used for controlling the mobile communication terminal of audio and video player;Mobile communication terminal starts LAN services link To intelligent radio administrative center, home theater control module can automatic surface sweeping currently whether there is audio and video player to link to intelligence Wireless management center, if so, mobile communication terminal start media control option when can automatically with audio and video player phase Connection carries out mobile communication terminal manipulation to the function choosing-item of audio and video player, meanwhile, the media resource in mobile communication terminal By LAN sharing to intelligent radio administrative center, to be played in high-definition audio and video player.
7. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that further include socket control Molding block, the Zigbee transceiver module are connected between socket control module and intelligent radio administrative center, in intelligence The on-off that socket is controlled under the control of the socket control instruction at wireless management center can be other equipment in socket conducting Otherwise power supply can not power for other equipment;Wherein, there are a variety of contextual models in the intelligent radio administrative center, it is described Mobile communication terminal is connected to the intelligent radio administrative center and is configured to contextual model, to preset the socket control of socket Instruction or the socket control instruction derive from the mobile communication terminal.
8. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that curtain control module Include three curtain functions: curtain opening, curtain closure and curtain are stopped in the position that user needs;In mobile communication terminal The control of client be sent to control instruction to intelligent radio administrative center, then intelligent radio administrative center controls curtain control Molding block carries out the control of curtain, with following buttons in client: releasing the button including curtain, close push button and pause Button;Wherein closure or openness are that one click movement rear curtain is automatically continuously completed, until curtain is closed completely or completely It opens;In rest on the curtain of a certain position when be connected to open or close order when, still execute to fully opening or be closed State.
9. the intelligent home control system according to claim 1 based on Zigbee, which is characterized in that intelligent radio management Center by Zigbee transceiver module to each control module send data application layer data frame structure be comprising field Successively are as follows: header, data length, routing address, device type, sub- device number, order data;Wherein, header indicates datagram The beginning of literary frame, data length indicate the byte number of entire data frame, and routing address function is selected routing, are based on net The different location of network deployment, the routing for selecting link-quality good carry out the transmission of data packet, and device type represents control module Type, sub- device number pass through device type field by intelligent home control system being uniquely address that equipment is distributed With two information of sub- device number, it will be able to determine some equipment in current system;Order data is for encapsulating specific control System order.
10. the intelligent home control system according to claim 3 based on Zigbee, which is characterized in that contextual model packet Include the mode of leaving home and home mode;The mobile communication terminal is equipped with client, and client can obtain described at regular intervals The location information of positioning device positioning in mobile communication terminal, and location information and the location information of preset family are compared, If the two is consistent, it is judged as home mode, is otherwise the mode of leaving home, the mobile communication terminal sends feelings according to comparing result Scape mode selection command control intelligent radio administrative center is in corresponding contextual model, and subsequent does not retransmit new transmission Contextual model selection instruction is until when judging that contextual model sends change according to the comparison.
CN201811613942.1A 2018-12-27 2018-12-27 A kind of intelligent home control system based on Zigbee Pending CN109471371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811613942.1A CN109471371A (en) 2018-12-27 2018-12-27 A kind of intelligent home control system based on Zigbee

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811613942.1A CN109471371A (en) 2018-12-27 2018-12-27 A kind of intelligent home control system based on Zigbee

Publications (1)

Publication Number Publication Date
CN109471371A true CN109471371A (en) 2019-03-15

Family

ID=65677189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811613942.1A Pending CN109471371A (en) 2018-12-27 2018-12-27 A kind of intelligent home control system based on Zigbee

Country Status (1)

Country Link
CN (1) CN109471371A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412940A (en) * 2016-11-15 2017-02-15 北京小米移动软件有限公司 Method and device for creating wireless local area network, and method and device for accessing network
CN110531628A (en) * 2019-08-12 2019-12-03 南京理工大学 Fully-automatic intelligent household management control system based on Internet of Things
CN110543159A (en) * 2019-09-12 2019-12-06 北京金茂绿建科技有限公司 intelligent household control method, control equipment and storage medium
WO2021239015A1 (en) * 2020-05-26 2021-12-02 云丁网络技术(北京)有限公司 Device control method and system
CN114114933A (en) * 2020-08-31 2022-03-01 Oppo广东移动通信有限公司 Control method, device and equipment of Internet of things equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697247A (en) * 2009-10-23 2010-04-21 安徽久大电子技术有限公司 Communication protocol between concentrator and collectors of low-voltage power carrier meter reading system
CN202178785U (en) * 2011-07-12 2012-03-28 华南理工大学 Intelligent home appliance system based on ZigBee and page generation
CN102591307A (en) * 2012-03-09 2012-07-18 河北省电力研究院 Intelligent home furnishing control system and realization method thereof
CN103581139A (en) * 2012-08-03 2014-02-12 王当当 Encrypted wireless communication protocol
CN105553796A (en) * 2015-12-31 2016-05-04 杭州智蚁科技有限公司 Mobile phone location based smart home control method and system
CN105988370A (en) * 2015-03-04 2016-10-05 周登科 Intelligent home control system and method based on multiple energy sources
CN106288223A (en) * 2016-08-29 2017-01-04 珠海格力电器股份有限公司 The control method of a kind of air-conditioner and device
CN106357487A (en) * 2016-08-24 2017-01-25 珠海格力电器股份有限公司 Method of position-based appliance control and control devices and mobile terminals thereof
CN206649300U (en) * 2017-04-10 2017-11-17 北京维拓时代建筑设计股份有限公司 Wireless intelligent house configures system
WO2018129683A1 (en) * 2017-01-11 2018-07-19 孙丽霞 Voice control smart home system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697247A (en) * 2009-10-23 2010-04-21 安徽久大电子技术有限公司 Communication protocol between concentrator and collectors of low-voltage power carrier meter reading system
CN202178785U (en) * 2011-07-12 2012-03-28 华南理工大学 Intelligent home appliance system based on ZigBee and page generation
CN102591307A (en) * 2012-03-09 2012-07-18 河北省电力研究院 Intelligent home furnishing control system and realization method thereof
CN103581139A (en) * 2012-08-03 2014-02-12 王当当 Encrypted wireless communication protocol
CN105988370A (en) * 2015-03-04 2016-10-05 周登科 Intelligent home control system and method based on multiple energy sources
CN105553796A (en) * 2015-12-31 2016-05-04 杭州智蚁科技有限公司 Mobile phone location based smart home control method and system
CN106357487A (en) * 2016-08-24 2017-01-25 珠海格力电器股份有限公司 Method of position-based appliance control and control devices and mobile terminals thereof
CN106288223A (en) * 2016-08-29 2017-01-04 珠海格力电器股份有限公司 The control method of a kind of air-conditioner and device
WO2018129683A1 (en) * 2017-01-11 2018-07-19 孙丽霞 Voice control smart home system
CN206649300U (en) * 2017-04-10 2017-11-17 北京维拓时代建筑设计股份有限公司 Wireless intelligent house configures system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412940A (en) * 2016-11-15 2017-02-15 北京小米移动软件有限公司 Method and device for creating wireless local area network, and method and device for accessing network
CN106412940B (en) * 2016-11-15 2021-01-26 北京小米移动软件有限公司 Method and device for creating wireless local area subnet and method and device for accessing network
CN110531628A (en) * 2019-08-12 2019-12-03 南京理工大学 Fully-automatic intelligent household management control system based on Internet of Things
CN110543159A (en) * 2019-09-12 2019-12-06 北京金茂绿建科技有限公司 intelligent household control method, control equipment and storage medium
CN110543159B (en) * 2019-09-12 2021-01-26 北京金茂绿建科技有限公司 Intelligent household control method, control equipment and storage medium
WO2021239015A1 (en) * 2020-05-26 2021-12-02 云丁网络技术(北京)有限公司 Device control method and system
CN114114933A (en) * 2020-08-31 2022-03-01 Oppo广东移动通信有限公司 Control method, device and equipment of Internet of things equipment and storage medium
WO2022042258A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Control method and apparatus for internet of things device, and device and storage medium
CN114114933B (en) * 2020-08-31 2024-04-02 Oppo广东移动通信有限公司 Control method, device and equipment of Internet of things equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109471371A (en) A kind of intelligent home control system based on Zigbee
US20190229943A1 (en) System and method for crowdsourcing generalized smart home automation scenes
CN105471686B (en) Terminal control method, device and system
US9258765B1 (en) Chirp networks
US20170255452A1 (en) Device Common Model Interface
CN104852975B (en) Household equipment calling method and device
US10511550B2 (en) Systems and methods for instant messaging
CN108702389A (en) For being remotely controlled IOT(Internet of Things)The framework of equipment
WO2017129014A1 (en) Method and apparatus for controlling internet of things device, and server and mobile device
CN113545009B (en) Scene operation method and device, electronic equipment and computer readable medium
CN108141393A (en) Include the domestic automation system and correlation technique of device subscription pairing
CN112272230A (en) Multi-gateway scene linkage control method
KR20180008548A (en) Method and apparatus for automatic software development for a group of controller-based devices
Papadopoulos et al. A connected home platform and development framework for smart home control applications
TW202042564A (en) Framework for handling sensor data in a smart home system
CN113168334A (en) Data processing method and device, electronic equipment and readable storage medium
CN108366005A (en) The interlock method and device of electric room
CN107948231A (en) Service providing method, system and operating system based on scene
CN108958053A (en) Wechat long-distance monitoring method based on raspberry pie
CN114830080B (en) Data distribution flow configuration method and device, electronic equipment and storage medium
CN108494637A (en) A kind of method of smart home device docking Control4 systems
Hayashi et al. Cooperation between heterogeneous iot devices using ihac hub
CN108156029A (en) Capability of Internet of things integrates and combined system and ability integrates and combined method
CN114830615A (en) Data distribution system and data distribution method
KR101573594B1 (en) Service system and method for providing dynamic mashup service based on service intent

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190315

RJ01 Rejection of invention patent application after publication