DOI:10.16652/j.issn.1004-373x.2025.16.005
中圖分類號:TN929.5-34 文獻標識碼:A 文章編號:1004-373X(2025)16-0025-06
Design of device control scheme based on smart home gateway
XUEYalu’,ZHAOZuoxi1,LIAOZhifeng2,ZHENGLi
Abstract:With thedevelopmentof smarthomes,thecentralcontrol screenhasgradually becomeamust-have device for whole housesmarthomesduetoitsexcellnt interactiveexperiene,playingacentralroleincontrolandinteraction.Inodeto solvethe problemsofcomplex protocoldockingbetweethecentralcontrolscreeandhomedevices,aswellasloweffciencyin UI interactiondevelopment,adynamicloadingoptimizationschemebasedonthecontrolprotocolandinteractiveUIof the centralcontrolscreenisproposed.Inthisscheme,theobjectmodelisusedasthecentertodigitalldescribethefunction propertiesofthecontrolleddevice.Theatributecontrolinstructionofthedeviceobjectmodelandtheconversionof Zigbee wireless protocolarerealizedbymeansofLUAanalyticalscript.UIcontrolandpagelayoutdescriptionfilearedefined,the AndroidNativeandReactNativeframeworkareusedtorealizethedynamicrenderingofuserinteractioninterface.Theatribute mapingrelationship between UIcontrolandobject modelisestablished torealizetheatributechangethattheuser's click actionbehavioristransformedintotheobjectmodel,andtheZigBeecontrolinstructionisexecutedbymeansofLUAsriptto realize thepurposeofdevicecontrol.The testing resultsshowthattheproposedschemecanachievemoreeficientaccessto smart home devices and better interactive experience.
Keywords:whole house intelligence;central control screen;dynamic UI;object model device; LUAscripting language; ReactNativeframework
0 引言
21世紀初國內(nèi)興起智能家居概念[,發(fā)展至今主要分為三個階段:1.0單品智能時代—一單臺設備的智能控制;2.0場景聯(lián)動時代——可以實現(xiàn)有限的聯(lián)動智能;2022年華為正式發(fā)布全屋智能3.0,提出全屋智能解決方案概念,進入3.0全屋智能時代2,市場逐漸擴大,其中智能中控屏的市場增長尤為迅速。
智能中控屏是全屋智能系統(tǒng)的核心部件[3,屬于“云邊端\"結構中的邊緣智能,在靠近子設備的邊緣側(cè)對海量數(shù)據(jù)進行本地處理4,負責設備的集中控制管理。在操作系統(tǒng)方面,鑒于Android系統(tǒng)自身的優(yōu)越性,大多智能家居系統(tǒng)的研究設計首選基于Android系統(tǒng)開發(fā)APP來完成交互控制[5。Android系統(tǒng)本質(zhì)上也是一個不錯的嵌入式軟件開發(fā)平臺,中控屏逐漸選用其作為基礎底層系統(tǒng),但需要根據(jù)全屋智能應用場景進行改造。在設備通信上,通常采用智能家居行業(yè)公認較成熟的ZigBee作為中控屏與子設備之間的通信協(xié)議。但是現(xiàn)階段行業(yè)內(nèi)仍缺乏智能設備統(tǒng)一的標準體系和網(wǎng)絡協(xié)議,需要對于屏端底層系統(tǒng)進行代碼開發(fā)來解析協(xié)議處理數(shù)據(jù)8,同時不同的設備也需要實現(xiàn)不同功能的UI交互界面。所以,對于提供全屋智能解決方案的廠商來說存在以下問題:
1)需要針對不同控制協(xié)議的設備進行開發(fā),開發(fā)工作量與所需接入的子設備數(shù)量呈線性增長關系;
2)基于Android原生XML布局開發(fā)全部UI界面,結構樣式實現(xiàn)不夠靈活且代碼冗余、不易調(diào)整;
3)產(chǎn)品上線后需要發(fā)布整體固件包進行全網(wǎng)推送升級,增加了開發(fā)和測試成本,系統(tǒng)版本難以管理;……