摘要
智能家居产品的开发中不可避免的会考虑设备网络的接入。接入的方式有很多,然而物联网由于其通信安全、协议规范、内容可读性高,以及平台推广效果好的特点,成为主流的开发方式。又由于物联网产品具有互联互通的特性,使统一调度成为可能,因此智能家居产品可以主动地贴近用户的生活习惯,提升舒适感受。本文从物联网产品的开发入手,讲解了MQTT协议中产品的接入、消息的订阅和发布,以及JSON内容的交互方式,并对属性、事件、服务的功能差异进行分析,提出通过它们如何做好物联网产品的思考。
The development of smart home products will inevitably consider the access of the device network.There are many ways to access,but the Internet of Things has become the mainstream development method due to its communication security,protocol specifications,high readability of content,and good platform promotion effect.And because IoT products have the characteristics of interconnection,unified scheduling is possible,so smart home products can actively close to the user’s living habits and improve comfort.Starting from the development of IoT products,this paper explains the access,subscription and publication of messages in the MQTT protocol,and the interaction mode of JSON content,analyzes the functional differences of attributes,events,and services,and puts forward how to do a good job in IoT products through them.
出处
《日用电器》
2023年第2期69-73,共5页
ELECTRICAL APPLIANCES