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世紀初國內興起智能家居概念[,發展至今主要分為三個階段:1.0單品智能時代—一單臺設備的智能控制;2.0場景聯動時代——可以實現有限的聯動智能;2022年華為正式發布全屋智能3.0,提出全屋智能解決方案概念,進入3.0全屋智能時代2,市場逐漸擴大,其中智能中控屏的市場增長尤為迅速。
智能中控屏是全屋智能系統的核心部件[3,屬于“云邊端\"結構中的邊緣智能,在靠近子設備的邊緣側對海量數據進行本地處理4,負責設備的集中控制管理。在操作系統方面,鑒于Android系統自身的優越性,大多智能家居系統的研究設計首選基于Android系統開發APP來完成交互控制[5。Android系統本質上也是一個不錯的嵌入式軟件開發平臺,中控屏逐漸選用其作為基礎底層系統,但需要根據全屋智能應用場景進行改造。在設備通信上,通常采用智能家居行業公認較成熟的ZigBee作為中控屏與子設備之間的通信協議。但是現階段行業內仍缺乏智能設備統一的標準體系和網絡協議,需要對于屏端底層系統進行代碼開發來解析協議處理數據8,同時不同的設備也需要實現不同功能的UI交互界面。所以,對于提供全屋智能解決方案的廠商來說存在以下問題:
1)需要針對不同控制協議的設備進行開發,開發工作量與所需接入的子設備數量呈線性增長關系;
2)基于Android原生XML布局開發全部UI界面,結構樣式實現不夠靈活且代碼冗余、不易調整;
3)產品上線后需要發布整體固件包進行全網推送升級,增加了開發和測試成本,系統版本難以管理;……