node-dmx / dmx

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

ENTTEC buffer bierfly resets to 0 #150

Closed Nubebuster closed 1 year ago

Nubebuster commented 1 year ago

ENTTEC buffer bierfly resets to 0 when simply sending an update. I don't know exactly what causes this. It could be that when updating (at 44Hz) the values are messed up. Is there some way to disable the resend or change the interval?

wiedi commented 1 year ago

Is that with the "open" or the "pro"?

Nubebuster commented 1 year ago

ODE MK2 ethernet. Using artnet

Nubebuster commented 1 year ago

Setting dmx speed to 1 like this

universe = dmx.addUniverse("test", "artnet", enttecip.value, { dmx_speed: 1, });

Fixes the issue seemingly. But doesn't fix the actual problem.

Edit: this does not fix the issue. Higher values increase the frequency though

Nubebuster commented 1 year ago

The best solution would be to be able to configure to only send an update when values have changed. This would still not fix the actual issue though. This could mean that when you do change values, the values in the ENTTEC are still reset to 0 briefly

Nubebuster commented 1 year ago

Major donwside is that if I change the dmx speed to 1 the animations dont work anymore :(

Nubebuster commented 1 year ago

Am I using the library correctly?

const universe = dmx.addUniverse("test", "artnet", enttecip) universe.update({ 1: 127 }); Should I run close() or something?

Nubebuster commented 1 year ago

Solved. I was accessing the universe singleton instance I made with async calls without locking the initialization. This would end up with one ghost universe instance sending 0 values. The other sending my values.