GithubHelp home page GithubHelp logo

sinedied / dmx-hue Goto Github PK

View Code? Open in Web Editor NEW
194.0 14.0 22.0 694 KB

:traffic_light: Art-Net node to control Philips Hue lights with DMX

License: MIT License

JavaScript 100.00%
philips hue light dmx art-net show node cli bridge hacktoberfest

dmx-hue's Introduction

🚥 dmx-hue

NPM version Build Status Node version XO code style License

dmx-hue-logo

Art-Net node to control Philips Hue lights with DMX

Installation

Install NodeJS, then open a command prompt:

npm install -g dmx-hue

Usage

Usage: dmx-hue [setup] [options]

Create an ArtNet DMX<>Hue bridge.

Options:
  -h, --host       Host address to listen on              [default: '0.0.0.0']
  -a, --address    Set DMX address (range 1-511)          [default: 1]
  -u, --universe   Art-Net universe                       [default: 0]
  -t, --transition Set transition time in ms              [default: 100]
                   Can also be set to 'channel' to enable a dedicated DMX
                   channel on which 1 step equals 100ms.
  -c, --colorloop  Enable colorloop feature
                   When enabled, setting all RGB channels of a light to 1 will
                   enable colorloop mode.
  -w, --white      Enable 2 additional channels for white balance control
  -n, --no-limit   Disable safety rate limiting
                   Warning: when this option is enabled, make sure to not send
                   more than <number_of_lights>/10 updates per second, or you
                   might overload your Hue bridge.

Note: options overrides settings saved during setup.

Commands:
  setup            Configure hue bridge and DMX options
    -l, --list     List bridges on the network
    -i, --ip       Set bridge IP (use first bridge if not specified)
    --force        Force bridge setup if already configured

Setup

Before being able to control Hue lights on your network, your first have to setup your Hue bridge with the app. Run dmx-hue setup, press the link button on your Hue bridge within 30s, then run dmx-hue setup again.

After that, follow instructions to configure the default settings. You can change these settings later at anytime by running dmx-hue setup again.

Once your Hue bridge is correctly setup, just run dmx-hue to start the Art-Net node, then go crazy with your favorite DMX controller! 💡

If you're looking for a nice cross-platform & open-source DMX software controller, you should take a look at QLC+.

Setting lights order

If you need to define your lights order manually for the DMX mapping, edit your configuration file with a text editor (the file path is displayed at the end of dmx-hue setup) and add a new lightsOrder entry at the end like this:

{
  ...
  "lightsOrder": [1, 2, 3]  // Hue lights ID
}

The Hue lights IDs are displayed when dmx-hue is started.

Hue lights specific features

Colorloop

When colorloop option is enabled, your can enable Hue light automatic colorloop mode by setting the R/G/B channels of a given light to the value 1.

Transition time

Hue light can automatically perform transitions from one state to another in a specified time. This is especially useful since there is a somewhat low update rate limitation on Hue lights (see next section for more details). If you want to go creative and be able to adjust transition times dynamically, you can dedicate a DMX channel for it.

White control

When option --white is enabled, channels 4-5 for each fixture are reserved for white control. When R/G/B channels are at value 0, channel 4 will control temperature, and channel 5 will control brightness. Brightness is currently overriden by R/G/B channels if they are not at value 0.

Using this option also enables control of Philips White Ambience Lights when R/G/B channels are at value 0.

Philips Hue response times vs DMX

With the Philips Hue API it’s only possible to update the state of bulbs 10 times per second, 1 bulb at a time. Compared to a single DMX universe, which controls all 512 individual parameters up to 44 times per second, there’s some major differences in how quickly we can update your lights using this software bridge.

This is especially noticeable when using automation sequences, if you try to update Hue lights quicker than 0.1s times the number of lights in your projects, some updates may be skipped. This is unfortunately a limitation with the Hue lights API and I cannot do anything about that.

Safety rate limiting

