jeffreykog / artnet-hue-entertainment

Near-realtime ArtNet control over Signify/Philips Hue lights using the new Hue Entertainment API
MIT License
36 stars 8 forks source link

Stuck at Step 3 #10

Open Zeroaim-exe opened 1 year ago

Zeroaim-exe commented 1 year ago

Im a newbie to all of this stuff so sorry for my dumbness :D

I created the entertainment group on my phone but how exactly do i run the software? Im using Windows 10 and would like to control my hue lightbulbs via dmxcontrol2.

Thanks for your help

GavinDMXSetup commented 1 year ago

I had the same problem initially and had to work it out through trial and error. But like most things, it is easy when you know what you are doing. I have run the interface on both Windows 10 and 11. I made some notes as to how I installed it, which might work for you. Note this worked for the version as of December 2nd 2022. If the proposed updates for the configuration file have been included, then you'll have to make some adjustments regarding how (or if) the light configuration jas to be set manually.

This is what worked for me:-

  1. First you’ll need to create an entertainment group using the Philips Hue app on your phone. You can select up to 10 lights.

  2. Download the npm software. You’ll need this to install the artnet-nue-entertainment package. (You might have this installed already)

Visit nodejs.org and select and download the appropriate installer to match your operating system.

Go to the location you downloaded the file to and run it by double clicking. The default options when installing are fine. Next there is an option to install some extra tools that might be required for packages that need compiling. You do not need this for running the artnet-hue interface.

Installing this will modify some environment variables.

  1. Get and install the artnet-hue-entertainment package.

Go to the web site that hosts the artnet-hue project. github.com/jeffreykog/artnet-hue-entertainment

You will have to sign-in to Github to be able to download the project.

Click on the <> Code tab towards the top of the page, just below “jeffreykog / artnet-hue-entertainment and then click on the <> Code button on the line below and download the ZIP file. This downloads a file called:- artnet-hue-entertainment-main.zip Create a folder called:- Artnet-hue and extract the inner contents of the zip file into this folder. (There is a zip file within the zip file) This should create three sub folders, build, qlc+ and src. There will be some readme and configuration files also created in the artnet-hue folder.

Open a command prompt and from the folder C:\Users\ run the following command:- npm .\artnet-hue This creates and installs all the required modules to run the artnet-hue interface.

  1. In order to make the command to start the interface more accessible, add a path to the system environment variables:- Path C:\Users\\node_modules.bin

Don’t forget to restart the command shell so that it picks up the new environment variables.

  1. Next form a connection to the required hue bridge. artnet-hue-entertainment discover

This provides the IP addresses of the available hubs. Now follow the instructions on the screen to pair the computer with the required hub by entering the listed IP address of whichever hub (or only hub) you wish to connect to.

Press the link button on the hub first, then enter, for example:- artnet-hue-entertainment pair -- ip 192.168.178.21

You should see a message confirming a successful connection.

  1. The interface has to be configured by modifying a file manually because as of 02/12/2022 the configuration parameters are hard coded into scripts. Note that you’ll only have to gather the configuration data again in the future if the system has been changed, such as resetting the hubs back to a default state or removing / adding lights.

From the command prompt, run:- artnet-hue-entertainment list-rooms Two pieces of information need to be found from this long listing and they are both towards the top of the results displayed. Entertainment { data: { id: 18 name: ‘Entertainment DMX Area’, lights: [ ‘8’, ‘9’, ‘11’, ‘10’, ‘3’, ‘7’, ‘5’, ‘1’, ‘4’, ‘6’ ], The first is the entertainmentRoomId, in this example it is 18. Then the id’s of the lights we’re using, in this case there are 10 (the maximum). As to which one is which, that is going to be a case of trial and error.

Edit the following file:- C:\Users\gavin\node_modules\artnet-hue-entertainment\build\cli.js

Towards the top of the startProcess method there is a definition of the bridge constant object. Find and change the entertainmentRoomId to match the one displayed by the list-rooms command:- entertainmentRoomId: 18,

On the line below you need to change the IP address to match that of your computer, for example:- artNetBindIp: ‘192.168.178.41’,

Next change the lights definitions on the lines below to match the IDs that were displayed by the list-room command. Assign each one a starting DMX address which in my case is going to be spaced at 4 address intervals because I’ve set the channelMode to ‘8bit-dimmable’ meaning that each light uses 4 DMX channels. Three for colour values and one for dimming. It is worth adding comments to help identify which light is which. lights: [ { // Living Room - Left 1 dmxStart: 1, lightId: '6', channelMode: '8bit-dimmable', }, { // Living Room - Right 1 dmxStart: 5, lightId: '4', channelMode: '8bit-dimmable', }, { // Living Room - Left 2 dmxStart: 9, lightId: '1', channelMode: '8bit-dimmable', }, { // Living Room - Right 2 dmxStart: 13, lightId: '5', channelMode: '8bit-dimmable', }, { // Living Room - Left 3 dmxStart: 17, lightId: '7', channelMode: '8bit-dimmable', }, { // Living Room - Right 3 dmxStart: 21, lightId: '3', channelMode: '8bit-dimmable', }, { // Living Room - Left 4 dmxStart: 25, lightId: '10', channelMode: '8bit-dimmable', }, { // Living Room - Right 4 dmxStart: 29, lightId: '11', channelMode: '8bit-dimmable', }, { // TV Back Light - Left dmxStart: 33, lightId: '9', channelMode: '8bit-dimmable', }, { // TV Back Light - Right dmxStart: 37, lightId: '8', channelMode: '8bit-dimmable', }, ] Save the file and that’s the configuration part done.

  1. Finally create a shortcut on the windows desktop that will start the interface up when required.

Right click on the desktop and choose new -> Shortcut

Enter the location of the item we want to create a shortcut to as:- C:\Windows\System32\cmd.exe /k artnet-hue-entertainment run

Note that the /k switch is to keep the command shell running after executing the command, otherwise it will close right away and terminate the Artnet-hue interface.

On the next window enter a name to assign to the shortcut:- Artnet-Hue

Once the shortcut has been created, we need to set the start folder, otherwise it won’t run.

Right click on the newly created shortcut and select Properties. Change the Start In parameter to:- C:\Users\

  1. That’s it, all done. Double click on the shortcut to start the Artnet-hue interface and when you’re done, Ctrl/C to shut it down again.

I hope you find this helpful, even if you have to make some adjustments for your particular environment. I make no claim that is is the correct way of doing things, it just seems to have worked for me. It is worth noting that as of 02/12/22 there is an issue running real DMX lights on a different Artnet universe at the same time as the hue ones. You can see my comments on this issue in other posts I have made.

Good luck.

Shammy1984 commented 1 year ago

Hello, noob here too. Tried following the guide but have not had any luck in getting the software to run. The packages install on my local machine when I run "npm install" in the same directory as the package.json file, but I get "command not found: artnet-hue-entertainment"

Wodie commented 1 year ago

Hi, are there any instructions for installing on Raspberry Pi? When I try artnet-hue-entertainment discover i get -bash: artnet-hue-entertainment: command not found What I am missing?

tomkeldor commented 7 months ago

@GavinDMXSetup thanks so much for provding this step by step tutorial! It worked great and I'm not and Node and Typescript expert. Although I might did point 4 wrongly and I believe that's the problem of @Shammy1984 and @Wodie as they also didn't added correctly the entry for PATH system variable so it's not recognized, to workaround this you can just add node_modules\.bin in every place where C:\Users\<your username>\ is used.

I see @jeffreykog created issue 2 months ago, so it would be great if he add this tutorial to the main repository README.md file!