UniPi Light

UniPi Light ModBus Server

The UniPi Light ModBus server provides a simple and trivially-parallelised method for accessing the hardware of our UniPi Neuron M603 and UniPi Axon S605 units.

It is designed to be used with any application which can connect to a TCP ModBus server - this includes a wide variety of software, in particular the Mervis and CODESYS IDEs.

Our Evok SDK does not make use of this server itself, but has similar functionality already built-in.

Installation

NOTE: The SSH console must first be enabled before the UniPi Light ModBus server can be installed. If you have not already done so, please follow the instructions for doing so in the SSH Access SDK subsection.

In order to install the UniPi MB Light package type in the following commands into the UniPi SSH console, one after another, confirming each with the “ENTER” key:

sudo su
apt-get update

Type in “Y” if prompted

apt-get install unipi-mb-lighting

Type in “Y” if prompted

sync
dmesg
reboot

The unipi-mb-lighting package should now be running, once the system has finished rebooting.

Functionality

Primary purpose of this server is to provide an easy-to-use interface to the lighting bus, avoiding the need for complex message processing and serialisation - all of which the server does internally. Such processing is often very difficult or impractical to implement in traditional PLC software.

The Light ModBus server exposes a ModBus interface on TCP port 504. It is possible to connect to it via any software with TCP ModBus client capability, which includes both Mervis and CODESYS.

The server has four separate functions, each of which can be used independently of or simultaneously with the others, as all requests are serialised for each bus internally by the program. The capabilities are as follows:

  • Sequentially assigning free addresses to all unaddressed devices on the bus
  • Sending up to 5 single and 5 double commands on each bus in parallel
  • Issuing up to 32 simplified-interface commands per bus in one I/O cycle

We are also working on extending the functionality to allow simpler readdressing of the bus devices via a web interface, as well as direct mapping of device properties on the bus into ModBus.

For further documentation do not hesitate to contact us.

Final Note

The UniPi Light ModBus server is built upon a custom UniPi plugin for the excellent python-dali library. This plugin can be downloaded separately from our git repository, at https://git.unipi.technology/UniPi/unipi-python-lighting