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

Cannot find bridge in lighting software #2

Open jackbeau opened 2 years ago

jackbeau commented 2 years ago

What an awesome project! I've been looking for a way to link my Hue lights to my dmx lighting software for a while.

However I'm having trouble setting this up. The bridge successfully connects to my Hue Bridge, but I can't find the ArtNet bridge in my DMX lighting software (I'm using Lightkey which supports Art-Net). I'm using two separate macs for Lightkey and artnet-hue-entertainment.

Here are the steps I took to set this up:

  1. Cloned repo, installed dependencies
  2. Changed the ip, username and password in the index.js file to match my Hue Bridge
  3. In artnet.js I updated the entertainmentRoomId and lights to match the values on my Hue Bridge
  4. I set the artNetBindIp to the IP address of my computer running artnet-hue-entertainment.

Here are the logs collected:

/usr/local/bin/node ./build/index.js
Binding broadcast address 192.168.1.255:6454
Binding unicast address 192.168.1.204:6454
Requesting streaming mode...
Streaming enabled: true
Sleeping for 3s to give the Hue bridge time to enable streaming mode
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: true, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
Unknown packet type: 32768
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: false, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
Unknown packet type: 32768
Performing streaming mode handshake...
Connected and ready to go!
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
Unknown packet type: 32768
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: true, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
Unknown packet type: 32768
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: false, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12292, …}
Unknown packet type: 32768
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
Unknown packet type: 32768
Unknown packet type: 32768
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
Unknown packet type: 32768
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: true, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
ArtPoll ArtPoll {opcode: 8192, protocolVersion: 14, sendPollReplyOnChange: true, sendDiagnostics: false, sendDiagnosticsUnicast: false, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}
ArtPollReply ArtPollReply {opcode: 8448, version: 0, netSwitch: 0, subSwitch: 0, oem: 12548, …}

Note: every time I run Art-Net bridge discovery in Lightkey, I get the following warning in the log Unknown packet type: 32768.

jeffreykog commented 2 years ago

Hey, thanks for your interest in this project. I'd like to start off by saying it's still early work in progress. The configuration is still not finished, as is the automatic discovery of Hue lights and mapping them to a DMX channel. But with a bit of effort we should be able to make it work, as i have been successfully testing it with a few Hue lights, and your configuration looks mostly right. Note that this only works with Signify branded RGB lights, not with the colorless ones or bulbs from other brands.

The unknown packet type (32768 = 0x8000) is the ArtTodRequest. It's used for RDM device discovery. I don't implement any RDM currently, but will do so in the future. The project not responding to this packet isn't a problem for the controller.

From your logging i see that the connection to the Hue bridge is working, and it's also correctly listening to ArtNet, and receiving data. That's good. I also assume the room id and light ids have been configured correctly, because the Hue bridge will close the connection when wrong data is sent.

When you start sending ArtNet data from your light software you should be able to control the lights. When using 8bit-dimmable channel mode, the channel layout starts at dmxStart, with the first channel being the dimmer and the following 3 channels being RGB. This is repeated for each light. You might need to map a generic dimmer+RGB fixture in your lighting controller for it to be able to control it. I'm testing this with QLC+, and a fixture definition for QLC+ is included in the project repository. Perhaps you could confirm if it's working with QLC+, to see if the problem lies in your controller or in the bridge.

jeffreykog commented 2 years ago

@jackbeau I'd like to add that i implemented ArtNet discovery yesterday. So you could try updating to latest master (and updating dependencies) to see if your controller detects the bridge now