By default, a safety rate limit is enforced so there is always a 0,1s interval between Hue API calls. You can disable this limit using the --no-limit option, but then you have to make sure to not make more than number_of_lights / 10 DMX value changes per second, or your Hue bridge might get overloaded and may crash.

Development

To run the project without installing, clone the repository and run the following commands from the folder:

npm install
npm start

Changes you make to the source will be immediately available when you run in this way.

dmx-hue's People

Contributors

jwildeboer avatar m0dbot avatar rjmunro avatar ryan0751 avatar semantic-release-bot avatar sinedied avatar teakkey7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmx-hue's Issues

Port Occupied Error

When I start dmx-hue in terminal and leave it open, I then go to the Lightkey app to connect to Art-Net and I get this error about the port being used already by dmx-hue

Screenshot 2023-10-31 at 7 53 20 AM

Setup command not finding bridge that is clearly on the network

What the title says. Running setup with -i at the bridge's ip as shown by my router's connected clients still gives "No bridge found". Windows 10, latest repo and latest hue bridge firmware.
From Command Prompt I can ping the bridge's IP and get a response and I can use curl at the bridge IP and get a response from it as shown below:
image

Control by Bri/Hue/Sat, not R/G/B

Hi,
This is a feature request. Sometimes I want to control just brightness without changing color.
I know actual Hue API is controlled by Brightness, Hue, Saturation (HSI), so this dmx-hue program converts RGB to HSI.
Could you add an option to controll Brightness(+on/off), Hue, Saturation directly?

xLights integration?

I'm new to this but I have the service running on my PC now, linked to the Hue bridge and I have my lights added. I've added a new controller on xLights and chosen Artnet as the protocol. Added the IP of my PC. but I can't actually see any lights. Now I could be doing something wrong in xLights but any ideas?

|| does not work if first value is 0 and second is 1.

universe: this._args.universe || Util.config.get('universe') || 0,

Need something like to have it not always fall to second value:
universe: this._args.universe === 0 ? 0 : (this._args.universe || Util.config.get('universe') || 0),

(I had config universe to 1 and was unable to argh override it to 0)

ArtNet to JS Node

Sorry bit of a Noob!

running JS node on windows server: my DMX controller has artnet so linked everything up on Ethernet but no control over the node:

  1. Does the DMX streaming address on my DMX controller need to be set to the ip of my windows server?
  2. As I’ve tried the above and it doesn’t work - do I need to open a port on the server for it to talk to the node?

Many thanks

Ikea Tradfri control

This setup is awesome
Is there a way for this system to control other brand of lamps besides Hue lights while using the hue hub? I'm presently looking at the Tradfri system from ikea.

No node found: using QLC console to send to dmx-hue

Running dmx-hue on a system with eth0 and eth1 and Hue hub attached on local network.
Setup hue binding to eth1 using universe 1

QLC does not detect any "HueDMX" node on the network when configuring Outputs.

Since the documentation indicates and recommends QLC, I wonder if there is further documentation for running both dmx-hue and QLC on the same system with multiple network interfaces.

Error: bind EADDRINUSE 0.0.0.0:6454

Hi!

Ran setup but when I run dmx-hue on High Sierra I get the error mentioned on the topic... Really want to use my Hue lights with Resolume Arena, any ideas on what could be causing this?

Thanks a bunch :)

Transition/white channels not appearing, cannot re-order lights after changes to config file

Screenshot 2023-07-15 at 12 53 20 PM

Hi, sinedied.
Any changes I make to the config file (even if I make those changes during setup) are not reflecting when I run dmx-hue.

I have tried:

  1. Re-ordering my lights
  2. Setting the transition time channel to yes
  3. Enabling the white channels.

