{"id":20576670,"url":"https://github.com/hobbyquaker/artnet","last_synced_at":"2025-04-10T00:18:41.758Z","repository":{"id":57184435,"uuid":"23080213","full_name":"hobbyquaker/artnet","owner":"hobbyquaker","description":"Send ArtDMX to an Art-Net node (DMX512, Stage Lighting) 💡🎬","archived":false,"fork":false,"pushed_at":"2019-10-02T05:41:21.000Z","size":37,"stargazers_count":123,"open_issues_count":6,"forks_count":24,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-10T00:18:37.033Z","etag":null,"topics":["art-net","artnet","dmx","dmx512","lighting","node-module","stage-lighting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hobbyquaker.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2014-08-18T17:34:14.000Z","updated_at":"2025-04-03T15:08:28.000Z","dependencies_parsed_at":"2022-09-14T08:50:24.303Z","dependency_job_id":null,"html_url":"https://github.com/hobbyquaker/artnet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fartnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fartnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fartnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fartnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hobbyquaker","download_url":"https://codeload.github.com/hobbyquaker/artnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131322,"owners_count":21052820,"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":["art-net","artnet","dmx","dmx512","lighting","node-module","stage-lighting"],"created_at":"2024-11-16T05:46:35.577Z","updated_at":"2025-04-10T00:18:41.735Z","avatar_url":"https://github.com/hobbyquaker.png","language":"JavaScript","funding_links":[],"categories":["Libraries and frameworks"],"sub_categories":["ArtNet Libraries"],"readme":"# artnet\n\n[![NPM version](https://badge.fury.io/js/artnet.svg)](http://badge.fury.io/js/artnet)\n[![Dependency Status](https://img.shields.io/gemnasium/hobbyquaker/artnet.svg?maxAge=2592000)](https://gemnasium.com/github.com/hobbyquaker/artnet)\n[![Build Status](https://travis-ci.org/hobbyquaker/artnet.svg?branch=master)](https://travis-ci.org/hobbyquaker/artnet)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![License][mit-badge]][mit-url]\n\n\u003e This is a [Node.js](http://nodejs.org) module that can be used to send ArtDMX packages to an [Art-Net](http://en.wikipedia.org/wiki/Art-Net) node.\n\n## Usage\n\nconnect, set channel 1 to 255, disconnect.\n```javascript\nvar options = {\n    host: '172.16.23.15'\n}\n\nvar artnet = require('artnet')(options);\n\n// set channel 1 to 255 and disconnect afterwards.\nartnet.set(1, 255, function (err, res) {\n    artnet.close();\n});\n```\n\nThe set method can set multiple channels at once:\n\nUse an array to set subsequent channels...\n```javascript\n// set channel 100 to 10, channel 101 to 20 and channel 102 to 30\nartnet.set(100, [10, 20, 30]);\n```\n\n...if you want to keep certain channels unchanged set them to null\n```javascript\n// set channel 50 to 255 and channel 52 to 127\nartnet.set(50, [255, null, 127]);\n```\n\nyou can omit the channel, it defaults to 1\n```javascript\n// Set channel 1 to 255 and channel 2 to 127:\nartnet.set([255, 127]);\n```\n\nAdditionally, you can send trigger macros to devices.\n\n```javascript\n// Send key 3, subkey 1 to all devices.\nartnet.trigger(1, 3);\n\n// Send key 2, subkey 71 (the letter 'G') to ArtNet Devices responding to 0x6A6B.\nartnet.trigger(27243, 71, 2);\n```\n\nThis lib throttles the maximum send rate to ~40Hz. Unchanged data is refreshed every ~4s.\n\n## Options\n\n  * host (Default ```\"255.255.255.255\"```)\n  * port (Default ```6454```)\n  * refresh (millisecond interval for sending unchanged data to the Art-Net node. Default ```4000```)\n  * iface (optional string IP address - bind udp socket to specific network interface)\n  * sendAll (sends always the full DMX universe instead of only changed values. Default ```false```)\n\n\n## Methods\n\n#### **set(** [ [ *uint15* **universe** , ] *uint9* **channel** , ] *uint8* **value** [ , *function(err, res)* **callback** ] **)**\n#### **set(** [ [ *uint15* **universe** , ] *uint9* **channel** , ] *array[uint8]* **values** [ , *function(err, res)* **callback** ] **)**\n\n\nEvery parameter except the value(s) is optional. If you supply a universe you need to supply the channel also.\nDefaults: universe = 0, channel = 1\n\nCallback is called with (error, response) params.\nIf error and response are null data remained unchanged and therefore nothing has been sent.\n\n#### **trigger(** [ [ *uint15* **oem** , ] *uint9* **subkey** , ] *uint8* **key** [ , *function(err, res)* **callback** ] **)**\n\nSends an ArtNet ArtTrigger packet. ArtTriggers are typically device specific and perform functions like starting and stopping shows.\n\nEvery parameter except the `key` is optional.  If you supply an `oem`, you need to supply a `subkey` also.\n\nDefaults:\n\n* `oem` = `0xFFFF`\n* `subkey` = `null`\n\nCallback is called with `(error, response)` params.\n\n`trigger`s are NEVER throttled, as they are time sensitive. They are always sent immediately upon processing.\n\n#### **close( )**\n\nCloses the connection and stops the send interval.\n\n\n#### **setHost(** *string* **host** **)**\n\nChange the Art-Net hostname/address after initialization\n\n#### **setPort(** *number* **port** **)**\n\nChange the Art-Net port after initialization.\nDoes not work when using the broadcast address `255.255.255.255`.\n\n# Further Reading\n\n* [Art-Net protocol specification](http://www.artisticlicence.com/WebSiteMaster/User%20Guides/art-net.pdf)\n\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014-2017 Sebastian Raff and Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n## Credits\n\nArt-Net™ Designed by and Copyright [Artistic Licence Holdings Ltd](http://www.artisticlicence.com/).\n\n\n[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat\n[mit-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fartnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhobbyquaker%2Fartnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fartnet/lists"}