node-dmx / dmx

DMX controller library for node.js
MIT License
295 stars 96 forks source link

Sometimes light value not setting / Can I read the current light state? #134

Open dotKokott opened 2 years ago

dotKokott commented 2 years ago

Hello!

I have the issue that it seems that sometimes my universe.updateAll() calls are getting swallowed / don't reach the lights.

I would love to catch that. Is it actually possible to read out the current set value on the lights (or even find out how many lights are connected and what their respective light value is?)

This way I could issue the command again if the light settings are not changing.

Using enttec-usb-dmx-pro driver.

Thank you!

wiedi commented 2 years ago

You can use universe.get(channel) to read the value the driver thinks that channel should have. The driver will repeatedly send this value on the bus.

For discovery we would need to add support for RDM [1]. This is currently not implemented and I don't think I have any device that actually supports this.

As a first step to debugging this I would suggest finding out if this is a software or hardware issue. If the driver sends out the expected values you can start looking at timings, then cabling, device configuration and so on.

[1] https://en.wikipedia.org/wiki/RDM_(lighting)