======%hide Unipi Light ====== ====== Unipi Light ModBus Server ====== The Unipi Light Modbus server provides a simple and trivially-parallelised method for accessing the hardware of the [[en:automation:02-glossary:dali-hidden|Unipi Axon S605]] controller. 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 [[en:sw:01-mervis:01-mervis-ide|Mervis]] and [[en:sw:03-3rd-party:codesys|CODESYS]] IDEs. Our [[en:sw:02-apis:01-evok|Evok SDK]] does not make use of this server itself but has similar functionality already built-in. ==== Installation ==== 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 [[en:sw:02-apis:03-ssh|SSH Access]] SDK subsection. 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 ==== The 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 [[https://github.com/sde1000/python-dali|python-dali]] library. This plugin can be downloaded separately from our git repository, at https://git.unipi.technology/UniPi/unipi-python-lighting