文中将zigBee无线传感器网络、MQTr消息代理以及WebSocket技术相结合,设计实现了一个适用于小到家庭大到工业园区的实时远程监测控系统,以减少不必要的电能浪费,同时有效地节省人力物力。系统后台利用ZigBee无线传感器网络采集用电信息;中间层利用MQTr消息代理将采集到的用电信息以消息的格式统一管理,并为用户预留创建新消息的接口,便于系统的扩展;前端采用B/S模式增强其通用性,采用WebSocket技术将Web服务器得到的消息实时地推送到客户端浏览器,提高了系统的实时性。结果表明该系统在可扩展性、通用性、实时性等方面都有所改进。
It combined ZigBee wireless sensor network,MQTr message broker and WebSocket technology together to realize a real-time distant monitoring and controlling system which is suitable for both family and industrial zones. This system can reduce unnecessary waste of electricity and save manpower effectively. The ZigBee wireless sensor network is used to collect the electricity information in the back- ground. Furthermore, the intermediate layer utilizes MQTT message broker to manage the collected information of electricity and reserves a connector for user to create new information so that the system is easy to expand. In addition, the front end enhances the generality through B/S mode and increases the instantaneity by utilizing WebSocket to push the information received by Web server to the client browser. The result shows that this system has improvement in expandability, generality and real-time performance.