Closed AlexWHughes closed 1 year ago
Thanks for letting me know about this. I will attempt a repro this week and see what is involved in a fix.
-Dan
On Oct 11, 2021, at 4:34 PM, AlexWHughes @.***> wrote:
Describe The Bug:
To Reproduce: Adding two DMX fixtures using the same universe seems to cause issues when you control only one of them. Add in two "elements" to reproduce
Expected behavior: When I control the first light the second one shouldn't turn off. It seems like when I am controlling one it sends zero values to the other light.
Logs:
Show the Homebridge logs here, remove any sensitive information.
Plugin Config:
{ "name": "lights", "ipAddress": "xxx.xxx.xxx.xxx", "platform": "DMXLightHomebridgePlugin", "accessories": [ { "name": "RGB-1", "id": "lx-1", "driverName": "sacn", "dmxStartChannel": 1, "dmxChannelCount": 192, "dmxUniverse": 1, "colorOrder": "rgb" }, "name": "RGB-2", "id": "lx-2", "driverName": "sacn", "dmxStartChannel": 193, "dmxChannelCount": 4, "dmxUniverse": 1, "colorOrder": "rgb" { ] }
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/PennazSoftware/homebridge-dmxlight-plugin/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALGYIL2FVLGE32FSL3GCJADUGNX6ZANCNFSM5FZIJE3A.
No problem. It's a minor thing but would be great if there is an easy fix. I suspect its sending a full universe of data every time rather than just the affected channels.
Would also be great if it worked with RGBW.
Any luck? Is it a complex fix?
Hello, Did you ever work out a solve for this?
I haven’t. All of my DMX lights are at my house in Seattle and I’ve been living at my Palm Springs place since December and haven’t had a chance to test a fix. The good thing is that I’ll be home in two weeks and will look into it. Sorry it’s taken so long.
-Dan
On May 1, 2022, at 10:43 PM, AlexWHughes @.***> wrote:
Hello, Did you ever work out a solve for this?
— Reply to this email directly, view it on GitHubhttps://github.com/PennazSoftware/homebridge-dmxlight-plugin/issues/2#issuecomment-1114516426, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALGYIL6F5WA6HVDQSCVKI63VH5TP7ANCNFSM5FZIJE3A. You are receiving this because you commented.Message ID: @.***>
No problem. Thanks!
Any luck? Let me know if there is anything I can do to help?
Hello,
Is there update to this issue?
I'm happy to put some $$$ behind this one if that helps.
I’ll have another look at getting it to work but my previous attempt pointed to a limitation with a dmx plugin I have a dependency on and I wasn’t able to figure out a workaround.
I’m out of town right now but will have a look when I return on the 26th.
-Dan
On Dec 18, 2022, at 2:32 AM, AlexWHughes @.***> wrote:
I'm happy to put some $$$ behind this one if that helps.
— Reply to this email directly, view it on GitHubhttps://github.com/PennazSoftware/homebridge-dmxlight-plugin/issues/2#issuecomment-1356768543, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALGYIL52GIXQ6T4X6ANG7KDWN3R2PANCNFSM5FZIJE3A. You are receiving this because you commented.Message ID: @.***>
As we discussed nearly a year ago (sorry about the harassment) I believe the issue is the module is sending a full universe of data so when you try to control one light it sends data to both. If there isn't an easy fix then we can close this out and move on as its current state should be fine for most people.
I ran into the same issue, and did some digging. The sACN protocol as defined in this spec document only seems to support sending an array of DMX values that start at address 1, and the e131 library this project is using will fill in 0 values for any channels before the ones we are trying to update.
This means that turning on your "RGB-2" light and then turning on your "RGB-1" should work, but if you do it in the reverse order, the 0 "padding" values on addresses 1-192 sent by controlling RGB-2 will turn off all the channels used for RGB-1.
Given this is an issue for me as well, I'll investigate whether I can cache the state of the whole universe to send the "last used" values for each channel every time an update is sent, instead of sending mostly 0s that turn off other lights at lower addresses.
I moved the code outside of HomeBridge and wrote a simple test application. I have a E131 controller (Holiday Coro Alphapix 4) configured with 2 universes (300 lights on each). The application issues the following commands with a 1-second delay between them:
The application controls the lights correctly...issuing a command on one universe does not impact the other universe. I also tried instantiating a new instance of my dmx library midway through the procedure and it still ran correctly.
I suspect at this point the problem stems from running within HomeBridge and am going to conduct some testing in that environment.
Update: I've made good progress. I now have a clear repro outside of HomeBridge. This is in fact the problem that alvarezb described and has to do with me resetting the buffer each time a new call is made. I am starting to work on a solution that maintains the state of the buffer between calls and only updates that portion of the buffer that needs to be.
Stay tuned!
Amazing! thank you so much
@AlexWHughes , I have published a new version (1.1.16) which should address the problem you are having. I will leave this issue open until I hear back from you. Please let me know if you see any problems with this fix.
Looks like this solved it. Thank you so much!
Describe The Bug:
To Reproduce: Adding two DMX fixtures using the same universe seems to cause issues when you control only one of them. Add in two "elements" to reproduce
Expected behavior: When I control the first light the second one shouldn't turn off. It seems like when I am controlling one it sends zero values to the other light.
Logs:
Plugin Config:
{ "name": "lights", "ipAddress": "xxx.xxx.xxx.xxx", "platform": "DMXLightHomebridgePlugin", "accessories": [ { "name": "RGB-1", "id": "lx-1", "driverName": "sacn", "dmxStartChannel": 1, "dmxChannelCount": 192, "dmxUniverse": 1, "colorOrder": "rgb" }, "name": "RGB-2", "id": "lx-2", "driverName": "sacn", "dmxStartChannel": 193, "dmxChannelCount": 4, "dmxUniverse": 1, "colorOrder": "rgb" { ] }