{"id":23831903,"url":"https://github.com/onitake/daliserver","last_synced_at":"2025-04-11T21:18:53.126Z","repository":{"id":3297437,"uuid":"1638279","full_name":"onitake/daliserver","owner":"onitake","description":"Command multiplexing server for the Tridonic DALI USB adapter","archived":false,"fork":false,"pushed_at":"2024-04-03T21:35:15.000Z","size":885,"stargazers_count":72,"open_issues_count":10,"forks_count":29,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-11T21:18:47.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onitake.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-04-20T00:26:43.000Z","updated_at":"2024-12-31T09:34:19.000Z","dependencies_parsed_at":"2024-02-14T02:25:52.392Z","dependency_job_id":"19789aa2-2f51-4e77-9863-242c7c74338f","html_url":"https://github.com/onitake/daliserver","commit_stats":{"total_commits":129,"total_committers":4,"mean_commits":32.25,"dds":0.06201550387596899,"last_synced_commit":"4cfdb984e9e054d9e9008815d4253c9ba551fef3"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdaliserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdaliserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdaliserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fdaliserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onitake","download_url":"https://codeload.github.com/onitake/daliserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480439,"owners_count":21110939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T14:10:33.196Z","updated_at":"2025-04-11T21:18:53.098Z","avatar_url":"https://github.com/onitake.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"0. Contents\n-----------\n\n1. About\n2. Installation\n3. Running\n4. Communication Protocol\n5. Copyright\n6. References\n\n1. About\n--------\n\nDALI (Digital Addressable Lighting Interface) is bus-based lamp control sytem,\nstandardized by the DALI working group (DALI-AG), a subsidiary of the German\nZVEI (Zentralverband Elektrotechnik- und Elektronikindustrie e.V.).\nIt allows a wide range of lighting control applications, such as switching\nlamps in groups, automatic leveling in response to daylight intensity,\nand integration into home automation systems.\n\ndaliserver is a command multiplexing server for the Tridonic DALI USB adapter,\nallowing access to a DALI bus from any USB-equipped computer that supports\nlibusb. Note however that so far, only Linux and Mac OS X have been tested.\n\ndaliserver is copyright (c) 2011 by its authors (see below).\nLicensing terms can be found in the file LICENSE that you should have received\nwith the program or source code.\nThe source code is hosted on https://github.com/onitake/daliserver\n\n2. Installation\n---------------\n\nIf you received daliserver in binary form, you can skip the next section and go\nstraight to \"Running\".\n\nTo compile daliserver, you need GNU autotools, a C99 compliant C compiler,\nlibusb 1.0+, pkg-config and associated development packages.\nFor Debian based Linux operating systems, package build scripts are provided.\nIf you want to get the source code straight from its repository, you also need\nto install git.\n\n2.1 Debian and Ubuntu\n---------------------\n\nIf you use Debian Linux or a Debian derivate such as Ubuntu, the following\nwill generate a Debian package for you:\n\n$ sudo apt-get install git dpkg-dev debhelper autotools-dev autoconf pkg-config libusb-1.0-0-dev\n\n$ tar xvfz daliserver-\u003cversion\u003e.tar.gz\n$ cd daliserver-\u003cversion\u003e\nor\n$ git clone git://github.com/onitake/daliserver.git\n$ cd daliserver\n\n$ autoreconf -i\n$ dpkg-buildpackage\n\n$ cd ..\n$ ls -l daliserver*.deb\n\nIf everything went smoothly, you should see a newly generated package there.\nThis can be installed with:\n\n$ sudo dpkg -i daliserver_\u003cversion\u003e_\u003carchitecture\u003e.deb\n\ndaliserver will be started during boot afterwards and should already be\nrunning if it can find the USB adapter.\n\n2.2 Other Linux distributions\n-----------------------------\n\nIf you don't use Debian, you can also build manually.\nInstall the appropriate packages using your system's package manager, then:\n\n$ tar xvfz daliserver-\u003cversion\u003e.tar.gz\n$ cd daliserver-\u003cversion\u003e\nor\n$ git clone git://github.com/onitake/daliserver.git\n$ cd daliserver\n\n$ autoreconf -i\n$ ./configure\n$ make\n\nAnd install to /usr/local with\n\n$ sudo make install\n\nIf you want to set up daliserver to run during boot, have a look at\ndebian/init.d, it should provide hints on how to run daliserver in daemon\nmode and set log and run files accordingly.\n\n2.3 Mac OS X\n------------\n\nOn Mac OS X, you will need to install both Apple developer tools (Xcode with\ncommand line utilities) and pkg-config, libusb-1.0, automake and autoconf.\nThere are different ways to achieve this, the easiest is probably with the\nhelp of the Homebrew utility.\n\nXcode can be obtained from the Mac App Store or the Apple Developer Site.\n\nNext, follow the instructions on http://brew.sh/ to install Homebrew, then\ninstall the required packages from a Terminal prompt:\n\nbrew install pkg-config libusb autoconf automake\n\nIf this step throws any errors during the link step, you might need to clean\nup conflicting files or find a way around them. This is outside the scope of\nthis documentation.\n\nObtaining and compiling daliserver works like on Linux:\n\n$ tar xvfz daliserver-\u003cversion\u003e.tar.gz\n$ cd daliserver-\u003cversion\u003e\nor\n$ git clone git://github.com/onitake/daliserver.git\n$ cd daliserver\n\n$ autoreconf -i\n$ ./configure\n$ make\n\nAnd install to /usr/local with\n\n$ sudo make install\n\n2.4 Windows\n-----------\n\n(TODO, untested)\n\nObtain cygwin from http://cygwin.com/ and install required packages:\ngcc libusb pkg-config automake autoconf git\n\nThen, open a command line prompt and checkout and compile daliserver like\non Linux.\n\n3. Running\n----------\n\nIf you installed daliserver from a package, no further action is required.\nIn case you didn't attach your DALI USB adapter before installation, you might\nhave to restart the service. Consult the log file in /var/log/daliserver.log\nfor errors and diagnostics. You can also simply reboot after attaching your\nadapter and fixing permissions (if necessary, see below).\n\nIf you don't want to have daliserver running at boot time, or if you use a\ndifferent operating system, you may also run daliserver directly. It will\nnot fork into background by default, but print info messages to the console\ninstead.\n\nCertain operating systems require special procedures to allow access to\nthe DALI USB adapter. Tridonic chose to implement a device descriptor that\nregisters it as a human interface device (HID), so usermode access would be\npossible on Microsoft Windows without a kernel mode driver.\nOn most other modern operating systems, HID devices are normally claimed by a\ngeneric driver that handles human input. Since the adapter is not\nactually a HID, special preparations are required on these systems.\nOn Linux, the generic HID driver supports a special command to detach it from\nthe device and allow a usermode program access. daliserver sends this command\nduring startup. On Mac OS X, such a function is not available, but there exists\nanother way to keep the driver from claiming the adapter. A dummy kernel\nextension called DALIUSB.kext is shipped with the source code. Copy it to\n/System/Library/Extensions and reboot your system. During the next\nstart, DALI USB will be registered with the generic USB driver instead of the\nHID driver, allowing usermode access from daliserver (or other software).\nIt might also be necessary to change the device node permissions on certain\nLinux variants, as they are normally restricted to super user access. If this\nhappens, daliserver will print out an error during startup. You may either run\nit with superuser privileges (not recommended) or change the permissions of the\ndevice. Read and write permissions are required. It is also possible to automate\nthis process with udev.\n\nThe perl/ subdirectory contains a number of example Perl scripts.\nusbdali.pm is a Perl module that can handle construction of DALI messages and\ncommunication with the daliserver. Some examples are provided too:\nalloff.pl - Sends a turn off broadcast message\nallon.pl - Sends a turn on broadcast message, but no light level (lamps might\nstill be at 0 after sending this)\nallset.pl - Sends a lamp level broadcast message and displays the response\nlampoff.pl - Sends a turn off command to a specific lamp\nlampset.pl - Sends a level to a specific lamp\n\n4. Communication protocol\n-------------------------\n\nTo communicate with daliserver, you need to connect to it first.\nIf you didn't specify any options, it listens on TCP 127.0.0.1:55825\n\nRequests have the following format:\n\n  version:uint8_t (protocol version)\n  type:uint8_t (request type)\n  address:uint8_t (device address)\n  command:uint8_t (device command)\n\nResponses are defined as:\n\n  version:uint8_t (protocol version)\n  status:uint8_t (status code)\n  response:uint8_t (response value)\n  padding:uint8_t (must be 0)\n\nReceived out of band messages:\n\n  version:uint8_t (protocol version)\n  status:uint8_t (status code)\n  address:uint8_t (device address)\n  command:uint8_t (device command)\n\nThe protocol version is currently 2. All frames are 4 bytes long.\n\ntype must be 0, denoting a \"Send DALI command\" request.\n\nstatus can have one of the following values:\n\n  0:   Transfer successful, no response\n  1:   Transfer successful, response received\n  2:   Broadcast message received\n  255: Transfer error\n\naddress and command are the DALI device address and command, respectively.\n\nresponse is the value received from the device, if available, or 0 otherwise.\n\nSuccessful transfers, responses and broadcast messages can be differentiated\nby the value of the status code.\n\neDALI commands aren't supported for now.\n\n5. Copyright\n------------\n\ndaliserver is (c) copyright 2010-2015 by\nGregor Riepl \u003conitake@gmail.com\u003e\nJohannes Wüthrich \u003cjohannes@deragent.net\u003e\nand others.\n\nAll rights reserved.\nSee the AUTHORS file for a list of contributors.\nSee the LICENSE file for the license terms.\n\nautoconf macros in the m4/ subdirectory are governed by a different license,\nsee m4/LICENSE for details.\n\n6. References\n-------------\n\nhttp://www.dali-ag.org - DALI working group homepage\nIEC 62386 - The official standard (requires fee)\nhttp://www.tridonic.com/com/en/2192.asp - Tridonic masterCONFIGURATOR software\nfor Microsoft Windows, was used to reverse engineer the communication protocol\nwith DALI USB and to test out DALI commands\nhttp://www.siwawi.arubi.uni-kl.de/avr_projects/dali/index.html\nAVR microcontroller DALI implementation, contains lots of useful links\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fdaliserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonitake%2Fdaliserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fdaliserver/lists"}