All I get are the default RGB channels for each of my Hue lights.
Unable to add the transition channel (channel 1, and re-order the lights is making it incompatible with the mapping I'd previously done in my DMX program, where I could see the transition channel and the lights in the proper order [1,3,2].

Is there a way to force the configuration? I've already tried deleting the config file and doing the setup again. No matter what, I only get the default light order with no transition time/white control channels.

Multiple Bridges

Hi Sinedied,

Is it's possible to control multiple bridges at the same time? I'm having a project that will be using 3 a 4 bridges with several hue lamps.
If so, how we setup them.

Many thanks and looking forward to hear from you.

Kind regards.
Ricardo

Only one bulb can transition

Hi, I've got dmx-hue up and running and I've created a sequence in Vezer, if I manually scrub through and click on parts of the sequence the bulbs change to how they are set, but if I click play only the first bulb runs through the sequence and then when it hits the end all the other bulbs change.

Does anyone know what could be causing this?

Channel "red" stuck

Hi,
I was testing "dmx-hue", but I encoutered an issue with my "Extended Color Light".
The Channel "Red" got stuck somehow. The Lights were "red" even when I used "green" or "blue" channel. I could see the Light flashing the correct colour briefly but went back to "red" immediatly.
The white channel was working fine.
I also configured my "Extended Color Light" without any other Lamps on the configuration and with only the RGB-channels.
Then the issue with "red" sticking was not present.

Regards
Martin

"No Lights Found" error?

First of all, thank you so much Sinedied!!

For making this very specific and useful tool! I'm prototyping a lighting system commanded by various input methods via qlc+ on a pi4b that controls both dmx theatrical fixtures and many Philips hue bulbs, and this seems to be the ideal solution for combining those worlds!

I've successfully gotten a test system working in the shop, but when I installed my build into the main room, I've been encountering a No Lights Found message that I haven't been able to resolve. I really hope I'm just overlooking something easy 🙃 as I know you're not really supporting this tool at this time- which is totally fair.

The bridge and hue control all work fine using the Hue app. There is a pi4b with qlc+ and dmx-hue on the same network. The only change from shop image I made on the new pi was to edit config.json to point to the IP of the new bridge, but that hasn't worked. When I run dmx-hue or dmx-hue setup, I get the response “No Lights Found.” I hoped that the dmx-hue setup --force command would resolve this issue, but it doesn’t :(

Here's what I'm seeing:

dmx-hue
No lights found

dmx-hue setup
Bridge configured at 192.168.1.100
No lights found

dmx-hue setup --force
No bridge found

dmx-hue setup -i
Bridge configured at 192.168.1.100
No lights found

cat config.json
{
"bridge": "192.168.1.100",
"user": "9C0s22mhXJrebQ8sctMeVAkhKU0hGMs2rl1WQOYH",
"dmxAddress": 1,
"universe": 1,
"colorloop": false,
"transition": 100,
"disabledLights": {}
}

No bridge found

Hey actually tested it on Windows and on Raspberry.
And I'm not able to find the device by typing "dmx-hue setup" :(

Did the setup in the Hue App
Added 1 Lamp
Then in cmd: "dmx-hue setup"
Pressed the Button on the Bridge
again "dmx-hue setup"

But I'm not able to find any Bridge

Hue Essentials says:
Modell ID BSB002
API-Version 1.50.0
Softwareversion 1950207110

Is there anything wrong?
Thank you :)

Error: No Bridge Found

unfortnuately i get the error message that no bridge was found. i also tried setting the IP manually.
When connecting to the IP via my browser i see the web page so everything should work. The Hue-Sync Windows App works as well.

image
image

Connection to multiple hue bridges on one computer

Hello!
I really like this software and it is a life saver. Thank you so much for developing it.
We are in a situation where we need two bridges to successfully control all of our lights. Is there a way to run two processes of the app on one computer? There is only one setup file that is automatically used by the two processes, right? Do you have a simple idea on how to get around this, or can you point me to some of the code that I could add to?

Thanks again
Chris

"No Lights Found"

Hello,
They worked up until last Sunday, now all I get is no lights found. I have updated software, nothing?

"Bridge configured at..." Problem

I was using dmx-hue just fine. One day I had to reset the bridge and after doing that I couldn't use the dmx-hue again. At first it gave a "no lights found" error. Even though I tried to introduce the new bridge with the "setup" command again, it kept giving the same error. I have repeatedly deleted and restored the Node and everything associated, but it has not been resolved. Finally, I changed the ip of the bridge and used the "setup" command with the new ip. This time I encountered the error "bridge configured at 192.168....(old ip))".

