Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMX for dimmer (singe channel) #7

Open
markkibble opened this issue May 30, 2023 · 34 comments
Open

DMX for dimmer (singe channel) #7

markkibble opened this issue May 30, 2023 · 34 comments
Labels
enhancement New feature or request

Comments

@markkibble
Copy link

Is your feature request related to a problem? Please describe:
The plugin works a treat with a RGB PAR can I have, address 001 with RGB on channels 1,2 & 3. What I need help on please is how do I control a single DMX channel (for a single monochrome dimmer)? I have a DMX 240v dimmer for traditional lights with 12 channels that run lights in my house, so I need just a single channel to control. I have tried deleting "colorOrder": "rgb" line but the default is Rob so it controls 3 channels. Is there a command for that?
The command "dmxChannelCount": 1, does not limit control to a single channel as I expected.

Describe the solution you'd like:
To be clear I want to have light 1 on DMX channel 1, light 2 on DMX channel 2 etc...

Describe alternatives you've considered:
Tried making channel count 1 and removing the RGB .

Additional context:
If you can you help with this I would really appreciate it!

This is my config ...

        "name": "DMX Light",
        "platform": "DMXLightHomebridgePlugin",
        "accessories": [
            {
                "name": "DMX1",
                "id": "DMX1",
                "driverName": "enttec-usb-dmx-pro",
                "serialPortName": "/dev/ttyUSB0",
                "dmxStartChannel": 1,
                "dmxChannelCount": 1,
                "dmxUniverse": 1,
                "colorOrder": "rgb"
            },
            {
                "name": "DMX2",
                "id": "DMX2",
                "driverName": "enttec-usb-dmx-pro",
                "serialPortName": "/dev/ttyUSB0",
                "dmxStartChannel": 2,
                "dmxChannelCount": 1,
                "dmxUniverse": 1,
                "colorOrder": "rgb"
            },
            {
                "name": "DMX3",
                "id": "DMX3",
                "driverName": "enttec-usb-dmx-pro",
                "serialPortName": "/dev/ttyUSB0",
                "dmxStartChannel": 3,
                "dmxChannelCount": 1,
                "dmxUniverse": 1,
                "colorOrder": "rgb"
            },
            {
                "name": "DMX4",
                "id": "DMX4",
                "driverName": "enttec-usb-dmx-pro",
                "serialPortName": "/dev/ttyUSB0",
                "dmxStartChannel": 4,
                "dmxChannelCount": 1,
                "dmxUniverse": 1,
                "colorOrder": "rgb"
            },
            {
                "name": "DMX6",
                "id": "DMX6",
                "driverName": "enttec-usb-dmx-pro",
                "serialPortName": "/dev/ttyUSB0",
                "dmxStartChannel": 6,
                "dmxChannelCount": 1,
                "dmxUniverse": 1,
                "colorOrder": "rgb"
            }
@markkibble markkibble added the enhancement New feature or request label May 30, 2023
@PennazSoftware
Copy link
Owner

PennazSoftware commented Jun 7, 2023 via email

@markkibble
Copy link
Author

markkibble commented Jun 8, 2023 via email

@markkibble
Copy link
Author

Hi, I wonder if you wrote this enhancement could you licence it so I could pay you?

@markkibble
Copy link
Author

markkibble commented Jun 13, 2023 via email

@PennazSoftware
Copy link
Owner

PennazSoftware commented Jun 15, 2023 via email

@markkibble
Copy link
Author

markkibble commented Jun 21, 2023 via email

@PennazSoftware
Copy link
Owner

I made a change to support a single channel and it is now available in Homebridge. You will need to modify the colorOrder setting to "w".
Please let me know if this works for you.
-Dan

@markkibble
Copy link
Author

markkibble commented Jul 24, 2023 via email

@PennazSoftware
Copy link
Owner

Couple of things.

  1. I totally missed the fact you were using Enttec Pro instead of SACN. I had previously made the change to SACN. I just added support for the Entecc Pro. I no longer have easy access to an Enttec Pro device so I'm flying blind here.
  2. I'm not sure why you are getting the other error. Did you get past this point with previous releases? If so, try changing the 'name' and 'id' fields and restart. Let me know if this continues.

@PennazSoftware
Copy link
Owner

I forgot to mention that I posted a new build today...so give that a try.

@markkibble
Copy link
Author

markkibble commented Jul 31, 2023 via email

@markkibble
Copy link
Author

markkibble commented Aug 11, 2023 via email

@jlg89
Copy link

jlg89 commented Aug 27, 2023

All 15 of my fixtures are fade-only single channel, and my plugin config has them all in there as single-channel. All on sACN. I expect issues with channels that overlap what the plugin expects to be a three-channel fixture -- e.g. if I send commands to the fixture at address 17, I would expect odd issues with fixtures 18-19. However, if I control any single fixture with the plugin, every other fixture goes to zero. So there's more to this than just single vs. multi-channel issues.

@jlg89
Copy link

jlg89 commented Sep 23, 2023

I could be wrong here, but I think the issue may be that, in dmx.ts, each fixture is treated as its own universe, even when multiple fixtures have the same universe number. This would mean that every time a single fixture is updated, everything else in that universe gets zeroed. So the plugin needs to figure out how many different universes are in the config, create a "master buffer" for each distinct universe, then, when updating a fixture, just update the relevant channels in the "master buffer" for that fixture's universe, and leave the rest of the channels in that universe alone.

This isn't just a "3-channel vs. single-channel fixture" issue. Even if every fixture definition is a 3-channel, if they are all in the same universe, you cannot control a single fixture without zeroing all the others. That's what it looks like, at least.

I've forked a version of the code, but I'm not (yet) familiar enough with TypeScript to figure out how to fix this.

@markkibble
Copy link
Author

Hi Dan

Have you had the chance to look at this at all? I would really appreciate it if you can get it working. I’m happy to test anything with my Enttec Pro.

Thanks

M

@PennazSoftware
Copy link
Owner

PennazSoftware commented Oct 1, 2023 via email

@PennazSoftware
Copy link
Owner

PennazSoftware commented Oct 1, 2023 via email

@jlg89
Copy link

jlg89 commented Oct 2, 2023

Thank you so much for taking a look at this! I'm out of pocket for another week or so, but will try the updated plugin as soon as I can. If/when you have time, take a look at my forked code, specifically what I did with using "colorOrder=w" in the sACN parts, and see what you think. When reading current state I pull in that single value as "R" and then duplicate it to G and B (so gradient transition calculations work), and when generating a DMX update, I only send the R value. So the code basically treats single-channel as standard RGB internally. I also adjusted the FadeIn code so it should work for any fade operation -- up, down, in, or out, and eliminated the FadeOut section.

Again, I'm just getting into TS coding, so check my work for stupid mistakes.

@markkibble
Copy link
Author

Hi Dan

Thanks so much for the fix, it is loading up OK now with an Enttec Pro. I think we are nearly there!.

When I configured just one light, start address DMX 1 with colour order 'w', so it should control just that single DMAX address 0-255. What it actually controls addresses 1,2 &3, as if it was an RGB. I trust I am not misinterpreting your setup instructions for config or is there still a small bug?

As I explained, I have a 16 channel DMX dimmer, with start address of 1. So each light is then individually addressed from 1-16 address.

This means I can have light 1 = DMX address 1, dimmer 0-155, Light 2 DMX address 2 , dimmer 0-225 etc.. Config below (for just 2). Can you confirm I am doing it correctly or is there just a small problem?

Thanks, M

{
"name": "DMX Light",
"platform": "DMXLightHomebridgePlugin",
"accessories": [
{
"name": "Demo Dimmer 1",
"id": "DIM1",
"driverName": "enttec-usb-dmx-pro",
"serialPortName": "/dev/ttyUSB0",
"dmxStartChannel": 1,
"dmxChannelCount": 1,
"dmxUniverse": 1,
"colorOrder": "w"
},
{
"name": "Demo Dimmer2",
"id": "DIM2",
"driverName": "enttec-usb-dmx-pro",
"serialPortName": "/dev/ttyUSB0",
"dmxStartChannel": 2,
"dmxChannelCount": 1,
"dmxUniverse": 1,
"colorOrder": "w"
}
]
}

@jlg89
Copy link

jlg89 commented Oct 3, 2023

Check your log file to see if the plugin is throwing an error at startup when it sees the colorOrder value of "w" and defaulting it to rgb. That's one thing I fixed in the pull request. At least, I think I fixed it. Look at the changes in platform.ts.

@PennazSoftware
Copy link
Owner

PennazSoftware commented Oct 4, 2023 via email

@markkibble
Copy link
Author

Thanks Dan, happy to test any reconfig work, at least I know It’s not me being dumb!

Enjoy your break whatever!

M

@jlg89
Copy link

jlg89 commented Oct 5, 2023

FWIW, the changes I made don't touch the Enttec code, just the sACN stuff, though the change in platform.ts should make single-channel work properly for Enttec -- still no transitions, though.

@markkibble
Copy link
Author

Hi Dan, I trust you had a good vacation.

Is it possible to do the config work so I can test the code with an Enttec Pro?

M

@jlg89
Copy link

jlg89 commented Oct 23, 2023

Trying 1.2.6, all my sACN fixtures give this error, and nothing works:

10/22/2023, 10:47:55 PMDMX Lighting BridgeDMX LightAn unsupported color order was found. Now using default of "rgb".

@markkibble
Copy link
Author

Hi Dan,

Sorry t hassle you but Is it possible to do the config work so I can test the code with an Enttec Pro?

Thanks!

M

@markkibble
Copy link
Author

Hi Dan, I guess you are busy but I really want to get this working with an Enttec Pro, as I said I'm happy to do testing. Can you find time to try and fix this code please?

Really appreciate it ! Mark

@PennazSoftware
Copy link
Owner

PennazSoftware commented Nov 21, 2023 via email

@markkibble
Copy link
Author

markkibble commented Nov 22, 2023 via email

@markkibble
Copy link
Author

Hi Dan, I'm back from vacation. Just wondered if you had had a chance to look at this?

Thanks, M

@markkibble
Copy link
Author

Hi Dan, sorry to hassle but can you find a bit of time to do this enhancement of the holidays please? It would be very much appreciated. Have a great Christmas! Mark in the UK

@markkibble
Copy link
Author

Hi Dan, Happy New Year to you!

Sorry to chase but it would be great if you could take a quick look at this? Rest of my home automation is great but I do need this to run a number of lights. I would really appreciate it fixing.

Thanks

Mark

@PennazSoftware
Copy link
Owner

PennazSoftware commented Jan 19, 2024 via email

@markkibble
Copy link
Author

markkibble commented Jan 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants