Hundemeier / sacn

A simple ANSI E1.31 (aka sACN) module for python.
MIT License
47 stars 21 forks source link

Ending python script and leave leds on. #23

Closed Cyb0rg42 closed 3 years ago

Cyb0rg42 commented 3 years ago

Hi,

Is there a way to end the python script and leave the LEDs on? Ending the script with sender.stop() causes the LEDs to go out.

code snippit: def stable(sender,startuniverse,enduniverse,dmxcolor,numtuples): if debug == 1: print('Function: stable() startuniverse: %s, enduniverse: %s, color: %s' % (startuniverse,enduniverse, for cntuniverse in range(startuniverse,enduniverse): if debug == 1: print('Universe: %s' % (cntuniverse)) sender[cntuniverse].dmx_data = (dmxcolor * numtuples) sender.flush() sender.manual_flush = False

sender.stop()

    sys.exit()

Regards, Karl

Hundemeier commented 3 years ago

Is this assumption of your setup correct: [sending device (with python script)] --[over network]--> [receiving device (in this case some LEDs)]

If this is your current setup, then it is dependent on the receiving device how it handles the closing of the sACN data stream. When you close the sender via sender.stop(), no further packets are send out and the receiving device decides how to handle a situation when it no longer receives sACN packets. Some devices keep the last state, others turn off; nothing you can do about that from the sending side (ie. the python script). sACN is not intended for settting values and then stopping the data stream. The clue is in the name: streamingACN.

If your setup is different, please explain it in detail, otherwise I assume this is not an issue with this library and can be closed.

Cyb0rg42 commented 3 years ago

I'm sending the sACN packets to a Falcon F16V3. After sender.stop() the LEDS goes off. I want them to stay on.

Hundemeier commented 3 years ago

After reading through the manual of the Falcon F16V3 here, I think you should check out the Blank options (Sections 4.2.4.19 and 4.2.3.2). But I fear I can not help you any further, since this seems to be a problem with the receiver and not this library. If you encounter any issues when using this library, feel free to open a new issue.