Wont work with Daslight

What am I doing wrong?
The setupinstructies works, see my bridge.
Program starts and see al the lights.
Start Daslight 4, patch in universe 1 faders, nothing happens!

Back to the frist question, whhat am I doping wrong?

Regards
JP

"No lights found" when running as a cron job

I've been running into a strange issue where dmx-hue returns the error "No lights found" when running as a cron job. After booting, I can start the service manually just fine and it reads all the settings from the config file, but for some reason, it doesn't read the config file when running as a @reboot cron job. I've tried this both from the user account and the root account (trying to get this running on an rPi).

Any idea what might be causing this behavior?

Controlling using ONYX

Hi,

I'm using Onyx (http://forum.obsidiancontrol.com/t/introducing-onyx/4921) to control hardware Artnet node like Enttec ODE and Elation Enode 8 Pro without any issues. I want to use it to control my Philips Hue with your software node but it is not working. I have a Mac Book Pro detecting the Hue bridge and running the node, but it don't respond to the Artnet command I'm sending with Onyx, installed on a PC on the same network. I tried broadcast and unicast to my Mac Book Pro IP address without success. Do you know what could be wrong?

Regards,

LR

Not detecting diyHue Hub

I've tried to link this to my virtualized diyHue Hue Hub but it does not detect the virtualized bridge. Here's my console log. In between setup commands I pushed the virtual link button, but it's still not detected.

sh-3.2# dmx-hue setup
No bridge found
sh-3.2# dmx-hue setup
No bridge found
sh-3.2# 

I'm running dmx-hue on my mac and the installation went without a hitch.
Do you have any tips?
Is it possible to specify a host ip address for dmx-hue setup. Maybe I can specify the ip address of my diyHue instance.

Bridge found at incorrect address - no lights found

[MacOS]

I’m facing problem in version 2.0.1 that probably somewhere is old config.json from version 1.x and it has old IP address of bridge. I tried to use force, host, ip options with setup but none worked. On Windows deleting configuration file helps because it allows you to run fresh dmx-hue setup and just click the bridge button and repeat the command to enter configuration process.

So the question is, where on MacOS this file is being created or should be created? I don’t remember the path from last year usage probably on different device and can’t find on current one.

Keeps crashing

We have about 20 hue fixtures that we control for several hours once a week and also we usually change all of these all at once. I have the dmx-hue app running on a raspberry pi. About once every week, the program crashes and just stops working. We're running the pi in a headless mode, so I'm not able to see any outputs when this happens, so I'm wondering if there are any logs and where/how to find those.

Request for help with White Ambiance Warm/Cool control

I'm working with a system that has 8 @ warm/cool white ambiance lamps. Am I missing a step to be able to change the color temperature of these lamps? I'm able to control RGB attributes well with your code (thank you for this).

Any help would be greatly appreciated. Thank you.

Dimming Individual Bulbs with separate transition times

Hello!

Thanks for this great bit code! I've got my hue bridge working with an ETC Nomad system which is perfect for the project I'm on. I just want to check that I am not missing something. Is it possible to assign transition times to individual bulbs? I can use the transition time DMX channel for my whole group of bulbs, but I would love to have more individual control over different bulbs in different rooms.

Thanks!

Rekordbox lightning control & dmx-hue?

I'm a total DMX noob. I'm a DJ though that has been using Pioneer Rekordbox for quite some time. Now the competitor Engine has out of the box Hue control. Rekordbox has DMX lightning control. For a small home DJ setup I hoped I could use this to bridge between Rekordbox DMX & Hue lights. But apparently I can't, since Rekordbox only works with a RB-DMX1 device and not with Art Net.
Anyone knows of a way to use Rekordbox and maybe some additional piece of software to control Hue lights? And if so what fixtures would the Hue lights be?

Or could I use the suggested QLC+ controller and somehow have it detect the music? Or is there a free Art Net Android controller?

