Normagrup Tutorial: Connecting Normagrup gateways and their DAIL gateways
Basic architecture
The Normagrup plugin establishes a UDP connection to one or multiple Normagrup gateways. Using this connection, it is possible to interact with the DALI devices that are connected to the different gateways.
To communicate to the gateways, the API library IDNG_64 from Normagrup is used.
Integration steps
After installing the plugin, a new menu under the Modules menu will be added. Within this menu, the general driver settings can be defined and the different gateways can be configured.
Driver configuration
Here, general settings like connection timeout and ping interval can be set. For more information see Normagrup configuration .
Adding a gateway
Open Modules > Normagrup > Gateway Definitions and add a new gateway definition. The name is mandatory and identifies the gateways with the NETx Server. Together with an optional path, it must be unique. In the column IP Address, the IP address of the gateway must be specified. All other parameters are optional.
Here is an example of a simple gateway definition:
For more information see Normagrup gateway definitions .
Testing the connection
After restarting the NETx Server, the item tree shows the data point of the Noramgrup interface within the sub-tree NETx\XIO\Normagrup.
After server start-up, the Core Server tries to connect to the different Normagrup gateways using the following workflow: First it sends a ping request to the gateway. If the request is successful, the server reads the current model and firmware version. Afterwards, it reads the device list in order to know which DALI devices are connected to the gateway. If this connection procedure is successful, the gateway item is set to true and the status it is set 0. If the connection was not successful, the gateway item is set to false and the status item shows the error reason.
Status | Description |
|---|---|
0 | The connection was successful. |
1 | The device did not respond within the expected time. |
2 | An error occurred while sending data. |
3 | An invalid argument was passed to a method. |
4 | The operation attempted is invalid in the current context. |
5 | A generic catch-all for other errors. |
1000 | Unable to connect due to unknown error. |
1001 | Unable to send ping command due to unknown error. |
In addition, the following items are available for each gateway:
OnOff (write-only): if set to true, an On command is sent to all devices of the gateway. If set to false, an Off command is sent.
UpDown (write-only): if set to true, an Up command is sent to all devices of the gateway. If set to false, an Down command is sent.
Start Function Test (write-only): if set to true, a function test is started.
Start Duration Test (write-only): if set to true, a duration test is started.
Stop Test (write-only): if set to true, a stop test command is sent.
For each detected DALI device, a sub-tree with the name Device<DALI no> is generated. It contains items that are device-specific.
Level (read- and write-able): this item shows the current light in percentage. It can also be used to directly change the light level.
OnOff (write-only): if set to true, an On command is sent to the device. If set to false, an Off command is sent.
Fault (read-only): the fault state of the device.
FaultBallast (read-only): true if there is a control gear failure.
FaultLamp (read-only): the if there is a lamp failure.
OnOffStatus (read-only): the on/off state of the device.
LimitError (read-only): the limit error flag of the device.
Updating the data point values
To update the data point values, the Core Server must poll the information from the gateway. The update speed depends on the defined polling interval:
Ping interval (defined in driver configuration, default: 10 seconds): used for checking the connection state of the gateway using a ping.
Polling Device Level interval (defined in gateway definitions, default: 2 seconds): used to update the Level item of the devices
Polling Device Status interval (defined in gateway definitions, default: 30 seconds): used to update the items Fault, FaultBallast, FaultLamp, OnOffStatus, LimitError.