技术领域technical field
本发明属于照明控制领域,具体涉及一种DALI智能照明扩展系统及扩展方法,特别涉及一种基于MQTT协议的发布/订阅模型的DALI照明控制系统扩展方法。The invention belongs to the field of lighting control, in particular to a DALI intelligent lighting extension system and an extension method, in particular to a DALI lighting control system extension method based on a publish/subscribe model of the MQTT protocol.
背景技术Background technique
随着信息技术与网络技术的快速发展,照明控制系统更加朝着智能化,便捷化、易操作的方向发展。DALI数字化可寻址调光接口(Digital Addressable LightingInterface)简称DALI,DALI系统以其简洁的布线方式、节点设备的接入与移除操作简单等特点,被广泛的应用在照明控制领域。DALI协议规定,系统最多可接入64个可寻址的控制装置和16个可寻址组以及16种灯光场景。总线上的控制装置通过短地址、组地址或广播地址实现单控、组控及广播控制,并且具有上电功率等级、最大、最小功率等级、调光时间设置及故障查询等功能。With the rapid development of information technology and network technology, the lighting control system is developing in the direction of intelligence, convenience and easy operation. DALI Digital Addressable Lighting Interface (Digital Addressable Lighting Interface) is referred to as DALI. The DALI system is widely used in the field of lighting control due to its simple wiring method and simple operation of connecting and removing node devices. The DALI protocol stipulates that the system can access up to 64 addressable control devices, 16 addressable groups and 16 lighting scenes. The control device on the bus realizes single control, group control and broadcast control through short address, group address or broadcast address, and has functions such as power-on power level, maximum and minimum power level, dimming time setting and fault query.
然而,由于DALI系统最多可接入64个可寻址的控制装置,一方面制约了DALI系统的应用场合,另一方面难以实现对分散的DALI系统的统一管理。因此实现多个DALI系统的组网,对于提高DALI系统容量、扩大系统照明范围、实现DALI系统统一管理具有积极的意义。However, since the DALI system can access up to 64 addressable control devices, on the one hand, the application of the DALI system is restricted, and on the other hand, it is difficult to realize the unified management of the scattered DALI systems. Therefore, realizing the networking of multiple DALI systems is of positive significance for improving the capacity of the DALI system, expanding the lighting range of the system, and realizing the unified management of the DALI system.
发明内容Contents of the invention
针对DALI系统需要组网扩展的需求,结合MQTT协议松耦合通信的特点,提出了一种DALI智能照明扩展系统及扩展方法,完成了对不同区域的DALI系统的组网。Aiming at the requirement of network expansion for DALI system, combined with the characteristics of loosely coupled communication of MQTT protocol, a DALI intelligent lighting expansion system and expansion method are proposed, and the network formation of DALI systems in different regions is completed.
为了实现上述目的,本发明采用的技术方案是:In order to achieve the above object, the technical scheme adopted in the present invention is:
一种DALI智能照明扩展系统,包括APP客户端、云平台、DALI网关、DALI子系统;A DALI intelligent lighting extension system, including an APP client, a cloud platform, a DALI gateway, and a DALI subsystem;
所述的云平台包括MQTT消息代理服务器;Described cloud platform comprises MQTT message proxy server;
所述的DALI子系统为DALI协议的照明控制系统,DALI子系统与DALI网关连接;The DALI subsystem is a lighting control system of the DALI protocol, and the DALI subsystem is connected to the DALI gateway;
所述的DALI网关建立与云平台之间的数据链路与物理层传输通道,用于通过将多个DALI网关接入云平台,建立与云平台中MQTT消息代理服务器之间的连接;Described DALI gateway establishes the data link and the physical layer transmission channel between cloud platform, is used for by a plurality of DALI gateways access cloud platform, establishes the connection between the MQTT message proxy server in the cloud platform;
所述的APP客户端通过MQTT消息代理服务器与多个DALI网关之间建立主题关系,用于和多个处于不同区域的DALI子系统之间的数据传输。The APP client establishes a subject relationship with multiple DALI gateways through the MQTT message proxy server, and is used for data transmission between multiple DALI subsystems in different regions.
作为本发明的进一步改进,所述的APP客户端通过接入DALI总线的DALI网关完成对相应DALI子系统的控制,利用MQTT消息通信实现控制命令的发送以及系统故障信息的推送,并对多个DALI子系统的组网与控制。As a further improvement of the present invention, the APP client completes the control of the corresponding DALI subsystem through the DALI gateway connected to the DALI bus, utilizes MQTT message communication to realize the sending of control commands and the push of system fault information, and multiple Networking and control of DALI subsystem.
作为本发明的进一步改进,所述的DALI网关利用DALI协议实现对DALI子系统的控制和查询,并通过消息代理服务器接收来自APP客户端发布的DALI控制指令消息,用于实现APP客户端到DALI系统的控制;DALI网关定时查询DALI总线上的设备参数及故障信息,并以消息的形式发送到MQTT消息代理服务器,再由MQTT消息代理服务器完成设备参数与故障信息的实时推送。As a further improvement of the present invention, the DALI gateway uses the DALI protocol to realize the control and query of the DALI subsystem, and receives the DALI control instruction message issued by the APP client through the message proxy server, so as to realize the communication between the APP client and the DALI subsystem. System control; the DALI gateway regularly queries the device parameters and fault information on the DALI bus, and sends them to the MQTT message proxy server in the form of messages, and then the MQTT message proxy server completes the real-time push of device parameters and fault information.
作为本发明的进一步改进,所述的DALI网关采用Wi-Fi网络的通信方式建立与云平台之间的数据链路与物理层传输通道。As a further improvement of the present invention, the DALI gateway uses a Wi-Fi network communication method to establish a data link and a physical layer transmission channel with the cloud platform.
作为本发明的进一步改进,所述的DALI子系统包括控制设备和多个控制装置,控制设备通过DALI总线与控制装置连接,用于发送指令信息到DALI总线上以传递用户行为或控制指令;控制装置通过从DALI总线上接收控制设备发送的控制指令,并对控制命令进行解析,实现对LED灯具的控制。As a further improvement of the present invention, the DALI subsystem includes a control device and a plurality of control devices, the control device is connected to the control device through the DALI bus, and is used to send instruction information to the DALI bus to transmit user behavior or control instructions; The device realizes the control of LED lamps by receiving the control commands sent by the control equipment from the DALI bus and analyzing the control commands.
作为本发明的进一步改进,安装了该扩展系统的APP应用程序的手持设备,通过扫描系统的二维码信息,并经过管理员确认后获取该扩展系统的全部或部分管理与控制权限,实现对扩展系统的实时远程管理与控制。As a further improvement of the present invention, the handheld device installed with the APP application program of the extended system obtains all or part of the management and control authority of the extended system by scanning the two-dimensional code information of the system and confirming by the administrator, so as to realize the Real-time remote management and control of extended systems.
一种基于所述的DALI智能照明扩展系统的扩展方法,包括以下步骤:An expansion method based on the DALI intelligent lighting expansion system, comprising the following steps:
通过发布/订阅模型建立APP客户端与多个DALI网关之间的关联关系,将处于不同区域的DALI系统的网关接入云平台,进行多个DALI系统的组网;以MQTT消息代理服务器消息推送的方式,进行APP客户端和DALI网关之间的数据传输。Establish the relationship between the APP client and multiple DALI gateways through the publish/subscribe model, connect the gateways of DALI systems in different regions to the cloud platform, and carry out the networking of multiple DALI systems; use MQTT messages to push messages from proxy servers The way of data transmission between APP client and DALI gateway.
作为本发明的进一步改进,具体包括以下步骤:As a further improvement of the present invention, it specifically includes the following steps:
1)快速组网:APP客户端通过对DALI网关进行配置,使DALI系统快速接入云平台,通过云平台提供的MQTT通信服务,建立DALI网关与MQTT消息代理服务器的连接,APP客户端与多个DALI系统实现组网与通信;1) Fast networking: The APP client can quickly connect the DALI system to the cloud platform by configuring the DALI gateway, and establish a connection between the DALI gateway and the MQTT message proxy server through the MQTT communication service provided by the cloud platform. A DALI system realizes networking and communication;
2)远程控制:用户根据系统的实际需求,对接入扩展系统的DALI网关进行分组配置,利用主题建立APP客户端到DALI网关之间的数据传输通道:2) Remote control: According to the actual needs of the system, the user configures the DALI gateways connected to the extended system in groups, and uses the theme to establish a data transmission channel between the APP client and the DALI gateway:
3)参数查询以及故障推送:APP客户端采用以目标DALI系统单播主题号发布DALI查询指令消息,查询扩展系统中的任意控制装置的设备信息;同时,当系统中的设备发生故障时,DALI网关将故障信息及时发送至云平台MQTT代理服务器,MQTT代理服务器将消息及时推送到APP客户端,进行故障信息的及时报警。3) Parameter query and fault push: the APP client uses the unicast topic number of the target DALI system to issue a DALI query instruction message to query the equipment information of any control device in the extended system; at the same time, when a device in the system fails, the DALI The gateway sends the fault information to the MQTT proxy server of the cloud platform in time, and the MQTT proxy server pushes the message to the APP client in time for timely alarming of the fault information.
作为本发明的进一步改进,APP客户端对DALI网关的控制方式分为以下三种:As a further improvement of the present invention, the control mode of the APP client to the DALI gateway is divided into the following three types:
(1)单播控制方式:DALI网关以其唯一的设备ID标识构建单播主题号,该主题号作为APP客户端到扩展系统中单个DALI子系统的数据传输通道,APP客户端根据该主题号发布MQTT消息,实现对该系统的单播控制;(1) Unicast control mode: The DALI gateway constructs a unicast topic number with its unique device ID. This topic number is used as a data transmission channel from the APP client to a single DALI subsystem in the extended system. The APP client uses the topic number Publish MQTT messages to realize unicast control of the system;
(2)组播控制方式:系统根据用户的自定义分组为每个逻辑分组提供一个分组ID,利用分组ID构造组播主题号,由自定义分组下的DALI网关订阅分组主题号,利用该主题号实现APP客户端对多个DALI系统的组播控制;(2) Multicast control mode: The system provides a group ID for each logical group according to the user-defined group, and uses the group ID to construct a multicast topic number, and the DALI gateway under the custom group subscribes to the group topic number, and uses this topic The number realizes the multicast control of multiple DALI systems by the APP client;
(3)广播控制方式:在扩展系统中构造主题号作为广播通道,扩展系统中的所有的DALI网关默认订阅该主题号,利用该主题号实现APP客户端对整个DALI扩展系统的控制。(3) Broadcast control method: Construct a topic number in the extended system as a broadcast channel, and all DALI gateways in the extended system subscribe to the topic number by default, and use the topic number to realize the control of the entire DALI extended system by the APP client.
作为本发明的进一步改进,根据不同的照明需求,用户将扩展系统中的DALI系统自定义不同的组合,实现扩展系统的单播、组播、广播及场景控制:As a further improvement of the present invention, according to different lighting requirements, users can customize different combinations of DALI systems in the extended system to realize unicast, multicast, broadcast and scene control of the extended system:
(a)单播控制:通过自身ID标识构建单播主题号,实现APP客户端对扩展系统中的DALI系统的一对一控制;(a) Unicast control: Construct a unicast topic number through its own ID to realize one-to-one control of the DALI system in the extended system by the APP client;
(b)组播控制:根据照明现场的需求,用户可以灵活的对扩展系统中的DALI系统进行自定义分组控制;创建自定义分组主题号,通过APP客户端配置该自定义分组中的DALI网关,订阅该分组主题号;APP客户端发布该主题号的MQTT消息将实现对该分组的DALI系统的统一控制;(b) Multicast control: According to the needs of the lighting site, users can flexibly control the DALI system in the extended system by custom group; create a custom group topic number, and configure the DALI gateway in the custom group through the APP client , subscribe to the topic number of the group; the APP client publishes the MQTT message of the topic number to realize the unified control of the DALI system of the group;
(c)广播控制:通过使扩展系统中的各DALI网关订阅广播主题号broadcast,即可实现APP客户端对所有接入扩展系统灯具的统一管理与控制;(c) Broadcast control: By making each DALI gateway in the extended system subscribe to the broadcast topic number broadcast, the unified management and control of all lamps connected to the extended system by the APP client can be realized;
(d)场景控制:APP客户端发布具有单播、组播或广播主题号的场景命令消息,MQTT消息代理服务器根据消息的主题信息,逐一推送到订阅了该主题的DALI网关,实现该主题下的所有DALI系统的场景控制。(d) Scene control: The APP client publishes scene command messages with unicast, multicast or broadcast topic numbers, and the MQTT message proxy server pushes them one by one to the DALI gateways that have subscribed to the topic according to the topic information of the message, so as to realize the Scene control for all DALI systems.
与现有技术相比,本发明的有益效果是:Compared with prior art, the beneficial effect of the present invention is:
本发明的DALI扩展系统通过在原有DALI系统中增加DALI网关,DALI网关作为MQTT客户端接入云平台,利用云平台的MQTT代理服务器,通过主题建立APP客户端与网关之间的MQTT消息通信。MQTT基于主题的发布订阅模型实现了发布者与订阅者之间的空间解耦、时间解耦、同步解耦,将APP客户端和DALI网关作为发布订阅模型的客户端,通过消息主题建立两者之间的关联关系,以MQTT消息代理服务器消息推送的方式,实现APP客户端和DALI网关之间的数据传输。利用MQTT基于主题的发布订阅模型,实现对多个DALI照明控系统的组网,有效解决了DALI系统灯具容量有限,统一管理困难的问题。The DALI extension system of the present invention adds a DALI gateway to the original DALI system, and the DALI gateway connects to the cloud platform as an MQTT client, uses the MQTT proxy server of the cloud platform, and establishes MQTT message communication between the APP client and the gateway through topics. MQTT's topic-based publish-subscribe model realizes space decoupling, time decoupling, and synchronization decoupling between publishers and subscribers. The APP client and DALI gateway are used as clients of the publish-subscribe model, and the two are established through message topics. The relationship between the APP client and the DALI gateway is realized by means of MQTT message proxy server message push. Using the topic-based publish-subscribe model of MQTT, the networking of multiple DALI lighting control systems is realized, which effectively solves the problem of limited lamp capacity and difficult unified management of DALI system.
本发明基于MQTT消息代理协议发布/订阅模型的DALI系统扩展方法,通过发布/订阅模型建立APP客户端与多个DALI网关之间的关联关系,将处于不同区域的DALI系统的网关接入云平台,实现多个DALI系统的组网,从而实现对DALI系统的扩展和统一管理。该扩展方法具有高度的解耦性、组网快速简洁、多用户、多终端等特点,通过对DALI网关进行配置建立APP客户端与DALI系统之间的关联关系,当照明系统的物理空间发生改变时,可以通过对网关进行重新配置,即可快速适应扩展系统对照明控制区域的变化。The present invention is based on the DALI system extension method of the MQTT message agency protocol publish/subscribe model, establishes the association relationship between the APP client and multiple DALI gateways through the publish/subscribe model, and connects the gateways of the DALI system in different regions to the cloud platform , to realize the networking of multiple DALI systems, so as to realize the expansion and unified management of the DALI systems. This extension method has the characteristics of high decoupling, fast and simple networking, multiple users, and multiple terminals. By configuring the DALI gateway to establish the relationship between the APP client and the DALI system, when the physical space of the lighting system changes At this time, the gateway can be reconfigured to quickly adapt to changes in the lighting control area of the expansion system.
附图说明Description of drawings
图1为DALI扩展系统结构示意图。Figure 1 is a schematic diagram of the structure of the DALI expansion system.
图2为DALI扩展系统单播控制示意图。Fig. 2 is a schematic diagram of unicast control of the DALI extended system.
图3为DALI扩展系统组播控制示意图。Fig. 3 is a schematic diagram of multicast control of the DALI extended system.
图4为DALI扩展系统广播控制示意图。Fig. 4 is a schematic diagram of the broadcast control of the DALI extended system.
具体实现方式Specific implementation
为了更加清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
如图1所示,一种DALI智能照明扩展系统,具体是一种基于MQTT协议的发布/订阅模型的DALI照明控制系统。MQTT协议利用基于主题的发布订阅机制实现消息通信,采用客户端/服务器的通信模式。其基本结构由MQTT客户端和MQTT代理服务器组成。MQTT客户端可通过订阅感兴趣的消息主题来接收其它客户端发送的消息。服务器作为MQTT消息传输的中介,接收来自客户端的连接请求以及客户端发布的消息,并根据主题订阅关系将消息推送到相应的客户端。As shown in Figure 1, a DALI intelligent lighting extension system is specifically a DALI lighting control system based on the publish/subscribe model of the MQTT protocol. The MQTT protocol uses a topic-based publish-subscribe mechanism to realize message communication, and adopts a client/server communication mode. Its basic structure consists of MQTT client and MQTT proxy server. MQTT clients can receive messages sent by other clients by subscribing to interested message topics. As the intermediary of MQTT message transmission, the server receives the connection request from the client and the message published by the client, and pushes the message to the corresponding client according to the topic subscription relationship.
DALI扩展系统通过在原有DALI系统中增加DALI网关,DALI网关作为MQTT客户端接入云平台,利用云平台的MQTT代理服务器,通过主题建立APP客户端与网关之间的MQTT消息通信。一方面,DALI网关通过订阅APP客户端发布消息的主题(单播、组播、广播主题),接收来自MQTT消息代理服务器推送的APP客户端的命令消息,实现对DALI扩展系统的单播控制、组播控制、广播控制等多种控制模式。另一方面,APP客户端订阅了系统中所有网关以各自设备ID命名的发布消息的主题号,当DALI网关所属的DALI子系统中出现故障时,网关通过该主题号发布故障信息,即可实现系统故障信息的实时推送。The DALI extension system adds a DALI gateway to the original DALI system. The DALI gateway connects to the cloud platform as an MQTT client, and uses the MQTT proxy server of the cloud platform to establish MQTT message communication between the APP client and the gateway through topics. On the one hand, the DALI gateway receives the command message from the APP client pushed by the MQTT message proxy server by subscribing to the topic (unicast, multicast, broadcast topic) of the message released by the APP client, and realizes the unicast control and group of the DALI extended system. broadcast control, broadcast control and other control modes. On the other hand, the APP client subscribes to the topic number of the message published by all gateways in the system named after their respective device IDs. When a fault occurs in the DALI subsystem to which the DALI gateway belongs, the gateway publishes the fault information through the topic number, which can realize Real-time push of system fault information.
具体地,本发明基于MQTT协议的DALI照明控制系统的扩展方法是基于MQTT发布订阅模型实现DALI系统的扩展组网。具体实现由DALI网关、MQTT消息代理服务器、APP客户端三部分组成。该扩展系统借助云平台提供的MQTT消息代理服务,通过将DALI网关接入云平台,利用MQTT消息通信实现APP客户端控制命令的发送以及系统故障信息的推送,实现APP客户端对多个DALI系统的组网与控制。Specifically, the extension method of the DALI lighting control system based on the MQTT protocol of the present invention is based on the MQTT publish-subscribe model to realize the extended networking of the DALI system. The specific implementation consists of three parts: DALI gateway, MQTT message proxy server, and APP client. With the help of the MQTT message agency service provided by the cloud platform, the extended system connects the DALI gateway to the cloud platform, uses MQTT message communication to realize the sending of APP client control commands and the push of system fault information, and realizes that the APP client can communicate with multiple DALI systems. networking and control.
所述DALI网关和APP客户端均为MQTT客户端,通过MQTT消息代理服务器实现数据交互。一方面,DALI网关通过消息代理服务器接收来自APP客户端发布的DALI控制指令消息,实现APP客户端到DALI系统的控制;另一方面,DALI网关定时查询DALI总线上的设备参数及故障信息,并以消息的形式发送到MQTT消息代理服务器,再由服务器完成设备参数与故障信息的实时推送。Both the DALI gateway and the APP client are MQTT clients, and data interaction is realized through the MQTT message proxy server. On the one hand, the DALI gateway receives the DALI control instruction message issued by the APP client through the message proxy server to realize the control from the APP client to the DALI system; on the other hand, the DALI gateway regularly queries the device parameters and fault information on the DALI bus, and It is sent to the MQTT message proxy server in the form of a message, and then the server completes the real-time push of device parameters and fault information.
所述DALI网关的硬件电路主要包括Wi-Fi模块电路、控制器MCU、DALI通信接口电路、FLASH存储电路以及电源电路等。The hardware circuit of the DALI gateway mainly includes a Wi-Fi module circuit, a controller MCU, a DALI communication interface circuit, a FLASH storage circuit, and a power supply circuit.
所述DALI网关的DALI通信接口电路实现TTL电平信号与DALI总线协议电平信号的转换。The DALI communication interface circuit of the DALI gateway realizes the conversion between the TTL level signal and the DALI bus protocol level signal.
所述DALI网关的Wi-Fi通信模块以无线Wi-Fi通信建立DALI网关与云平台之间数据链路层和物理层的数据传输通道。The Wi-Fi communication module of the DALI gateway uses wireless Wi-Fi communication to establish a data transmission channel of the data link layer and the physical layer between the DALI gateway and the cloud platform.
所述DALI网关的控制器MCU完成DALI协议栈与TCP/IP协议栈的移植、实现MQTT协议与DALI协议的转换、参数存储、信息查询等功能。The controller MCU of the DALI gateway completes the transplantation of the DALI protocol stack and the TCP/IP protocol stack, realizes the conversion between the MQTT protocol and the DALI protocol, parameter storage, information query and other functions.
本发明的一个优选案例中,所述APP客户端是指安装在手持设备(手机、平板电脑)上的应用程序,手持设备作为扩展系统的控制终端,完成网关注册、网关与用户绑定工作,实现网关的云平台接入,通过对接入DALI扩展系统的网关进行配置和管理,实现APP客户端对DALI扩展系统的单播、组播、广播控制,并可根据MQTT消息代理服务器推送的来自DALI网关发送的故障信息进行分析处理,实现故障紧急报警。In a preferred case of the present invention, the APP client refers to the application program installed on the handheld device (mobile phone, tablet computer), and the handheld device is used as the control terminal of the extended system to complete the gateway registration and the binding of the gateway and the user. Realize access to the cloud platform of the gateway. By configuring and managing the gateway connected to the DALI extension system, the APP client can control the unicast, multicast, and broadcast of the DALI extension system. The fault information sent by the DALI gateway is analyzed and processed to realize emergency alarm for faults.
安装了该扩展系统的APP应用程序的手持设备,可通过扫描系统的二维码信息,并经过管理员确认后获取该扩展系统的全部或部分管理与控制权限,实现对扩展系统的实时远程管理与控制。The handheld device installed with the APP application program of the extended system can obtain all or part of the management and control rights of the extended system by scanning the QR code information of the system and confirming by the administrator, so as to realize real-time remote management of the extended system with control.
本发明的一个优选案例中,所述云平台是实现多个DALI系统组网与控制的重要组成部分,它不仅提供丰富的API接口以及各类系统数据存储和处理服务,实现APP客户端和DALI网关的注册、绑定和管理功能,方便多个APP客户端和多个DALI系统的云平台接入;同时为APP客户端和DALI网关提供MQTT消息代理服务,是实现APP客户端对多个DALI系统远程实时控制与管理的桥梁。In a preferred case of the present invention, the cloud platform is an important part to realize the networking and control of multiple DALI systems. It not only provides rich API interfaces and various system data storage and processing services, but also realizes APP client and DALI The registration, binding and management functions of the gateway facilitate the access of multiple APP clients and the cloud platform of multiple DALI systems; at the same time, it provides MQTT message agency services for APP clients and DALI gateways, which is to realize the APP client's communication with multiple DALI systems. A bridge for remote real-time control and management of the system.
本发明的一个优选案例中,所述DALI网关是各DALI系统接入云平台进行统一管理的核心,通过订阅主题完成与云平台的数据交互,又作为DALI系统中挂接在DALI总线上的输入设备完成与DALI设备的(控制装置和控制设备)通信,从而实现APP客户端对DALI系统的控制管理、DALI网关对系统故障的查询和反馈。In a preferred case of the present invention, the DALI gateway is the core of each DALI system connected to the cloud platform for unified management, completes data interaction with the cloud platform by subscribing to topics, and serves as an input connected to the DALI bus in the DALI system The device completes the communication with the DALI device (control device and control device), so as to realize the control and management of the DALI system by the APP client, and the query and feedback of the system failure by the DALI gateway.
以下结合附图和具体实施例对本发明的结构原理,工作原理作进一步说明。The structural principle and working principle of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
参照附图1,基于MQTT协议的DALI扩展系统由APP客户端、云平台、DALI网关、DALI子系统组成。APP客户端作为DALI扩展系统的控制端,具有用户注册、DALI网关设备管理、系统控制、故障监测等模块;云平台作为扩展系统的数据存储与转发枢纽,包含API接口、用户设备管理、数据存储以及MQTT通信服务等模块;DALI网关作为扩展系统的核心,通过主题建立APP客户端与网关之间数据传输的通道,利用DALI协议实现对子系统的控制和查询;DALI子系统为DALI扩展系统的基本组成单元,是符合标准DALI协议的照明控制系统。本发明主要实现以下功能:Referring to accompanying drawing 1, the DALI extension system based on the MQTT protocol is composed of an APP client, a cloud platform, a DALI gateway, and a DALI subsystem. As the control terminal of the DALI extension system, the APP client has modules such as user registration, DALI gateway device management, system control, and fault monitoring; the cloud platform, as the data storage and forwarding hub of the extension system, includes API interfaces, user device management, and data storage And MQTT communication service and other modules; DALI gateway is the core of the extended system, establishes the data transmission channel between the APP client and the gateway through the theme, and uses the DALI protocol to realize the control and query of the subsystem; the DALI subsystem is the DALI extended system The basic component is a lighting control system that conforms to the standard DALI protocol. The present invention mainly realizes following functions:
(1)快速组网功能。APP客户端通过对DALI网关进行配置,实现DALI系统快速接入云平台,通过云平台提供的MQTT通信服务,建立网关与MQTT消息代理服务器的连接,实现APP客户端与多个DALI系统的组网与通信功能。(1) Fast networking function. The APP client can quickly connect the DALI system to the cloud platform by configuring the DALI gateway, and establish a connection between the gateway and the MQTT message proxy server through the MQTT communication service provided by the cloud platform to realize the networking between the APP client and multiple DALI systems and communication functions.
(2)远程控制功能。用户根据系统的实际需求,对接入扩展系统的DALI网关进行分组配置,利用单播主题、组播主题、广播主题建立APP客户端到DALI网关之间单播控制、组播控制、广播控制的数据传输通道。(2) Remote control function. According to the actual needs of the system, the user configures the DALI gateways connected to the extended system in groups, and uses unicast topics, multicast topics, and broadcast topics to establish unicast control, multicast control, and broadcast control between the APP client and the DALI gateway. Data transmission channel.
(3)参数查询以及故障推送功能。APP客户端采用以目标DALI系统单播主题号发布DALI查询指令消息,查询扩展系统中的任意控制装置的设备信息;同时,当系统中的设备发生故障时,DALI网关将故障信息及时发送至云平台MQTT代理服务器,服务器将消息及时推送到APP客户端,实现故障信息的及时报警。(3) Parameter query and fault push function. The APP client uses the unicast topic number of the target DALI system to issue DALI query command messages to query the device information of any control device in the extended system; at the same time, when a device in the system fails, the DALI gateway sends the fault information to the cloud in time The platform MQTT proxy server, the server pushes the message to the APP client in time to realize the timely alarm of the fault information.
(4)授权管理功能。管理员可以通过授权的方式,对安装该应用程序的手持设备(手机或平板电脑)进行授权管理,使其具有该扩展系统的全部或部分权限,实现对扩展系统的控制。(4) Authorization management function. The administrator can authorize and manage the handheld device (mobile phone or tablet) where the application is installed, so that it has all or part of the authority of the extended system and realizes the control of the extended system.
参照附图2-4,本发明中,根据接入扩展系统中的DALI网关订阅的主题类型,将扩展系统中APP客户端对DALI网关的控制方式分为以下三种:Referring to accompanying drawings 2-4, in the present invention, according to the topic type subscribed by the DALI gateway in the access extension system, the control mode of the APP client in the extension system to the DALI gateway is divided into the following three types:
(1)单播控制方式。参照附图2,DALI网关以其唯一的设备ID标识构建单播主题号,该主题号作为APP客户端到扩展系统中单个DALI子系统的数据传输通道,APP客户端根据该主题号发布MQTT消息,实现对该系统的单播控制。(1) Unicast control mode. Referring to Figure 2, the DALI gateway constructs a unicast topic number with its unique device ID, and the topic number serves as a data transmission channel from the APP client to a single DALI subsystem in the extended system, and the APP client issues an MQTT message based on the topic number , to achieve unicast control of the system.
例如,网关DALI#1、DALI#2分别订阅由自身设备ID创建的单播主题号<D1>/a2d、<D2>/a2d,APP客户端发送<D1>/a2d主题号的消息时,将实现对DALI#1系统的控制。对于扩展系统中的其他DALI子系统将不会接收到MQTT消息代理服务器推送的<D1>/a2d主题号的消息。For example, gateways DALI#1 and DALI#2 respectively subscribe to the unicast topic numbers <D1>/a2d and <D2>/a2d created by their own device IDs. Realize the control of DALI#1 system. For other DALI subsystems in the extended system, they will not receive the message of <D1>/a2d topic number pushed by the MQTT message broker server.
(2)组播控制方式。参照附图3,本发明中,扩展系统可根据用户的自定义分组为每个逻辑分组提供一个分组ID,利用分组ID构造组播主题号,由自定义分组下的DALI网关订阅分组主题号,利用该主题号实现APP客户端对多个DALI系统的组播控制。(2) Multicast control mode. With reference to accompanying drawing 3, in the present invention, expansion system can provide a group ID for each logical group according to user's self-defined grouping, utilize group ID to construct multicast topic number, subscribe group topic number by the DALI gateway under the self-defined group, Use the topic number to realize the multicast control of multiple DALI systems by the APP client.
例如,将扩展系统中的网关DALI#1、DALI#2自定义为一个分组,DALI#1、DALI#2订阅同一组主题号<G1>/a2d,APP客户端以该组主题号发布MQTT消息,实现对扩展系统中DALI#1、DALI#2系统的组播控制。For example, customize the gateways DALI#1 and DALI#2 in the extended system as a group, DALI#1 and DALI#2 subscribe to the same group topic number <G1>/a2d, and the APP client publishes MQTT messages with this group topic number , to realize the multicast control of DALI#1 and DALI#2 systems in the extended system.
本发明中的DALI系统可以根据照明需求,对DALI子系统实现种不同的自定义分组,n为接入扩展系统的DALI网关的数量,对于每一个自定义分组都有16个场景,对于分组内的DALI灯具,一共可以分为个DALI灯具的分组。The DALI system in the present invention can realize the DALI subsystem according to lighting requirements There are different custom groups, n is the number of DALI gateways connected to the extended system, there are 16 scenes for each custom group, and the DALI lamps in the group can be divided into Grouping of DALI fixtures.
(3)广播控制方式。参照附图4,在扩展系统中构造(broadcast)主题号作为广播通道,扩展系统中的所有的DALI网关默认订阅该主题号,利用该主题号实现APP客户端对整个DALI扩展系统的控制。例如,DALI#1、DALI#2、DALI#3、DALI#4订阅广播主题号broadcast,实现APP客户端对扩展系统的广播控制。(3) Broadcast control mode. Referring to accompanying drawing 4, construct (broadcast) topic number as broadcasting channel in extension system, all DALI gateways in extension system subscribe this topic number by default, utilize this topic number to realize the control of APP client to whole DALI extension system. For example, DALI#1, DALI#2, DALI#3, and DALI#4 subscribe to the broadcast topic number broadcast to realize the broadcast control of the extended system by the APP client.
MQTT基于主题的发布订阅模型实现了发布者与订阅者之间的空间解耦、时间解耦、同步解耦,将APP客户端和DALI网关作为发布订阅模型的客户端,通过消息主题建立两者之间的关联关系,以MQTT消息代理服务器消息推送的方式,实现APP客户端和DALI网关之间的数据传输。MQTT's topic-based publish-subscribe model realizes space decoupling, time decoupling, and synchronization decoupling between publishers and subscribers. The APP client and DALI gateway are used as clients of the publish-subscribe model, and the two are established through message topics. The relationship between the APP client and the DALI gateway is realized by means of MQTT message proxy server message push.
该方法的特点在于DALI网关与APP客户端之间不用建立直接的TCP连接,解决了以下问题。The feature of this method is that there is no need to establish a direct TCP connection between the DALI gateway and the APP client, which solves the following problems.
(1)在同一个局域网内,APP客户端通过IP地址访问DALI网关,而IP地址的动态分配特性,无法保证在不确定的网络环境下能稳定、快速、有效的进行数据通信。为了能够在动态变化的局域网环境下实现对DALI网关的访问,必将带来大量繁琐的配置,导致扩展系统适用性差、缺乏便利性等问题。(1) In the same local area network, the APP client accesses the DALI gateway through the IP address, but the dynamic allocation of the IP address cannot guarantee stable, fast and effective data communication in an uncertain network environment. In order to realize access to the DALI gateway in a dynamically changing LAN environment, it will inevitably bring a lot of cumbersome configurations, resulting in problems such as poor applicability and lack of convenience of the extended system.
(2)对处于不同局域网内的DALI系统存在内网穿透问题,在没有人工路由配置以帮助建立外网对内网的访问路径的前提下,局域网外部的网络节点无法访问局域网内部的网络节点。(2) There is an intranet penetration problem for DALI systems in different LANs. Without manual routing configuration to help establish an access path from the external network to the internal network, the network nodes outside the LAN cannot access the network nodes inside the LAN. .
(3)对于多个DALI系统的自定义组合控制,可以采用组播UDP和广播UDP等方案来实现。组播UDP的配置复杂繁琐,广播UDP则会带来大量的无效数据,需要DALI网关利用数据过滤机制过滤无效数据,但这依旧无法解决大量无效数据的网络带宽占用问题,也对DALI网关的网络处理能力提出了更高的要求。(3) For the self-defined combined control of multiple DALI systems, multicast UDP and broadcast UDP can be used to realize. The configuration of multicast UDP is complex and cumbersome, and broadcasting UDP will bring a large amount of invalid data, which requires the DALI gateway to use the data filtering mechanism to filter invalid data, but this still cannot solve the problem of network bandwidth occupation of a large amount of invalid data, and also affects the network of the DALI gateway Processing power puts higher demands on it.
采用MQTT发布/订阅的方式有利于实现不同区域的多个DALI系统的组网,解决了上述问题,实现了应用程序与发布者和订阅者之间的松耦合性。The use of MQTT publish/subscribe is conducive to the realization of the networking of multiple DALI systems in different regions, which solves the above problems and realizes the loose coupling between the application program and the publisher and subscriber.
根据不同的照明需求,用户可以将扩展系统中的DALI系统自定义不同的组合,实现扩展系统的单播、组播、广播及场景控制。According to different lighting requirements, users can customize different combinations of the DALI system in the extended system to realize unicast, multicast, broadcast and scene control of the extended system.
(1)所述扩展系统的单播控制:(1) Unicast control of the extended system:
由于每个DALI网关都具有唯一的ID标识,通过自身ID标识构建单播主题号,实现APP客户端对扩展系统中的DALI系统的一对一控制。Since each DALI gateway has a unique ID, the unicast topic number is constructed through its own ID to realize the one-to-one control of the APP client on the DALI system in the extended system.
(2)所述扩展系统的组播控制:(2) Multicast control of the extended system:
根据照明现场的需求,用户可以灵活的对扩展系统中的DALI系统进行自定义分组控制,即组播控制。创建自定义分组主题号,通过APP客户端配置该自定义分组中的DALI网关,即订阅该分组主题号。APP客户端发布该主题号的MQTT消息将实现对该分组的DALI系统的统一控制。According to the needs of the lighting site, users can flexibly control the DALI system in the extended system by custom grouping, that is, multicast control. Create a custom group topic number, configure the DALI gateway in the custom group through the APP client, that is, subscribe to the group topic number. The APP client publishes the MQTT message of the topic number to realize the unified control of the DALI system of the group.
(3)所述扩展系统的广播控制:(3) Broadcast control of the extended system:
为了实现对扩展系统中灯具的统一控制,通过使扩展系统中的各DALI网关订阅广播主题号broadcast,即可实现APP客户端对所有接入扩展系统灯具的统一管理与控制。In order to realize the unified control of the lamps in the extended system, by making each DALI gateway in the extended system subscribe to the broadcast topic number broadcast, the APP client can realize the unified management and control of all the lamps connected to the extended system.
(4)所述扩展系统的场景控制:(4) Scene control of the extended system:
对于单播、组播或广播模式下的场景控制,即APP客户端发布具有单播、组播或广播主题号的场景命令消息,MQTT消息代理服务器根据消息的主题信息,逐一推送到订阅了该主题的DALI网关,实现该主题下的所有DALI系统的场景控制。For scene control in unicast, multicast or broadcast mode, that is, the APP client publishes scene command messages with unicast, multicast or broadcast topic numbers, and the MQTT message proxy server pushes them one by one according to the topic information of the messages to the subscribed The theme's DALI gateway realizes the scene control of all DALI systems under the theme.
以上,仅为本发明的较佳实施例,并非仅限于本发明的实施范围,凡依本发明范围的内容所做的等效变化和修饰,都应为本发明的技术范畴。The above are only preferred embodiments of the present invention, and are not limited to the implementation scope of the present invention. All equivalent changes and modifications made according to the scope of the present invention shall fall within the technical scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710577149.XACN107360030A (en) | 2017-07-14 | 2017-07-14 | A kind of DALI intelligent lightings extension system and extended method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710577149.XACN107360030A (en) | 2017-07-14 | 2017-07-14 | A kind of DALI intelligent lightings extension system and extended method |
| Publication Number | Publication Date |
|---|---|
| CN107360030Atrue CN107360030A (en) | 2017-11-17 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710577149.XAPendingCN107360030A (en) | 2017-07-14 | 2017-07-14 | A kind of DALI intelligent lightings extension system and extended method |
| Country | Link |
|---|---|
| CN (1) | CN107360030A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108449432A (en)* | 2018-05-07 | 2018-08-24 | 苏州德姆斯信息技术有限公司 | Internet of Things Remote Device Control system and control method |
| CN109884506A (en)* | 2019-03-20 | 2019-06-14 | 浙江创意声光电科技有限公司 | Test method and system for lighting circuits |
| CN110351938A (en)* | 2019-07-31 | 2019-10-18 | 安徽正风建设工程有限公司 | A kind of science and technology museum light monitoring system |
| CN110365587A (en)* | 2018-03-26 | 2019-10-22 | 阿里巴巴集团控股有限公司 | Communication between devices method, apparatus, equipment and storage medium |
| CN111158724A (en)* | 2019-12-30 | 2020-05-15 | 深圳茂硕电子科技有限公司 | DALI bus-based software automatic upgrading method and system |
| CN111183619A (en)* | 2017-12-28 | 2020-05-19 | 西门子股份公司 | Message queue telemetry transmission MQTT data transmission method, device and system |
| CN111953777A (en)* | 2020-08-12 | 2020-11-17 | 北京泊菲莱科技有限公司 | Internet of things platform access equipment management system |
| CN112039976A (en)* | 2020-08-26 | 2020-12-04 | 中国电力科学研究院有限公司 | Microsystem information interaction system for user's intelligent energy consumption management and its establishment method, equipment and storage medium |
| CN112351091A (en)* | 2020-10-30 | 2021-02-09 | 无锡路通视信网络股份有限公司 | MQTT-based audio publishing method, device and system |
| CN113099499A (en)* | 2017-12-15 | 2021-07-09 | 深圳市大疆创新科技有限公司 | Wireless communication method, device and system |
| CN113641139A (en)* | 2021-08-05 | 2021-11-12 | 珠海格力电器股份有限公司 | System, controller, control system, and storage medium capable of realizing asynchronous programming |
| CN113810495A (en)* | 2021-09-17 | 2021-12-17 | 深圳市合信自动化技术有限公司 | A building controller supporting MQTT and its communication method |
| CN114599138A (en)* | 2022-05-09 | 2022-06-07 | 杭州雅观科技有限公司 | Intelligent lighting method for controlling electric lamp group |
| TWI768805B (en)* | 2021-04-01 | 2022-06-21 | 國立勤益科技大學 | Node control system of IoT architecture |
| CN114979097A (en)* | 2021-06-03 | 2022-08-30 | 中移互联网有限公司 | MQTT-based message pushing method and device and electronic equipment |
| CN115190147A (en)* | 2022-06-29 | 2022-10-14 | 北京奕斯伟计算技术股份有限公司 | Intelligent equipment control method, device and system |
| CN115720193A (en)* | 2022-11-09 | 2023-02-28 | 中科方德软件有限公司 | Multicast-based software deployment method and device |
| CN116208662A (en)* | 2023-01-07 | 2023-06-02 | 广州炫视智能科技有限公司 | A device management centralized control method and system thereof |
| Title |
|---|
| 张玉杰: "基于DALI协议的多传感器控制设备设计", 《电子技术应用》* |
| 张玉杰: "基于互联网+的电力载波路灯照明系统设计", 《电子器件》* |
| 张玉杰: "基于蓝牙与MQTT服务器的DALI智能照明系统设计", 《陕西科技大学学报》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113099499A (en)* | 2017-12-15 | 2021-07-09 | 深圳市大疆创新科技有限公司 | Wireless communication method, device and system |
| CN111183619A (en)* | 2017-12-28 | 2020-05-19 | 西门子股份公司 | Message queue telemetry transmission MQTT data transmission method, device and system |
| CN110365587A (en)* | 2018-03-26 | 2019-10-22 | 阿里巴巴集团控股有限公司 | Communication between devices method, apparatus, equipment and storage medium |
| CN110365587B (en)* | 2018-03-26 | 2022-04-19 | 阿里巴巴集团控股有限公司 | Inter-device communication method, device and storage medium |
| CN108449432A (en)* | 2018-05-07 | 2018-08-24 | 苏州德姆斯信息技术有限公司 | Internet of Things Remote Device Control system and control method |
| CN109884506A (en)* | 2019-03-20 | 2019-06-14 | 浙江创意声光电科技有限公司 | Test method and system for lighting circuits |
| CN110351938A (en)* | 2019-07-31 | 2019-10-18 | 安徽正风建设工程有限公司 | A kind of science and technology museum light monitoring system |
| CN111158724A (en)* | 2019-12-30 | 2020-05-15 | 深圳茂硕电子科技有限公司 | DALI bus-based software automatic upgrading method and system |
| CN111158724B (en)* | 2019-12-30 | 2023-05-05 | 深圳茂硕电子科技有限公司 | Automatic software upgrading method and system based on DALI bus |
| CN111953777A (en)* | 2020-08-12 | 2020-11-17 | 北京泊菲莱科技有限公司 | Internet of things platform access equipment management system |
| CN111953777B (en)* | 2020-08-12 | 2022-10-25 | 北京泊菲莱科技有限公司 | Internet of things platform access equipment management system |
| CN112039976A (en)* | 2020-08-26 | 2020-12-04 | 中国电力科学研究院有限公司 | Microsystem information interaction system for user's intelligent energy consumption management and its establishment method, equipment and storage medium |
| CN112351091A (en)* | 2020-10-30 | 2021-02-09 | 无锡路通视信网络股份有限公司 | MQTT-based audio publishing method, device and system |
| TWI768805B (en)* | 2021-04-01 | 2022-06-21 | 國立勤益科技大學 | Node control system of IoT architecture |
| CN114979097A (en)* | 2021-06-03 | 2022-08-30 | 中移互联网有限公司 | MQTT-based message pushing method and device and electronic equipment |
| CN114979097B (en)* | 2021-06-03 | 2023-07-21 | 中移互联网有限公司 | Message pushing method and device based on MQTT and electronic equipment |
| CN113641139A (en)* | 2021-08-05 | 2021-11-12 | 珠海格力电器股份有限公司 | System, controller, control system, and storage medium capable of realizing asynchronous programming |
| CN113810495A (en)* | 2021-09-17 | 2021-12-17 | 深圳市合信自动化技术有限公司 | A building controller supporting MQTT and its communication method |
| CN114599138A (en)* | 2022-05-09 | 2022-06-07 | 杭州雅观科技有限公司 | Intelligent lighting method for controlling electric lamp group |
| CN115190147A (en)* | 2022-06-29 | 2022-10-14 | 北京奕斯伟计算技术股份有限公司 | Intelligent equipment control method, device and system |
| CN115190147B (en)* | 2022-06-29 | 2024-03-22 | 北京奕斯伟计算技术股份有限公司 | An intelligent equipment control method, device and system |
| CN115720193A (en)* | 2022-11-09 | 2023-02-28 | 中科方德软件有限公司 | Multicast-based software deployment method and device |
| CN116208662A (en)* | 2023-01-07 | 2023-06-02 | 广州炫视智能科技有限公司 | A device management centralized control method and system thereof |
| Publication | Publication Date | Title |
|---|---|---|
| CN107360030A (en) | A kind of DALI intelligent lightings extension system and extended method | |
| CN110324165B (en) | Network equipment management method, device and system | |
| RU2645280C1 (en) | Method of multi-address broadcasting, apparatus and system for program-configurable network | |
| EP3526929A2 (en) | Enabling multicast for service layer group operation | |
| WO2022262465A1 (en) | Opc ua-based centralized user configuration method and system for time sensitive network | |
| CN104518973B (en) | A method of reliable multicast transmission of data based on SDN environment | |
| CN106302616A (en) | Network wake-up method, remote server and the network switching equipment | |
| CA2897118A1 (en) | System and method for providing p2p based reconfigurable computing and structured data distribution | |
| CN107370792A (en) | A DALI extension system and control method | |
| CN105656653A (en) | Network access method of newly added node in distributed coordination system, device and system | |
| TWI740210B (en) | Method for terminal device management and server | |
| CN115378822B (en) | A method and system for DDS distributed application simulation | |
| CN101951325A (en) | Network terminal configuration system based on automatic discovery and configuration method thereof | |
| CN106357542B (en) | Method for providing multicast service and software-defined network controller | |
| CN112769602B (en) | System and method for unified configuration management of white box switch and network operating system | |
| CN114189438B (en) | Industrial equipment automatic discovery and configuration method based on OPC UA | |
| WO2014180234A1 (en) | Virtual desktop reproducing and pushing method and device, and virtual desktop system | |
| CN115314571A (en) | Cloud protocol gateway implementation method and system supporting heterogeneous device access | |
| CN116600330A (en) | HUB hierarchical topology management method and device based on NETCONF protocol | |
| CN105635222A (en) | Cloud terminal upgrading method and system, network management server and proxy server | |
| CN111669333B (en) | Data transmission method, device, computing device and storage medium | |
| WO2025073205A1 (en) | Data stream scheduling method of audio and video network, storage medium, and electronic device | |
| CN115943616B (en) | Attribute subscription method, device and equipment for Zigbee equipment | |
| CN100505645C (en) | Method for Detecting the Status of Devices in the Network | |
| CN107172582B (en) | M2M communication equipment and method based on NodeJS |
| 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:20171117 | |
| RJ01 | Rejection of invention patent application after publication |