Thanks!!

Unable to send to Hue Bridge Output

Hi Sinedied, thanks for making this!

I've installed the package and QLC+ based on your recommendation. But I am stuck at the next step .... In QLC, I don't see the hue bridge listed as an output IP. I can't figure out how to reach it to send light values to reach the Hue lights. Where am I supposed to send the DMX to out of QLC?

Any advice is much appreciated!

Support for sACN (E1.31)

Hey, thanks so much for this project, it's super helpful to be able to bridge big lighting control systems with Hue.

Is there any chance you would consider adding support for sACN (E1.31) as an input instead of ArtNet? It seems that most lighting consoles are going towards that as the default protocol, and being multicast it is also easier on the network, especially when you have many universes.

There is already an API module for it (https://github.com/hhromic/e131-node). It's a long time since I wrote any Node, so if you would be happy to do it that would be fantastic, otherwise I can see what I can cobble together.

Unable to complete setup - No bridge found

Hello there, trying to setup my bridge but it doesn't work.

When I type dmx-hue setup for the first time in one of my Windows 11 VMs, it finds my two bridges, I select one of them, then click on the link button on top of the bridge and proceed to run dmx-hue setup again but this time it doesn't find any bridges. If I run dmx-hue it says to run the setup again. What could be affecting the setup? I also tried on a MacOS laptop with the same results.

Thanks!

Outputs:

PS C:\Users\filip_y80qtot> dmx-hue setup
Found 2 bridge(s)
? Multiple bridges found, select the one to use Bridge02 (10.254.0.19)
No bridges found
PS C:\Users\filip_y80qtot> dmx-hue setup
No bridge found
PS C:\Users\filip_y80qtot> dmx-hue
0
Bridge not configured, run "dmx-hue setup"

No bridge found

I keep getting "No bridge found", regardless of whether I run "dmx-hue setup" or "dmx-hue setup -i192.168.2.100".

I am positive that my bridge's IP is 192.168.2.100: when I point my browser at that IP, it loads the bridge's http page.

Is it possible that this only works with the gen2 bridge? I still have the gen1, the round one.

Not an issue but a silly question

Hey fairly new to this, planning a project.
From what I understand once this is installed I don't need to leave a pc/mac open to run this right?

As in after initial setup? or does there need to be a dedicated machine running this code you've developed constantly?

If not would it be feasible to have this running on a pi?

Hue Groups

Is there a way it can query and bring back the Hue groups? Then we could change more then 1 light at the same time to get around the slow Hue bridge slow API 1 light at a time.

Support Hue Entertainment mode

Hue entertainment allows UDP packets to be sent without (?) rate limiting. This would allow way smoother lights, nearly as good as a real fixture.

Increased Performance

Hi,
I have a feature request for bypassing the Hue API rate limit. Would it be possible to use ZigBee or BLE to control the lights directly instead of going through the bridge and therefore make requests faster? Has this already been looked into?
Thanks!

Feature Request

Is it possible to control an room, instead of control every single Bulb?
So I have no lag between these Bulbs, when i change the color.

And it were cool if its not only 3 RGB DMX channels, rather 4 or 5 channels. The 4. for the tunable white and the 5. for dimming.

Unable to run dmx-hue and Resolume in parallel

Hi.

I'm trying to use Artnet connections set up over 2 software to control 2 light sources.

The first source is my Philips Hue lights through QLC+ using DMX Hue.

The second source is a pixel LED strip connected to an Artnet controller (SP801E). I am controlling the pixel strip using Resolume.

I am able to control the pixel strips and the Philips Hue lights independently using either software, but when I'm trying to run them together, I'm running into issues.

If I run Resolume first, then trying to run dmx-hue gives me the error:
"Error: bind EADDRINUSE 0.0.0.0:6454"

Conversely, if I run dmx-hue first (it runs successfully), and then I try running Resolume, I get this error in the Resolume DMX settings:
"Uh-oh. Art-Net can't be started. Another program is already using the port."

What would be the best way to get both running at the same time?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.